-
Notifications
You must be signed in to change notification settings - Fork 0
Positionobject
A position object is a map containing dimension-value key-value pairs. The dimensions used depend on the renderer being used. The default SVG renderer uses 2D Cartesian coordinates (i.e. x and y):
var position = {
x: 100,
y: 200
};A position object may be used in one of two contexts, a model position or a rendered position. Unless specifically labelled as "rendered position", a position is implicitly a model position.
A model position denotes position in the Cytoscape Web model. A model position stays the same even when the view of the graph is changed by panning or zooming, for example.
A rendered position denotes an on-screen position. A rendered position is dependent on the view of the graph. For example, a node at the top-left of the Cytoscape Web view may be at rendered position (0, 0). After panning, however, the rendered position would have changed — no longer residing at rendered position (0, 0).