Layers

Donec sed odio dui. Aenean lacinia bibendum nulla sed consectetur. Nullam id dolor id nibh ultricies vehicula ut id elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.

Instance Functions

Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit sit amet non magna. Nullam id dolor id nibh ultricies vehicula ut id elit.

Instance Properties

Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec id elit non mi porta gravida at eget metus. Maecenas sed diam eget risus varius blandit sit amet non magna. Nullam id dolor id nibh ultricies vehicula ut id elit.

Moving Objects to Other Layers

Currently, the scripting implementation in OmniGraffle does not offer commands for merging layers or for moving objects between layers. However, because references ot objects are based on the unique value of their id property, you can use the orderAbove() and orderBelow() methods from the Graphic class to move objects between the layers of a canvas.

For example, in the OmniGraffle document pictured below, there are three objects, each on its own layer. You can use the orderAbove() method to move them to the top layer while maintaining their stacking relationship.

layers-00
cnvs = document.windows[0].selection.canvas g0 = cnvs.layers[0].graphics[0] // diamond g1 = cnvs.layers[1].graphics[0] // circle g2 = cnvs.layers[2].graphics[0] // square g2.orderAbove(g0) // move square above diamond g1.orderAbove(g2) // move circle above square g0.orderAbove(g1) // move diamond above circle
layers-01

Alternatively, you can use the orderBelow() method to move the three objects to the bottom layer while maintaining their stacking relationship.

cnvs = document.windows[0].selection.canvas g0 = cnvs.layers[0].graphics[0] // diamond g1 = cnvs.layers[1].graphics[0] // circle g2 = cnvs.layers[2].graphics[0] // square g1.orderBelow(g2) // move circle below square g0.orderBelow(g2) // move diamond below sqaure g2.orderBelow(g1) // move square below circle
layers-02
UNDER CONSTRUCTION

This webpage is in the process of being developed. Any content may change and may not be accurate or complete at this time.

DISCLAIMER