[Seaside] Incorrect position en JQDialog

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


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/be0dc2c6/attachment.htm


More information about the seaside mailing list