Skip to content

Commit ef75edc

Browse files
committed
-Added new event whenever a panel is updated.
1 parent f035828 commit ef75edc

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

Build/wcDocker.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ wcDocker.DOCK_LEFT = 'left';
4848
wcDocker.DOCK_RIGHT = 'right';
4949
wcDocker.DOCK_BOTTOM = 'bottom';
5050

51+
wcDocker.EVENT_UPDATED = 'updated';
5152
wcDocker.EVENT_CLOSED = 'closed';
5253
wcDocker.EVENT_ATTACHED = 'attached';
5354
wcDocker.EVENT_DETACHED = 'detached';
@@ -110,6 +111,7 @@ wcDocker.prototype = {
110111
for (var i = 0; i < this._dockPanelTypeList.length; ++i) {
111112
if (this._dockPanelTypeList[i].name === typeName) {
112113
var panel = new wcPanel(typeName);
114+
panel._parent = this;
113115
panel.__container(this.$transition);
114116
panel._panelObject = new this._dockPanelTypeList[i].create(panel);
115117

@@ -2050,6 +2052,8 @@ wcPanel.prototype = {
20502052
return;
20512053
}
20522054

2055+
this.__trigger(wcDocker.EVENT_UPDATED);
2056+
20532057
var width = this.$container.width();
20542058
var height = this.$container.height();
20552059
if (this._actualSize.x !== width || this._actualSize.y !== height) {

Build/wcDocker.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Code/docker.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ wcDocker.DOCK_LEFT = 'left';
4848
wcDocker.DOCK_RIGHT = 'right';
4949
wcDocker.DOCK_BOTTOM = 'bottom';
5050

51+
wcDocker.EVENT_UPDATED = 'updated';
5152
wcDocker.EVENT_CLOSED = 'closed';
5253
wcDocker.EVENT_ATTACHED = 'attached';
5354
wcDocker.EVENT_DETACHED = 'detached';
@@ -110,6 +111,7 @@ wcDocker.prototype = {
110111
for (var i = 0; i < this._dockPanelTypeList.length; ++i) {
111112
if (this._dockPanelTypeList[i].name === typeName) {
112113
var panel = new wcPanel(typeName);
114+
panel._parent = this;
113115
panel.__container(this.$transition);
114116
panel._panelObject = new this._dockPanelTypeList[i].create(panel);
115117

Code/panel.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,8 @@ wcPanel.prototype = {
298298
return;
299299
}
300300

301+
this.__trigger(wcDocker.EVENT_UPDATED);
302+
301303
var width = this.$container.width();
302304
var height = this.$container.height();
303305
if (this._actualSize.x !== width || this._actualSize.y !== height) {

0 commit comments

Comments
 (0)