Loading ...
Sorry, an error occurred while loading the content.

Re: Resize handle of a layout unit is allowed to be dragged off the screen.

Expand Messages
  • aniad
    Ah, OK, now I understand. Thanks! Ania. ... , ... want ;) ... set the ... whereas the ... minHeight on the ... create the ...
    Message 1 of 8 , Jan 30, 2009
    • 0 Attachment
      Ah, OK, now I understand. Thanks!
      Ania.

      --- In ydn-javascript@yahoogroups.com, Dav Glass <davglass@...> wrote:
      >
      > aniad --
      >
      > Center unit's don't support height and width (since they are dynamically
      > sized) that means that minHeight and minWidth don't get checked either.
      > http://developer.yahoo.com/yui/layout/#configunit
      >
      > Dav
      >
      > --
      > Dav Glass
      > davglass@...
      > blog.davglass.com
      >
      >
      > + Windows: n. - The most successful computer virus, ever. +
      > + A computer without a Microsoft operating system is like a dog
      > without bricks tied to its head +
      > + A Microsoft Certified Systems Engineer is to computing what a
      > McDonalds Certified Food Specialist is to fine cuisine +
      >
      >
      > On Fri, Jan 30, 2009 at 3:42 PM, aniad <aniad@...> wrote:
      >
      > > Hi Dav,
      > >
      > > I was under an impression that if I have a layout with two units,
      > > center and bottom, and I set minHeight on the center then I do not
      > > need to set maxHeight on the bottom as the bottom's maxHeight will be
      > > implicitly determined by the minHeight of the center which I
      > > explicitly set.
      > >
      > >
      > > Ania.
      > >
      > > --- In ydn-javascript@yahoogroups.com
      <ydn-javascript%40yahoogroups.com>,
      > > Dav Glass <davglass@> wrote:
      > > >
      > > > Ania --
      > > >
      > > > minHeight means minimum height, so you need both to do what you
      want ;)
      > > >
      > > > You can, however, listen to the layout's beforeResize event and
      set the
      > > > height's to what you want.
      > > >
      > > > This example does that:
      > > > http://developer.yahoo.com/yui/examples/layout/grids_layout.html
      > > >
      > > > Dav
      > > >
      > > > --
      > > > Dav Glass
      > > > davglass@
      > > > blog.davglass.com
      > > >
      > > >
      > > > + Windows: n. - The most successful computer virus, ever. +
      > > > + A computer without a Microsoft operating system is like a dog
      > > > without bricks tied to its head +
      > > > + A Microsoft Certified Systems Engineer is to computing what a
      > > > McDonalds Certified Food Specialist is to fine cuisine +
      > > >
      > > >
      > > > On Fri, Jan 30, 2009 at 12:11 PM, aniad <aniad@> wrote:
      > > >
      > > > > I guess my question is whether this can be done by just specifying
      > > > > minHeight on units w/o specifying maxHeight. The intend is that if
      > > > > the user resizes the window the minHeight is still true,
      whereas the
      > > > > maxHeight may want to get smaller/bigger.
      > > > >
      > > > > I've tried, in the example mentioned, specifying just
      minHeight on the
      > > > > bottom unit, but as I've mentioned, it still allowed me to
      create the
      > > > > weird state.
      > > > >
      > > > > Ania.
      > > > >
      > > > >
      > > > > --- In
      ydn-javascript@yahoogroups.com<ydn-javascript%40yahoogroups.com>
      > > <ydn-javascript%40yahoogroups.com>,
      > >
      > > > > "aniad" <aniad@> wrote:
      > > > > >
      > > > > > Thank you Dav. I did experiment with those attributes, but I'm
      > > > > > somewhat confused by the use of min/max values.
      > > > > >
      > > > > > I tried this:
      > > > > > Event.onDOMReady(function() {
      > > > > > var layout = new YAHOO.widget.Layout({
      > > > > > units: [
      > > > > > { position: 'top', height: 80, body: 'top1',
      > > > > > minHeight: 80},
      > > > > > { position: 'right',width: 300, body: 'right1' },
      > > > > > { position: 'bottom', height: 50, body: 'bottom1',
      > > > > > resize: true },
      > > > > > { position: 'left', width: 300, body: 'left1' },
      > > > > > { position: 'center', body: 'center1', minHeight: 100 }
      > > > > > ]
      > > > > > });
      > > > > >
      > > > > > But with that I could still make the bottom unit
      "disappear". I only
      > > > > > want to specify the minimum heights, not maximum as what I
      have is a
      > > > > > full page nested layout, and the maximums depend on user's
      > > > > > monitor/resolution.
      > > > > >
      > > > > > So, in my code I have an outter-layout which has top,
      center, right
      > > > > > and left units. Then the inner-layout which sits in the outter's
      > > > > > center unit has a center (center2) and bottom. I want to only
      > > specify
      > > > > > the minHeight for center2, yet specifying just that still allows
      > > me to
      > > > > > drag bottom over center2 and into oblivion.
      > > > > >
      > > > > > Any help will be appreciated,
      > > > > > Ania.
      > > > > >
      > > > > >
      > > > > >
      > > > > > --- In
      ydn-javascript@yahoogroups.com<ydn-javascript%40yahoogroups.com>
      > > <ydn-javascript%40yahoogroups.com>,
      > >
      > > > > Dav Glass <davglass@> wrote:
      > > > > > >
      > > > > > > Aniad --
      > > > > > >
      > > > > > > Those examples do not have the min/maxHeight and min/maxWidth
      > > set for
      > > > > > > simplicity sake.
      > > > > > >
      > > > > > > You can add them to the unit configs to keep them from doing
      > > that..
      > > > > > >
      > > > > > > Dav
      > > > > > >
      > > > > > > --
      > > > > > > Dav Glass
      > > > > > > davglass@
      > > > > > > blog.davglass.com
      > > > > > >
      > > > > > >
      > > > > > > + Windows: n. - The most successful computer virus, ever. +
      > > > > > > + A computer without a Microsoft operating system is like
      a dog
      > > > > > > without bricks tied to its head +
      > > > > > > + A Microsoft Certified Systems Engineer is to computing
      what a
      > > > > > > McDonalds Certified Food Specialist is to fine cuisine +
      > > > > > >
      > > > > > >
      > > > > > > On Thu, Jan 29, 2009 at 2:03 PM, aniad <aniad@> wrote:
      > > > > > >
      > > > > > > > When creating a layout with a menu in top unit and a
      resizable
      > > > > > bottom
      > > > > > > > unit, the resize bar/handle of the bottom unit is
      allowed to be
      > > > > > > > dragged "underneath" the top unit and onto the browser's
      tool
      > > > > bar and
      > > > > > > > off the screen. Letting go at that point creates a weird
      > > state where
      > > > > > > > the bottom unit's resize handle can never be seen again
      (nor the
      > > > > > > > center unit above it).
      > > > > > > >
      > > > > > > > This problem can be demonstrated by taking Dav's example of
      > > `menu in
      > > > > > > > top unit' http://blog.davglass.com/files/yui/layout8/ and
      > > > > modifying it
      > > > > > > > so that the `bottom' unit has `resize: true' on it.
      > > > > > > >
      > > > > > > > Please advise how to constrain the bottom unit's resize.
      > > > > > > >
      > > > > > > > Ania.
      > > > > > > >
      > > > > > > >
      > > > > > > >
      > > > > > >
      > > > > >
      > > > >
      > > > >
      > > > >
      > > >
      > >
      > >
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.