package interactjs
- Alphabetic
- By Inheritance
- interactjs
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- trait AbsoluteRect extends Object
- Annotations
- @JSType()
- trait ActionOptions extends Object with RestrictAble with InertiaAble
- Annotations
- @JSType()
- trait AutoScrollAble extends Object
Scroll a container (window or an HTMLElement) when a drag or resize move happens at the edge of the container.
Scroll a container (window or an HTMLElement) when a drag or resize move happens at the edge of the container.
- Annotations
- @JSType()
- trait AutoScrollOptions extends Object
Scroll a container (window or an HTMLElement) when a drag or resize move happens at the edge of the container.
Scroll a container (window or an HTMLElement) when a drag or resize move happens at the edge of the container.
- Annotations
- @JSType()
- trait DragEvent extends Object with InteractEvent
- Annotations
- @JSType() @native()
- trait DraggableOptions extends Object with ActionOptions with RestrictAble with InertiaAble with AutoScrollAble
- Annotations
- @JSType()
- trait DropEvent extends Object
Dropzones can receive the following events: dropactivate, dropdeactivate, dragenter, dragleave, dropmove, drop.
Dropzones can receive the following events: dropactivate, dropdeactivate, dragenter, dragleave, dropmove, drop.
The dropzone events are plain objects with the following properties:
- Annotations
- @JSType() @native()
- trait DropzoneOptions extends Object with ActionOptions
- Annotations
- @JSType()
- trait GesturableOptions extends Object with ActionOptions with RestrictAble
- Annotations
- @JSType()
- trait GestureEvent extends Object with InteractEvent
- Annotations
- @JSType() @native()
- trait InertiaAble extends Object
Inertia allows drag and resize actions to continue after the user releases the pointer at a fast enough speed.
Inertia allows drag and resize actions to continue after the user releases the pointer at a fast enough speed. The required launch speed, end speed and resistance can optionally be configured with the settings below.
If an action ends without inertia but is snapped or restricted with the endOnly option, then the the coordinates are interpolated from the end coords to the snapped/restricted coords.
- Annotations
- @JSType()
- trait InertiaOptions extends Object
Inertia allows drag and resize actions to continue after the user releases the pointer at a fast enough speed.
Inertia allows drag and resize actions to continue after the user releases the pointer at a fast enough speed. The required launch speed, end speed and resistance can optionally be configured with the settings below.
If an action ends without inertia but is snapped or restricted with the endOnly option, then the the coordinates are interpolated from the end coords to the snapped/restricted coords.
- Annotations
- @JSType()
- trait InteractEvent extends Object
The InteractEvent types are: Draggable: dragstart, dragmove, draginertiastart, dragend Resizable: resizestart, resizemove, resizeinertiastart, resizeend Gesturable: gesturestart, gesturemove, gestureend
The InteractEvent types are: Draggable: dragstart, dragmove, draginertiastart, dragend Resizable: resizestart, resizemove, resizeinertiastart, resizeend Gesturable: gesturestart, gesturemove, gestureend
To respond to InteractEvents, you must add listeners for the event types either directly on an interactable or globally for all events of those types on the interact object.
The event object that was created is passed to these functions as the first parameter.
InteractEvent properties include the usual properties of mouse/touch events such as pageX/Y, clientX/Y, modifier keys etc. But also some properties providing information about the change in coordinates and event specific data. The table below displays all of these events.
- Annotations
- @JSType() @native()
- trait InteractJSOptions extends Object
- Annotations
- @JSType()
- trait InteractJSStatic extends Object
- Annotations
- @JSType() @native()
- trait Interactable extends Object
- Annotations
- @JSType() @native()
- trait Point extends Object
- Annotations
- @JSType()
- trait PointerEvent extends Object
- Annotations
- @JSType() @native()
- trait PointerEventOptions extends Object
- Annotations
- @JSType()
- trait RelativeRect extends Object
- Annotations
- @JSType()
- trait ResizableEdgesOptions extends AnyRef
- trait ResizableOptions extends Object with ActionOptions with RestrictAble with InertiaAble with AutoScrollAble
- Annotations
- @JSType()
- trait ResizeEvent extends Object with InteractEvent
- Annotations
- @JSType() @native()
- trait RestrictAble extends Object
Drags, resizes and gestures can be restricted to a certain areas using one of 3 variations of action restriction: - pointer coordinate-based restrict - element size-based restrictSize (resize only) - and element edge-based restrictEdges (resize only)
Drags, resizes and gestures can be restricted to a certain areas using one of 3 variations of action restriction: - pointer coordinate-based restrict - element size-based restrictSize (resize only) - and element edge-based restrictEdges (resize only)
- Annotations
- @JSType()
- trait RestrictOptions extends Object
Drags, resizes and gestures can be restricted to a certain areas using one of 3 variations of action restriction: - pointer coordinate-based restrict - element size-based restrictSize (resize only) - and element edge-based restrictEdges (resize only)
Drags, resizes and gestures can be restricted to a certain areas using one of 3 variations of action restriction: - pointer coordinate-based restrict - element size-based restrictSize (resize only) - and element edge-based restrictEdges (resize only)
- Annotations
- @JSType()
- trait SnapGridOptions extends Object with SnapTarget
- Annotations
- @JSType()
- trait SnapOptions extends Object
Using the snap option while dragging, The coordinates of the pointer that the drag event listeners receive will be modified to meet the coordinates of the snap targets.
Using the snap option while dragging, The coordinates of the pointer that the drag event listeners receive will be modified to meet the coordinates of the snap targets. This option can also be used with resizable targets, but may not yield intuitive results. The snapSize option is specifically for snapping the dimensions of targets when resizing. With both snap and snapSize, the snapping targets is an array of objects and functions. There are more options listed below.
- Annotations
- @JSType()
- trait SnapTarget extends Object with Point
- Annotations
- @JSType()
- sealed trait SnapTargetGrid extends Any
- Annotations
- @JSType()
Value Members
- lazy val interact: InteractJSStatic
- object InteractJsModule extends Object with InteractJSStatic
- Annotations
- @native() @JSImport("interactjs", JSImport.Namespace)