sorting - the sorting type to use when rendering the views in this paper (i.e.
In what order should the views be rendered?).
The SVG 1.1 format does not have built-in z-index functionality, so JointJS implements it programmatically. You can set the z-index directly using using regular Backbone
get('z') methods or through
link.toBack() methods. See the element Z documentation for more information.
The Paper object exposes a
sorting object with three values that may be used as values of this option:
joint.dia.Paper.sorting.EXACT- (default) render views in exactly the same order as reported by
graph.getCells()(views with different z-values are rendered in order, and views with the same z-value are rendered in the order in which they were added). This is by far the slowest option, present mainly for backwards compatibility.
joint.dia.Paper.sorting.APPROX- render views according to their z-values. Views with different z-value are rendered in order, but the ordering of views with the same z-value is indeterminate. Similar in functionality to the
EXACToption, but much faster.
joint.dia.Paper.sorting.NONE- render views in an indeterminate order. (Note that this setting disables all
toBackfunctions mentioned above.)