Commit f7c67678 authored by 李维's avatar 李维

Bug fix

parent cd7b2940
...@@ -1356,7 +1356,18 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1356,7 +1356,18 @@ export class PlayComponent implements OnInit, OnDestroy {
heightData.wordRef = wordColorBG.ref heightData.wordRef = wordColorBG.ref
heightData.word = 64; heightData.word = 64;
let word = this.g_cartoon.createCartoonElementLabel("text-label", data.word, "Aileron-Bold", "#FFFFFF", 48) let maxLen = data.word.length
let fs = 48
if(maxLen <= 14) {
fs = 48
} else if(maxLen <= 18) {
fs = 36
} else if(maxLen <= 20) {
fs = 24
} else {
fs = 20
}
let word = this.g_cartoon.createCartoonElementLabel("text-label", data.word, "Aileron-Bold", "#FFFFFF", fs)
word.ref.x = 360 / 2 word.ref.x = 360 / 2
word.ref.y = 64 / 2 + 5 word.ref.y = 64 / 2 + 5
wordColorBG.ref.addChild(word.ref); wordColorBG.ref.addChild(word.ref);
...@@ -1447,7 +1458,7 @@ export class PlayComponent implements OnInit, OnDestroy { ...@@ -1447,7 +1458,7 @@ export class PlayComponent implements OnInit, OnDestroy {
} }
}) })
this.m_totalScrollHeight = totalHeight + 200; this.m_totalScrollHeight = totalHeight + heigthData.length * 100;
sliderBG.initSlider(scrollContent.windowHeight, this.m_totalScrollHeight, 0) sliderBG.initSlider(scrollContent.windowHeight, this.m_totalScrollHeight, 0)
let scroll = this.g_cartoon.getCartoonElement("check_scroll_pannel") let scroll = this.g_cartoon.getCartoonElement("check_scroll_pannel")
scroll.ref.setSize(880, this.m_totalScrollHeight) scroll.ref.setSize(880, this.m_totalScrollHeight)
......
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