Align:
Rotate:
Arrow Mode: Move Select Scroll Tree

This example demonstrates a custom CommandHandler. It allows the user to position selected Parts in a diagram relative to each other, overrides CommandHandler.doKeyDown to allow handling the arrow keys in additional manners, and uses a "paste offset" so that pasting objects will cascade them rather than place them on top of one another. It is defined in its own file, as DrawCommandHandler.js.

The above buttons can be used to align Parts, rotate Parts, or change the behavior of the arrow keys.

Usage can also be seen in the BPMN Editor sample.

加入 GoJS 交流群
GoJS 交流群 (769862113)