Optional addOptional autoWhether or not to automatically exit from 'select' mode after a lasso operation. A future version of the Toolkit will move this flag into the lasso plugin.
Optional clampWhether or not to limit the canvas movement when dragging or zooming so that some part of the dataset is always visible. Defaults to true.
Optional clampWhen a background is in use, whether or not to clamp movement of the canvas so that some portion of the background is always visible.
Optional clampWhen a background is in use, whether or not to clamp movement of the canvas so that the entire background is always visible.
Optional consumeWhether or not to consume right clicks, which ordinarily will cause a browser to show a context menu with some native browser functions. This defaults to true.
Optional debugDefaults to false. When true, the Surface will console log a few specific pieces of activity in the lifecycle of rendering a vertex.
Optional decoratorsOptional list of decorators to attach to the Surface.
Optional defaultsOptional defaults to use for the underlying renderer.
Optional directDirect rendering is a mode in which the Surface disables pan/zoom, and adjusts its content so that the origin of the content is [0,0]. This mode can be used to embed the Surface into a read only UI (while still maintaining its dynamic connection to the underlying dataset)
Optional dragOptions for dragging vertices.
Optional editableIf true, an EdgePathEditor will be registered on the Surface, with which you can interact via the startEditingPath(..) and stopEditingPath() methods on the Surface.
Optional elementsWhether or not the elements in the Surface should be draggable. Defaults to true.
Optional enableWhether or not to support animation of pan/zoom operations.
Optional enableWhether or not to enable panning of the canvas. Defaults to true.
Optional enhancedDefaults to true, meaning node/group/edge definitions support parameters in their declarations, where the final values at render time are extracted from the data for the object being rendered.
Optional eventsOptional map of handlers for various events generated by the Surface.
Optional event: anyOptional gridOptions for imposing a grid onto the elements in the Surface.
Optional idOptional ID for the Surface. Allows you to retrieve this Surface from a toolkit instance's getRenderer(id) method.
Optional layoutDefines the layout to use.
Optional logicalDefaults to false. When true, if a port is added to a vertex programmatically, the surface treats the vertex's DOM element as the DOM element for the port if it cannot find a specific element for the port.
Optional magnetizeOptions for the magnetize functionality of the Surface.
Optional modeMode to start in. Defaults to 'pan'.
Optional modelOptional map of event handlers. Each entry consists of the event name, a CSS selector to target,
and a callback function. Supplying this is equivalent to calling bindModelEvent(..) on a Surface.
Optional modelDefines the name of the attribute in a given vertex's backing data that provides its height. Defaults to "height". If you have a UI with multiple renderers you can use this parameter to store multiple sets of sizes for a given vertex inside its data.
Optional modelDefines the name of the attribute in a given vertex's backing data that provides its location in the X axis. Defaults to "left". If you have a UI with multiple renderers you can use this parameter to store multiple sets of locations for a given vertex inside its data.
Optional modelDefines the name of the attribute in a given vertex's backing data that provides its location in the Y axis. Defaults to "top". If you have a UI with multiple renderers you can use this parameter to store multiple sets of locations for a given vertex inside its data.
Optional modelDefines the name of the attribute in a given vertex's backing data that provides its width. Defaults to "width". If you have a UI with multiple renderers you can use this parameter to store multiple sets of sizes for a given vertex inside its data.
Optional objectOptional filter that can decide whether or not the Surface renders a specific node or group. By default all nodes and groups in the underlying dataset are rendered.
Optional panOptional function which is called at the start of panning and can return false to reject pan starting.
Optional panOptional, defaults to false. When true, the user must hold down the meta key (ctrl on windows) in order to pan.
Optional pluginsOptional list of plugins to attach to the Surface.
Optional propertyOptional set of mappings from property values to edge definitions.
Optional refreshWhether or not the automatically refresh the layout when model data changes. Defaults to true.
Optional refreshWhen true, the Surface will run a refresh of the underlying layout whenever a new edge is established. This
defaults to false, but you might want to set this to true if you're using the Hierarchical or Hierarchy layouts,
because it has a bearing on the way they paint. However, if your users are able to drag vertices around, you may
not wish for the layout to move things that they have placed, which is why this defaults to false.
Optional relayoutDefaults to false. When true, changes to a group cause the entire surface to perform a relayout.
Optional selectionOptional Selection - or generator - to use as the dataset to render. If you supply this the Surface will render the contents of the selection, or the list of vertices that the given function returns. This is useful for such things as inspector windows for parts of your UI.
Optional shapesOptional shape library that can render SVG shapes into node elements. When you provide a shape library to a surface, two things happen:
jtk-shape tag that your templates can use. The type of each node is used to extract an appropriate SVG shape definition from the shape library.Optional simpleFrom 6.2.0, defaults to true. Prior versions default this flag to false. Instructs the Surface to automatically extract
color, lineWidth, outlineWidth and outlineColor values from the backing data for edges, and to use these to
set the appearance of a connection for that edge.
Optional storeWhether or not to store vertex positions in the middle after running a layout. Defaults to false. A future release of the Toolkit will set this flag to true by default.
Optional templatesWhen using 'vanilla' Toolkit, you can provide a map of templates here rather than including them somewhere in the HTML of the page.
Optional useDefaults to false. When true, newly created nodes are sized according to values in their backing data, using the modelWidthAttribute and modelHeightAttribute as keys.
Optional viewMappings of vertex/edge types to their rendering and behaviour.
Optional wheelOptions for the behaviour of the mousewheel (which also covers two finger scrolling on a mac trackpad)
Optional zoomStarting zoom for the Surface. Defaults to 1.
Optional zoomThe zoom range for the Surface - minimum and maximum values, expressed as decimals. Defaults to [0.05, 3].
Optional zoomIf true, zoom the display so that the dataset is entirely visible after initialisation.
Optional zoomIf true, zoom the display so that the dataset is entirely visible after initialisation, but only adjust the zoom level if the dataset is not already visible at the default zoom level.
When true, vertices that are added to the underlying Toolkit's selection will be added to the current drag selection. Prior to 5.10.2 this flag's true state was the default behaviour, but the flag now defaults to false, and the Surface uses the concept of "drag groups" to manage dragging the set of selected elements together. For more information check out the Toolkit docs, specifically the section on element dragging.