Skip to contents

build Interact Option

Usage

buildIOptions(
  minZoom = 1e-50,
  maxZoom = 1e+50,
  zoomingEnabled = TRUE,
  userZoomingEnabled = TRUE,
  panningEnabled = TRUE,
  userPanningEnabled = TRUE,
  boxSelectionEnabled = TRUE,
  selectionType = "single",
  autolock = FALSE,
  autoungrabify = FALSE,
  autounselectify = FALSE
)

Arguments

minZoom

Minimal zoom level of canvas. [numeric]

maxZoom

Maximal zoom level of canvas. [numeric]

zoomingEnabled

Whether canvas can zoom or not. by both user event and programmatically. [logical]

userZoomingEnabled

Whether canvas can zoom or not. by user event. [logical]

panningEnabled

Whether canvas can move or not. by both user event and programmatically. [logical]

userPanningEnabled

Whether canvas can move or not. by user event. [logical]

boxSelectionEnabled

Whether box selection by drag available [logical]

selectionType

Indicate selection by user input is additive or single(default). ['single' or 'additive']

autolock

Whether nodes should be locked (not draggable at all) by default (if true, overrides individual node state). [logical]

autoungrabify

Whether nodes should be ungrabified (not grabbable by user) by default (if true, overrides individual node state). [logical]

autounselectify

Whether nodes should be unselectified (immutable selection state) by default (if true, overrides individual element state). [logical]

Value

List typed Interact Option for Cytoscape.js canvas object.

Details

undescribed parameter will set as default. note that touchTapThreshold & desktopTapThreshold were not used.

See also

https://js.cytoscape.org/#core/initialisation

Examples

iopt <- buildIOptions(
  minZoom = 0.001, maxZoom = 3, zoomingEnabled = TRUE,
  userZoomingEnabled = FALSE, panningEnabled = TRUE, userPanningEnabled = TRUE,
  boxSelectionEnabled = FALSE, selectionType = "single", autolock = FALSE,
  autoungrabify = TRUE, autounselectify = FALSE
)