lib/netzke/basepack/window/javascripts/window.js in netzke-basepack-0.7.7 vs lib/netzke/basepack/window/javascripts/window.js in netzke-basepack-0.8.0

- old
+ new

@@ -7,14 +7,20 @@ // set the move and resize events after window is shown, so that they don't fire at initial rendering if (this.persistence) { this.on("show", function(){ this.on("move", this.onMoveResize, this); this.on("resize", this.onMoveResize, this); + this.on("maximize", Ext.Function.pass(this.onMaximize, [true]), this); + this.on("restore", Ext.Function.pass(this.onMaximize, [false]), this); }, this); } }, onMoveResize: function(){ var x = this.getPosition()[0], y = this.getPosition()[1], w = this.getSize().width, h = this.getSize().height; - this.setSizeAndPosition({x:x, y:y, w:w, h:h}); // API call + this.setSizeAndPosition({x: x, y: y, width: w, height: h}); // API call + }, + + onMaximize: function(maximized) { + this.setMaximized(maximized); } }