Commit f9d2e853 authored by rockyl's avatar rockyl

修复

parent 5bb3bb7c
...@@ -7,6 +7,7 @@ import {Event} from "../../../2d/events"; ...@@ -7,6 +7,7 @@ import {Event} from "../../../2d/events";
import {proxyMethods} from "./ScrollView"; import {proxyMethods} from "./ScrollView";
import Container from "../../../2d/display/Container"; import Container from "../../../2d/display/Container";
import {IUIComponent} from "./IUIComponent"; import {IUIComponent} from "./IUIComponent";
import {editorMode} from "../../launcher";
export class ScrollListItem extends ScrollListItemBase implements IUIComponent { export class ScrollListItem extends ScrollListItemBase implements IUIComponent {
isUI = true; isUI = true;
...@@ -40,13 +41,17 @@ export class ScrollList extends ScrollListBase { ...@@ -40,13 +41,17 @@ export class ScrollList extends ScrollListBase {
} }
protected onNextFrame(event) { protected onNextFrame(event) {
if (editorMode) {
return;
}
this.firstItem = <Container>this.removeChildAt(0); this.firstItem = <Container>this.removeChildAt(0);
this.updateViewRect(); this.updateViewRect();
} }
protected createItem(): any { protected createItem(): any {
let item = <ScrollListItem>super.createItem(); let item = <ScrollListItem>super.createItem();
item.setView(this.firstItem.clone(this.cloneEvents, this.cloneScripts)); ;
item.setView(this.firstItem.clone(this.cloneEvents, this.cloneScripts))
return item; return item;
} }
......
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