intel / rib

Rapid Interface Builder (RIB) is a browser-based design tool for quickly prototyping and creating the user interface for web applications. Layout your UI by dropping widgets onto a canvas. Run the UI in an interactive "Preview mode". Export the generated HTML and Javascript. It's that simple!
https://01.org/rib
Apache License 2.0
148 stars 74 forks source link

[ADM] Select related item after undo, redo and fix a bug about can't undo using double click #224

Closed DonnaWuDongxia closed 12 years ago

DonnaWuDongxia commented 12 years ago

updated!

grgustaf commented 12 years ago

I found a few minor bugs and added an extra patch. Dragging a widget from the palette into a Button Group, then undo/redo, it would not be properly selected.

Also, moving a node caused a selection glitch where you'd see it flicker on an intermediate element, because the move does a remove and then an insert. I realized that we had recently add ADM.setSelected() calls inside the ADMNode removeChildFromZone function... this is incorrect, because selection is a concept ADM adds on top of ADMNodes, they're not supposed to know about it. This would have prevented us from someday allowing multiple ADMs to coexist. (There are a couple other minor bugs of the same nature I didn't address.)

Finally, I put in a line to clear any outstanding selectionChanged events when a new one is fired, like we do for activePageChanged. This should just cut down on some useless code.