[Seaside] Incorrect position en JQDialog

Gastón Dall' Oglio gaston.dalloglio at gmail.com
Tue Feb 21 01:07:53 UTC 2012


Thanks Johan.

Regards.


El 20 de febrero de 2012 12:29, Johan Brichau <johan at inceptive.be> escribió:

> Gaston,
>
> You are right... the top,left attributes are mapped as follows:
> top -> x
> left -> y
>
> It makes more sense to map them as:
>
> top -> y
> left -> x
>
> I just ran into the same issue last week.
>
> In my opinion it's a bug and I created an issue:
> http://code.google.com/p/seaside/issues/detail?id=715
>
> Let's see what the core dev team thinks first ;-)
>
> Johan
>
> On 18 Feb 2012, at 15:42, Gastón Dall' Oglio wrote:
>
> > I look at JQDialog API and I see that left at top that say in position:
> method is fine:
> > http://docs.jquery.com/UI/Dialog#option-position
> >
> > Maybe the callbacks are bad for position?
> >
> >
> > El 18 de febrero de 2012 11:16, Gastón Dall' Oglio <
> gaston.dalloglio at gmail.com> escribió:
> > ... I forget to send width: and height: to dialog in last code:
> >
> > script: (html jQuery new dialog
> >           position: position;
> >           width: width;
> >           height: height;
> >     ......
> >
> >
> > El 18 de febrero de 2012 11:10, Gastón Dall' Oglio <
> gaston.dalloglio at gmail.com> escribió:
> >
> > Hi all.
> >
> > I guess that the JQWDialog is inconsistent informing the position of
> dialog in position: and onDragStop: methods.
> > I check in Seaside-3.0.6-OneClick and
> http://jenkins.lukas-renggli.ch/job/Seaside%203.0/lastSuccessfulBuild/artifact/Seaside-3.0-OneClick.zip
> >
> > To reproduce the problem:
> >
> > 1) Add position instance variable to JQUiFunctionalTest and modify
> >>renderWindowOn: to look like this :
> >
> > script: (html jQuery new dialog
> >          position: position;      "line added"
> >          onDragStop: (html jQuery ajax callbackDraggable: [ :event |
>   " line added"
> >          position := (event at: #position). position inspect ]);
>   "line added"
> >          title: 'Vegetables';
> >          autoOpen: false;
> >          addButton: 'Close' do: html jQuery new dialog close);
> >         with: [ html unorderedList list: self vegetables ].
> >
> > 2) Go to http://localhost:8080/javascript/jquery-ui/dialogwidget
> > 3) Press button Open Window and move de Dialog to bottom-left corner.
> > 4) Refresh the page and press again button Open Window
> >
> > The dialog show with de left-top attributes changed each other.
> >
> > If you see the position in inspector that is opened when drag stop, the
> callbackDraggable: inform top at left, but in the comment of
> JQDialog>>position: method say that left at top are expected as parameter:
> > " 2) an array containing an x,y coordinate pair in pixel offset from
> left, top corner of viewport (e.g. [350,100]) "
> >
> > The fact, if you change the coordinates of position with transposed the
> problem is solved:
> > onDragStop: (html jQuery ajax callbackDraggable: [ :event |
> >          position := (event at: #position) transposed. position inspect
> ]);
> >
> > And the same problema in onResizeStop with the position (I have split
> the coordinates for size). Add width and height ivars and next code for
> reproduce problem:
> > onResizeStop: (html jQuery ajax callbackResizable: [ :event |
> >           position := event at: #position.
> >           width := (event at: #size) x.
> >           height := (event at: #size) y ]);
> >
> > Regards.
> >
> >
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120220/8f9e73ca/attachment.htm


More information about the seaside mailing list