@ives_xxz/framework 1.2.5 → 1.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -123,21 +123,26 @@ export class FWLayerManager extends FWManager implements FW.LayerManager {
123
123
 
124
124
  let ctr = new data.type();
125
125
 
126
- if (ctr.layerType == FWSystemDefine.FWLayerType.POPUP_QUEUE && !this.layerQueue.isEmpty()) {
127
- this.layerQueue.add(ctr.layerData);
126
+ /** 如果不是重复打开的Layer,不是需要添加进队列末尾的,并且已经存在于注册表中的 不进行重复打开 */
127
+ if (this.layerRegistry.has(data.type) && !ctr.isRepeatOpen) {
128
128
  return;
129
129
  }
130
130
 
131
- /** 如果不是重复打开的Layer,不是需要添加进队列末尾的,并且已经存在于注册表中的 不进行重复打开 */
132
- if (
133
- this.layerRegistry.has(data.type) &&
134
- !ctr.isRepeatOpen &&
135
- ctr.layerType != FWSystemDefine.FWLayerType.POPUP_QUEUE
136
- ) {
131
+ this.layerRegistry.add(data.type);
132
+
133
+ if (ctr.layerType == FWSystemDefine.FWLayerType.POPUP_QUEUE && !this.layerQueue.isEmpty()) {
134
+ this.layerQueue.add(ctr.layerData);
135
+ this.layerRegistry.delete(data.type);
137
136
  return;
138
137
  }
139
138
 
140
- this.layerRegistry.add(data.type);
139
+ if (ctr.layerType != FWSystemDefine.FWLayerType.REPEAT && !ctr.isRepeatOpen) {
140
+ for (const [key, value] of this.layerMap) {
141
+ if (value.layerAssetProperty.path == ctr.layerAssetProperty.path) {
142
+ return this.layerMap.get(value.uuid).controller as Ctr;
143
+ }
144
+ }
145
+ }
141
146
 
142
147
  ctr.initialize();
143
148
 
@@ -200,18 +205,25 @@ export class FWLayerManager extends FWManager implements FW.LayerManager {
200
205
  }
201
206
  let ctr = new data.type();
202
207
 
208
+ /** 如果不是重复打开的Layer,不是需要添加进队列末尾的,并且已经存在于注册表中的 不进行重复打开 */
209
+ if (this.layerRegistry.has(data.type) && !ctr.isRepeatOpen) {
210
+ return;
211
+ }
212
+
213
+ this.layerRegistry.add(data.type);
214
+
203
215
  if (ctr.layerType == FWSystemDefine.FWLayerType.POPUP_QUEUE && !this.layerQueue.isEmpty()) {
204
216
  this.layerQueue.add(ctr.layerData);
217
+ this.layerRegistry.delete(data.type);
205
218
  return;
206
219
  }
207
220
 
208
- /** 如果不是重复打开的Layer,不是需要添加进队列末尾的,并且已经存在于注册表中的 不进行重复打开 */
209
- if (
210
- this.layerRegistry.has(data.type) &&
211
- !ctr.isRepeatOpen &&
212
- ctr.layerType != FWSystemDefine.FWLayerType.POPUP_QUEUE
213
- ) {
214
- return;
221
+ if (ctr.layerType != FWSystemDefine.FWLayerType.REPEAT && !ctr.isRepeatOpen) {
222
+ for (const [key, value] of this.layerMap) {
223
+ if (value.layerAssetProperty.path == ctr.layerAssetProperty.path) {
224
+ return this.layerMap.get(value.uuid).controller as Ctr;
225
+ }
226
+ }
215
227
  }
216
228
 
217
229
  ctr.initialize();
@@ -251,7 +263,8 @@ export class FWLayerManager extends FWManager implements FW.LayerManager {
251
263
  if (ctr.layerType !== FWSystemDefine.FWLayerType.PERMANENT) {
252
264
  this.layerStack.push(layerData);
253
265
  }
254
- const a = Symbol['addExternalReference'];
266
+
267
+ this.layerRegistry.delete(data.type);
255
268
 
256
269
  const proxy = new Proxy(ctr, {
257
270
  get: (target, prop) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ives_xxz/framework",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "cocoscreator 2.x mvc framework",
5
5
  "main": "index.js",
6
6
  "keywords": [