Commit bec58e44 authored by 李维's avatar 李维

添加页面渲染时的滚动禁止

parent cc04092e
......@@ -83,6 +83,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
async onLoadEnd() {
// TODO 加载完成后的逻辑写在这里
console.log(this.data);
this.disableScroll(); // 禁用页面滚动
this.initSize(); // 页面尺寸
this.initMiddleLayer(); // 中间层相关
this.initEventListener(); // 事件监听
......@@ -92,6 +93,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.initScorePanel();
this.initActionButton();
this.initScoreShow();
this.enableScroll(); // 启用页面滚动
this.startTimestamp = new Date().getTime();
}
......@@ -2740,9 +2742,11 @@ export default class SceneComponent extends MyCocosSceneComponent {
child.destroy();
})
this.disableScroll(); // 禁用页面滚动
await this.initHotZoneBg();
this.initHotZoneItem();
this.initScorePanel();
this.enableScroll(); // 启用页面滚动
}
// 禁用页面滚动
......@@ -2751,7 +2755,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
scorllView.enabled = false;
}
// 用页面滚动
// 用页面滚动
enableScroll() {
const scorllView = cc.find("Canvas/MainContent/ScorllView").getComponent(cc.ScrollView);
scorllView.enabled = true;
......
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