Hi Adrian, This seems to do the swapping trick ;=))
if(box_extents.length==4) { var tmp; if (box_extents[0] > box_extents[2]) { tmp = box_extents[0]; box_extents[0] = box_extents[2]; box_extents[2] = tmp; } if (box_extents[1] > box_extents[3]) { tmp = box_extents[1]; box_extents[1] = box_extents[3]; box_extents[3] = tmp; } Now I get a bounding box drawn no matter what order, location I click in first, second... Cheers, Geoff. ------------------------------------------------------------------------------ Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex infrastructure or vast IT resources to deliver seamless, secure access to virtual desktops. With this all-in-one solution, easily deploy virtual desktops for less than the cost of PCs and save 60% on VDI infrastructure costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel