Commit 79434ec3 authored by 李维's avatar 李维

dev commit

parent 29a3ae94
...@@ -1166,7 +1166,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1166,7 +1166,6 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
showCheckPannel(checkResult) { showCheckPannel(checkResult) {
let lastY = 0
const creatItem = (height, withSplit, data) => { const creatItem = (height, withSplit, data) => {
let padding = 30; let padding = 30;
let scrollContent = this.g_cartoon.getCartoonElement("check_scroll_pannel") let scrollContent = this.g_cartoon.getCartoonElement("check_scroll_pannel")
...@@ -1188,7 +1187,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1188,7 +1187,6 @@ export class PlayComponent implements OnInit, OnDestroy {
wordColorBG.ref.y = totalHeight + padding + 64 / 2 wordColorBG.ref.y = totalHeight + padding + 64 / 2
totalHeight += padding + 64; totalHeight += padding + 64;
console.log("单词高度", 64) console.log("单词高度", 64)
lastY = totalHeight + padding + 64 / 2;
let word = this.g_cartoon.createCartoonElementLabel("text-label", data.word, "DroidSansFallback", "#FFFFFF", 44) let word = this.g_cartoon.createCartoonElementLabel("text-label", data.word, "DroidSansFallback", "#FFFFFF", 44)
word.ref.x = 360 / 2 word.ref.x = 360 / 2
...@@ -1209,7 +1207,6 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1209,7 +1207,6 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
}) })
console.log("正确提示", 120) console.log("正确提示", 120)
lastY = totalHeight + 50 + 60
totalHeight += 120 + padding; totalHeight += 120 + padding;
let word = this.g_cartoon.createCartoonElementLabel("text-label", data.rightWord, "DroidSansFallback", "#ffe9b1", 44) let word = this.g_cartoon.createCartoonElementLabel("text-label", data.rightWord, "DroidSansFallback", "#ffe9b1", 44)
...@@ -1244,15 +1241,15 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1244,15 +1241,15 @@ export class PlayComponent implements OnInit, OnDestroy {
let totalHeight = 0; let totalHeight = 0;
let totalNum = checkResult.length; let totalNum = checkResult.length;
lastY = 0
checkResult.forEach((element, index) => { checkResult.forEach((element, index) => {
totalHeight = creatItem(totalHeight, !(index==(totalNum-1)), element) totalHeight = creatItem(totalHeight, !(index==(totalNum-1)), element)
}); });
this.m_totalScrollHeight = totalHeight + 20;
sliderBG.initSlider(scrollContent.windowHeight, this.m_totalScrollHeight, 0)
let scroll = this.g_cartoon.getCartoonElement("check_scroll_pannel")
scroll.ref.setSize(880, this.m_totalScrollHeight)
let checkPannel = this.g_cartoon.getCartoonElement("checkpannel_container"); let checkPannel = this.g_cartoon.getCartoonElement("checkpannel_container");
this.m_totalScrollHeight = lastY;
console.log(totalHeight)
sliderBG.initSlider(scrollContent.windowHeight, lastY * checkPannel.ref.scaleY, 0)
checkPannel.in() checkPannel.in()
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment