Marc Hughes

I am a developer from a bit west of Boston.

ObjectHandles - Multiple Selection and Decorators

06 Dec 2009

I've been playing around with a few things in ObjectHandles today. The first is multiple-selection. Last week Vlad Janvarev sent me a patch that got it working for non-rotated objects. I put that in, and spent most of my day today figuring out how to extend it to rotated objects as well (dealing with 3 coordinate spaces at once makes my head hurt!). To try it, press the shift key and select multiple objects on the screen, then you can move, rotate or resize them as a whole.
[kml_flashembed fversion="10.0.0" movie="" targetclass="flashmovie" publishmethod="static" width="720" height="600" fvars="undefined"]Get Adobe Flash player

View-Source is enabled in it.

It's not working 100%, and I'm not sure why. If anyone has any ideas, let me know. The broken part is if you rotate 2 objects, then select them both, then resize them really small. At some point they sometimes start getting bigger instead of smaller depending on the rotation. I'm baffled.

The second thing I played with is the idea of "Decorators" that can draw interesting info based on the state of the set of objects either being moved or currently selected. There's a quick screenshot of a sample one I did below.

This is also in the link above under "Example 8". This is just a proof of concept for now. If you want to try it, do it before trying the multi-select since the multi-select can leave objects on fractional pixel boundries which won't line up perfectly.

Neither of these is ready for prime-time yet. The multi-select stuff is creating tons and tons of temporary objects so the GC kicks in periodically freezing the interface. That'll need a little optimization.