DynarchLIB icon indicating copy to clipboard operation
DynarchLIB copied to clipboard

bug in getSize() and setSize()

Open qiyun opened this issue 13 years ago • 0 comments

summary: DlContainer getSize() then setSize() will cause the container keep growing.

  1. go to http://www.dynarchlib.com/dl/index.html#sample://widgets-buttons.xml.
  2. click Run it.
  3. in the popup window, paste the following code. var btn = new DlButton({ parent : getDocCanvas(), label : "Start", iconClass : "IconChardev" }); var btn2 = new DlContainer({ parent: getDocCanvas(), }); btn2.setSize({x:100,y:200}); btn2.setStyle("border","1px solid red") btn2.setStyle("position","absolute"); btn.addEventListener("onClick",function(){ btn2.setSize(btn2.getSize()); });
  4. click Start several times. The red container keeps growing. Should: the red container remains the same size.

qiyun avatar Dec 07 '11 03:12 qiyun