Commit bdcef3a7 authored by Li MingZhe's avatar Li MingZhe

fix: 居中bug

parent 625ec857
No preview for this file type
......@@ -930,13 +930,15 @@ cc.Class({
}
const line2 = lineArr[1];
const line2LastItem = line2[line2.length - 1];
const totalLine2 = line2LastItem.x + line2LastItem.width / 2;
const offX2 = (maxW - totalLine2) / 2
for (let i=0; i<line2.length; i++) {
line2[i].x += offX2;
if (line2) {
const line2LastItem = line2[line2.length - 1];
const totalLine2 = line2LastItem.x + line2LastItem.width / 2;
const offX2 = (maxW - totalLine2) / 2
for (let i=0; i<line2.length; i++) {
line2[i].x += offX2;
}
}
// 拖拽异常 转一下坐标
for (let i=0; i<childArr.length; i++) {
const wordNode = childArr[i];
......
No preview for this file type
{"ios":{"sceneName":"dfzx_cocos_pinjuzi","version":"45344"},"android":{"sceneName":"dfzx_cocos_pinjuzi","version":"45344"}}
\ No newline at end of file
{"ios":{"sceneName":"dfzx_cocos_pinjuzi","version":"a38bb"},"android":{"sceneName":"dfzx_cocos_pinjuzi","version":"a38bb"}}
\ No newline at end of file
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