Commit 6b2bf658 authored by haiyoucuv's avatar haiyoucuv

1

parent 313f67bf
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ChangeListManager">
<list default="true" id="ca828aa9-7d32-43b5-949b-5692dab70d5f" name="Default Changelist" comment="" />
<list default="true" id="ca828aa9-7d32-43b5-949b-5692dab70d5f" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/2d/display/DisplayObject.ts" beforeDir="false" afterPath="$PROJECT_DIR$/src/2d/display/DisplayObject.ts" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
......@@ -100,7 +103,7 @@
<workItem from="1591165756008" duration="509000" />
<workItem from="1591166636799" duration="1935000" />
<workItem from="1591239594676" duration="141000" />
<workItem from="1591239837585" duration="838000" />
<workItem from="1591239837585" duration="946000" />
</task>
<servers />
</component>
......@@ -113,22 +116,22 @@
</option>
</component>
<component name="WindowStateProjectService">
<state width="1878" height="330" key="GridCell.Tab.0.bottom" timestamp="1591240653162">
<state width="1878" height="330" key="GridCell.Tab.0.bottom" timestamp="1591240720077">
<screen x="1680" y="-199" width="1920" height="1177" />
</state>
<state width="1878" height="330" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591240653162" />
<state width="1878" height="330" key="GridCell.Tab.0.center" timestamp="1591240653161">
<state width="1878" height="330" key="GridCell.Tab.0.bottom/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591240720077" />
<state width="1878" height="330" key="GridCell.Tab.0.center" timestamp="1591240720076">
<screen x="1680" y="-199" width="1920" height="1177" />
</state>
<state width="1878" height="330" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591240653161" />
<state width="1878" height="330" key="GridCell.Tab.0.left" timestamp="1591240653160">
<state width="1878" height="330" key="GridCell.Tab.0.center/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591240720076" />
<state width="1878" height="330" key="GridCell.Tab.0.left" timestamp="1591240720075">
<screen x="1680" y="-199" width="1920" height="1177" />
</state>
<state width="1878" height="330" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591240653160" />
<state width="1878" height="330" key="GridCell.Tab.0.right" timestamp="1591240653162">
<state width="1878" height="330" key="GridCell.Tab.0.left/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591240720075" />
<state width="1878" height="330" key="GridCell.Tab.0.right" timestamp="1591240720076">
<screen x="1680" y="-199" width="1920" height="1177" />
</state>
<state width="1878" height="330" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591240653162" />
<state width="1878" height="330" key="GridCell.Tab.0.right/37.23.1643.1027/1680.-199.1920.1177@1680.-199.1920.1177" timestamp="1591240720076" />
<state x="2305" y="66" width="670" height="676" key="search.everywhere.popup" timestamp="1591239621122">
<screen x="1680" y="-199" width="1920" height="1177" />
</state>
......
......@@ -1396,6 +1396,7 @@ var tslib = {__extends: __extends,__assign: __assign,__rest: __rest,__decorate:
if (this.parent) {
this.parent.removeChild(this);
}
_super.prototype.destroy.call(this);
this.transform.destroy();
this.transform = null;
this._localBoundsSelf = null;
......
This diff is collapsed.
......@@ -395,11 +395,6 @@ export class DisplayObject extends EventDispatcher {
*/
destroy() {
//移除所有监听
<<<<<<< HEAD
=======
// this.removeAllEventListener();
// super.destroy();
>>>>>>> b14a95c820b417eba6decc2ecbcf5732fa698cb4
//如果有父级,从中移除自己
this.removeAllEventListener();
// super.destroy();
......@@ -425,7 +420,7 @@ export class DisplayObject extends EventDispatcher {
//标记为已销毁
this.destroyed = true;
}
get alpha(): number {
......
......@@ -205,19 +205,11 @@ export class EventDispatcher extends HashObject {
if (!event["_pd"]) {
if (listeners[i]) {
let listener = listeners[i];
<<<<<<< HEAD
let type = event.type;
listener.fn.call(listener.context, event)
//必须做单独指向,因为有可能出现上面的fn.里执行的就是removeEventListener,导致listeners[i]不存在
if (listener.once) {
s.removeEventListener(type, listener.fn, listener.context, useCapture);
=======
let type = event.type;//防止call事件里触发其他事件导致event被修改;
listener.fn.call(listener.context, event)
//必须做单独指向,因为有可能出现上面的fn.里执行的就是removeEventListener,导致listeners[i]不存在
if (listener.once) {
s.removeEventListener(type/*event.type*/, listener.fn, listener.context, useCapture);
>>>>>>> b14a95c820b417eba6decc2ecbcf5732fa698cb4
}
// listeners[i](event);
} else {
......
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