- Framework to build an Editor or Visualizer
- No dependencies / no bloatware
- Elements: Panels, sockets and wires
- Configure: Many customizable options & parameters
- Rendering
- SVG
- CSS animations
- Automatic layout inside panels (depending on text width)
- Force layout and overlap avoidance between panels
- Mouse controls
- Touch event handlers for mobile use
- Move panels
- Drag / draw wires
- Selection: Click, Shift Invert, Box
- Keyboard controls
- Enter: Use / Activate
- Backspace: Delete
- Meta (+ Shift) + Z: Undo & Redo
- Meta + A: Select all panels
- Wire
- Panel
- Socket
- WireDragCallback
- WireConnectCallback
- ActivateCallback
- RemoveCallback
- CopyCallback
- PasteCallback
- WiredPanels
Type: Object
typestring ='wire'
Type: Object
Type: Object
Type: Function
socketSocket
Returns boolean true if drag action should start
Type: Function
Returns boolean true if connect action should succeed
Type: Function
selectionSet
Type: Function
selectionSet wires and panels to be removed
Returns void
Type: Function
clipboardDataObject
Returns boolean true if data was copied
Type: Function
clipboardDataObject
Returns boolean true if data was accepted and can be pasted
Container holding the graph of panels and wires
configObject (optional, default{})config.socketRadiusnumberconfig.verticalSocketsOutsidebooleanconfig.horizontalSocketsOutsidebooleanconfig.wireStylestringconfig.panelCornerRadiusnumberconfig.panelPaddingnumberconfig.panelMarginnumberconfig.springLengthnumberconfig.springStiffnessnumberconfig.panelCollisionbooleanconfig.borderCollisionbooleanconfig.undoActionLimitnumber number of actions that can be undone
eventListenersObject (optional, default{})eventListeners.wireDragWireDragCallbackeventListeners.wireConnectWireConnectCallbackeventListeners.activateActivateCallbackeventListeners.removeRemoveCallbackeventListeners.copyCopyCallbackeventListeners.pastePasteCallback
Create a new wire
wireObject skeleton wire (optional, default{})
Returns Wire wire
Create a new panel
panelObject skeleton panel (optional, default{})
Returns Panel panel
Create a new socket
socketObject skeleton socket (optional, default{})
Returns Socket socket
panelPanel
panelPanel
Try online with source code