|
|
@ -9,17 +9,17 @@ import { Widget } from "../4.widget"; |
|
|
|
import { createWidget } from "../5.inject"; |
|
|
|
import { createWidget } from "../5.inject"; |
|
|
|
import { zIndex_layer } from "../constant"; |
|
|
|
import { zIndex_layer } from "../constant"; |
|
|
|
import { DOM } from "../utils"; |
|
|
|
import { DOM } from "../utils"; |
|
|
|
// import { Resizers } from "../../base/0.base";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export class LayerController extends Controller { |
|
|
|
export class LayerController extends Controller { |
|
|
|
constructor() { |
|
|
|
constructor(Resizers) { |
|
|
|
super(); |
|
|
|
super(); |
|
|
|
this._constructor(); |
|
|
|
this._constructor(); |
|
|
|
|
|
|
|
this.Resizers = Resizers; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
props = { |
|
|
|
props = { |
|
|
|
render: "body", |
|
|
|
render: "body", |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
init() { |
|
|
|
init() { |
|
|
|
this.layerManager = {}; |
|
|
|
this.layerManager = {}; |
|
|
@ -28,7 +28,7 @@ export class LayerController extends Controller { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_initResizer() { |
|
|
|
_initResizer() { |
|
|
|
// this.resizer = Resizers.add(`layerController${uniqueId()}`, bind(this._resize, this));
|
|
|
|
this.resizer = this.Resizers.add(`layerController${uniqueId()}`, bind(this._resize, this)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_resize() { |
|
|
|
_resize() { |
|
|
@ -47,7 +47,7 @@ export class LayerController extends Controller { |
|
|
|
context = op; |
|
|
|
context = op; |
|
|
|
op = container; |
|
|
|
op = container; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return this.create(name, null, op, context); |
|
|
|
return this.create(name, null, op, context); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -124,7 +124,7 @@ export class LayerController extends Controller { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
this.add(name, widget, layout); |
|
|
|
this.add(name, widget, layout); |
|
|
|
|
|
|
|
|
|
|
|
return widget; |
|
|
|
return widget; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -134,7 +134,7 @@ export class LayerController extends Controller { |
|
|
|
} |
|
|
|
} |
|
|
|
this._getLayout(name).visible(); |
|
|
|
this._getLayout(name).visible(); |
|
|
|
this._getLayout(name).element.css("z-index", this.zindex++).show(0, callback).trigger("__resize__"); |
|
|
|
this._getLayout(name).element.css("z-index", this.zindex++).show(0, callback).trigger("__resize__"); |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -144,7 +144,7 @@ export class LayerController extends Controller { |
|
|
|
} |
|
|
|
} |
|
|
|
this._getLayout(name).invisible(); |
|
|
|
this._getLayout(name).invisible(); |
|
|
|
this._getLayout(name).element.hide(0, callback); |
|
|
|
this._getLayout(name).element.hide(0, callback); |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -160,7 +160,7 @@ export class LayerController extends Controller { |
|
|
|
this.layerManager[name] = layer; |
|
|
|
this.layerManager[name] = layer; |
|
|
|
this.layouts[name] = layout; |
|
|
|
this.layouts[name] = layout; |
|
|
|
layout.element.css("z-index", this.zindex++); |
|
|
|
layout.element.css("z-index", this.zindex++); |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -184,7 +184,7 @@ export class LayerController extends Controller { |
|
|
|
this.layouts[name].destroy(); |
|
|
|
this.layouts[name].destroy(); |
|
|
|
delete this.layerManager[name]; |
|
|
|
delete this.layerManager[name]; |
|
|
|
delete this.layouts[name]; |
|
|
|
delete this.layouts[name]; |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -195,7 +195,7 @@ export class LayerController extends Controller { |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.layerManager = {}; |
|
|
|
this.layerManager = {}; |
|
|
|
this.layouts = {}; |
|
|
|
this.layouts = {}; |
|
|
|
|
|
|
|
|
|
|
|
return this; |
|
|
|
return this; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|