position ⇒ WeavyWidget.plugins.position

Collapsing dock and drag'n'drop positioning

Kind: global mixin

Instance members

widget.nodes ⇐ nodes

The nodes placeholder in WeavyWidget

Kind: instance property of position
Extends: nodes

widget.nodes.hiddenDragImage : Element

The element used for hiding default visual representation when dragging.

Kind: instance property of nodes
Created: Widget event: load

widget.collapse()

Set collapsed widget, which is a compact visual representation of the full dock.

Kind: instance method of position
Emits: collapse

widget.minimize()

Set minimized widget, which is a mimial visual representation of the dock only containing a small floating button. If the dock is in normal state it will also trigger collapse.

Kind: instance method of position
Emits: collapse , minimize

widget.restore()

Unset collapse/minimize states and return to normal dock mode.

Kind: instance method of position

Events

"collapse"

Triggered when the dock is collapsed.

Kind: event emitted by position
Category: events

"minimize"

Triggered when the dock is minimized.

Kind: event emitted by position
Category: events

"restore"

Triggered when the moduel:dock leaves collapse/minimize states and returns to normal state.

Kind: event emitted by position
Category: events

Static members

position.defaults : Object

Default plugin options

Kind: static property of position
Properties
NameTypeDefaultDescription
positionClassNamestring "weavy-collapsed"

Classname added to widget.nodes.container at load.

snappingXint 4

Horizontal snapping in rem when dragging

snappingYint 4

Vertical snapping in rem when dragging

minimizeDelayint 15000

Time before the widget is automatically minimized

Example
WeavyWidget.plugins.position.defaults = {
    positionClassName: 'weavy-collapsed',
    snappingX: 4,
    snappingY: 4,
    minimizeDelay: 15000
};

position.dependencies : Array.<string>

Non-optional dependencies.

Kind: static property of position