Opened 12 years ago

Closed 7 years ago

#5849 closed defect (fixed)

[patch][cla][dojox.layout] FloatingPane increases size with each show() call

Reported by: guest Owned by: dylan
Priority: high Milestone: 1.9
Component: DojoX Layout Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

test_FloatingPanne.html in the dojox/layout folder demonstrates this already. Each time the show() method is called, my FloatingPane? increases a few pixels in size.

Attachments (2)

test_FloatingPane.html (6.6 KB) - added by guest 12 years ago.
5849.diff (526 bytes) - added by bitpshr 7 years ago.

Download all attachments as: .zip

Change History (14)

Changed 12 years ago by guest

Attachment: test_FloatingPane.html added

comment:1 Changed 12 years ago by bill

Component: GeneralDojox
Owner: changed from anonymous to dante

comment:2 Changed 12 years ago by guest

a simple fix could look liek this (show method)

show: function(/* Function? */callback){

summary: Show the FloatingPane? var anim = dojo.fadeIn({node:this.domNode, duration:this.duration,

beforeBegin: dojo.hitch(this,function(){

this.domNode.style.display = ""; this.domNode.style.visibility = "visible"; if (this.dockTo && this.dockable) { this.dockTo._positionDock(null); } if (typeof callback == "function") { callback(); } this._isDocked = false; if (this._dockNode) {

this._dockNode.destroy(); this._dockNode = null;

}

})

}).play(); this.resize(dojo.coords(this.domNode));

},

I just commented teh this.resize call :-) seems to work for my needs...

comment:3 Changed 12 years ago by dylan

Milestone: 1.1

comment:4 Changed 12 years ago by dante

Milestone: 1.11.2

need to consider the overall implications, and consider refactoring a lot of FloatingPane?

comment:5 Changed 11 years ago by dante

Milestone: 1.2
Summary: FloatingPane increases size with each show() call[dojox.layout] FloatingPane increases size with each show() call

puuuunt

comment:6 Changed 11 years ago by bill

Milestone: future

comment:7 Changed 9 years ago by bill

Component: DojoxDojoX Layout

comment:8 Changed 7 years ago by dylan

Milestone: future1.9

This is still an issue after all these years... let's fix this.

Changed 7 years ago by bitpshr

Attachment: 5849.diff added

comment:9 Changed 7 years ago by bitpshr

The issue was caused by using domGeom.position which uses margin box dimensions; we need content box dimensions in this case. Because we still need the x / y coordinates provided by domGeom.position, we need to mixin the contentBox object:

Code highlighting:

  // use w / h from content box dimensions and x / y from position
  var contentBox = domGeom.getContentBox(this.domNode)
  this.resize(lang.mixin(domGeom.position(this.domNode), {w: contentBox.w, h: contentBox.h}));
Last edited 7 years ago by bitpshr (previous) (diff)

comment:10 Changed 7 years ago by dylan

Owner: changed from dante to dylan
Status: newassigned

comment:11 Changed 7 years ago by dylan

Summary: [dojox.layout] FloatingPane increases size with each show() call[patch][cla][dojox.layout] FloatingPane increases size with each show() call

Passes the tests, patch makes sense. Will commit and close.

comment:12 Changed 7 years ago by dylan

Resolution: fixed
Status: assignedclosed

In [30720]:

fixes #5849, thanks bitpshr (Paul Bouchon)

Note: See TracTickets for help on using tickets.