So far I've been able to figure out only how to set boxes on a certain
distance from the top and the left edge of the container.
Also, is there a way to specify the width of a box in percent ?
But once again. Positioning is set via rect and anchors attrs.
1. rect defines initial position. it has the following format: "left top width height". Everything in pixels.
So to move your box to right bottom you just have to increase left and top properties
2. anchors specify how you box will react to its parent resize. Set anchors to "bottom right" and your box will move with the bottom right corner.
3. There's a special second parameter to attachTo method which specifies initial dom/window size.
Example
uki(...).attachTo(window, '1000 1000')
This means that you expect the window to be 1000px x 1000px. And if it's not all the attached views will be resized according to anchors rules.
> --
> To unsubscribe, reply using "remove me" as the subject.
Vladimir Kolesnikov
twitter.com/voloko
vol...@gmail.com
I want a 300x100 box to be positioned 10 px from the bottom of the
window and 10px from the right of the window. I can do this:
uki({ view: "box", rect: "690 890 300 100", anchors: "bottom
right" }).attachTo( window, 1000, 1000 );
No matter my screen resolution or the size of the window when I first
open the page, Uki will compensate for the difference (i.e. subtract
the actual window size from the supplied size) and place it where I
intended ?
Vladimir Kolesnikov
twitter.com/voloko
vol...@gmail.com