[Seaside] Re: Incorrect position en JQDialog

Gastón Dall' Oglio gaston.dalloglio at gmail.com
Sat Feb 18 14:42:13 UTC 2012


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.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20120218/abf56537/attachment.htm


More information about the seaside mailing list