Changes between Initial Version and Version 1 of Ticket #2955


Ignore:
Timestamp:
May 15, 2007, 3:09:30 PM (13 years ago)
Author:
bill
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #2955 – Description

    initial v1  
    66
    77This brings up the problem with layout() and resize().   After all widgets are created, layout() is called on each widget, to let it "hook up" to other widgets such as it's parent/children/widgets it references.  The problem is that, given a parent and child widget, parent.layout() wants to size itself and then call child.resize(), but that's not really valid until after child.layout() is called.  Have to rethink the lifecycle.
     8
     91. Change dijit.base.Layout.layoutChildren() to take coordinates (l,t,w,h) about box into which to place children.
     10
     112. Modify all widgets to have resize() method rather than onResized() method
     12
     133. Rename Widget.layout() to startup(), to match method name in dijit.Sizable
     14
     154. In the past we've seen that setMarginBox() followed by getContentBox() can fail (return NaN or 0), due to race conditions or if some things are hidden.   Maybe we can work around it w/code like:
     16
     17{{{
     18        setMarginGetContent: function(node, mb){
     19                dojo.marginBox(node, mb);
     20                var cs = dojo.getComputedStyle(node);
     21                var me=dojo._getMarginExtents(node, cs);
     22                var pb=dojo._getPadBounds(node, cs);
     23                return { l: pb.l, t: pb.t, w: mb.w - me.w - pb.w, h: mb.h - me.h - pb.h };
     24        }
     25}}}
     26
     273.