Commit 199d334e authored by huoshizhe's avatar huoshizhe

feat: 适配

parent 68201e4b
...@@ -169,13 +169,17 @@ cc.Class({ ...@@ -169,13 +169,17 @@ cc.Class({
node.active = false; node.active = false;
}); });
console.log('videoMenuItemData = ' + videoMenuItemData); let storyBoxMenuLength = 0;
menuItemDataList.forEach((data, idx) => { menuItemDataList.forEach((data, idx) => {
if (!data) { if (!data) {
console.log('wordsMenuItemData')
return; return;
} }
const node = menuItemNodeList[idx]; const node = menuItemNodeList[idx];
node.active = true; node.active = true;
node.y = 50 + storyBoxMenuLength * 100;
storyBoxMenuLength++;
const menuBase = cc.find('bubbleBase', node); const menuBase = cc.find('bubbleBase', node);
...@@ -276,6 +280,9 @@ cc.Class({ ...@@ -276,6 +280,9 @@ cc.Class({
} }
}); });
const titleNode = cc.find('middleLayer/storyBox/menu/menuBase/title');
titleNode.y = 30 + storyBoxMenuLength * 100;
this.storyBoxMenuLength = menuItemNodeList.filter(node => node.active).length; this.storyBoxMenuLength = menuItemNodeList.filter(node => node.active).length;
const storyBox = cc.find('middleLayer/storyBox'); const storyBox = cc.find('middleLayer/storyBox');
...@@ -358,8 +365,7 @@ cc.Class({ ...@@ -358,8 +365,7 @@ cc.Class({
const menuBase = cc.find('middleLayer/storyBox/menu/menuBase'); const menuBase = cc.find('middleLayer/storyBox/menu/menuBase');
cc.tween(menuBase) cc.tween(menuBase)
// .to(1, { y: this.storyBoxMenuLength * -105 - 70 }, { easing: 'bounceOut' }) .to(1, { y: this.storyBoxMenuLength * -100 - 80 }, { easing: 'bounceOut' })
.to(1, { y: -600 }, { easing: 'bounceOut' })
.start(); .start();
}, },
......
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