Ajax Bestiary: A Javascript Field Guide
 
Ajax Bestiary: A Javascript Field Guide
 
 

Handling Space & Dimensions with Dojo & Spry

Posted by Don Albrecht

I may be looking in the wrong place.  But I haven’t been able to find any dimension & spatial capabilities in either Dojo 1.0 or the Spry framework.  If anyone knows how to determine xy positions of page elements using either of these toolkits, please leave your comments below.


4 Comments

  • In dojo._base.html:
    dojo.coords = function(node, includeScroll)
    returns an margin box width/height, the top/left values, and absolute positioning
    ex: { l: 50, t: 200, w: 300: h: 150, x: 100, y: 300 }

    Absolute positioning comes from dojo._abs(node)

    Cheers

  • Thanks! I guess I just haven’t dug into the docs deep enough.

  • [...] = “34d024″; var mooter_wrapper_url=”"; var run_method = “onload”; var mooter_target = “0″; Handling Space & Dimensions with Dojo & Sp… saved by 21 others     godmugen bookmarked on 01/15/08 | [...]

  • I’ve wasted with dojo last 5 months. What a crap. Dojo widgets are full of bugs, which are pain in the ass, when you designing more sophisticated web application.
    So take this as good advice an stay away of dojo. Use jQuery or MooTools instead and save days of yout life.

Leave a Reply