Options
Axis Options
range
The range of coordinate.
x: {
range: [0, width],
},
y: {
range: [0, height],
},
x: {
range: [0, width / 2],
},
y: {
range: [0, height / 2],
},
bounce
The size of bouncing area. The coordinates can exceed the coordinate area as much as the bouncing area based on user action. If the coordinates does not exceed the bouncing area when an element is dragged, the coordinates where bouncing effects are applied are retuned back into the coordinate area.
x: {
bounce: 10,
},
y: {
bounce: 10,
},
x: {
bounce: 20,
},
y: {
bounce: 20,
},
circular
Indicates whether a circular element is available. If it is set to "true" and an element is dragged outside the coordinate area, the element will appear on the other side.
x: {
circular: false,
},
y: {
circular: false,
},
x: {
circular: true,
},
y: {
circular: true,
},
startPos
The coordinates to be moved when creating an instance.
x: {
startPos: 0,
},
y: {
startPos: 60,
},
x: {
startPos: 100,
},
y: {
startPos: 60,
},
Axes Options
easing
The easing function to apply to an animation.
easing: x => 1 - Math.pow(1 - x, 3)
easing: x => x
maximumDuration
Maximum duration of the animation. (milisecond)
maximumDuration: 5000
maximumDuration: 500
minimumDuration
Minimum duration of the animation. (milisecond)
minimumDuration: 0
minimumDuration: 2000
deceleration
Deceleration of the animation where acceleration is manually enabled by user. A higher value indicates shorter running time.
deceleration: 0.0006
deceleration: 0.0015
interruptable
Indicates whether an animation is interruptible.
- true: It can be paused or stopped by user action or the API.
- false: It cannot be paused or stopped by user action or the API while it is running.
interruptable: true
interruptable: false
round
Rounding unit. For example, 0.1 rounds to 0.1 decimal point(6.1234 => 6.1), 5 rounds to 5 (93 => 95)
round: 1
round: 20
nested
Whether the event propagates to other instances when the coordinates reach the end of the movable area.
nested: false
nested: true
PanInput Options
scale
Coordinate scale that a user can move.
scale: [1, 1]
scale: [3, 3]
inputType
Types of input devices.
- touch: Touch screen
- mouse: Mouse
- pointer: Mouse and touch
inputType: ["mouse"]
inputType: ["touch"]
inputKey
List of key combinations to allow input
- any: any key
- shift: shift key
- ctrl: ctrl key and pinch gesture on the trackpad
- alt: alt key
- meta: meta key
- none: none of these keys are pressed
inputKey: ["any"]
inputKey: ["ctrl"]
inputButton
List of buttons to allow input.
- left: Left mouse button and normal touch
- middle: Mouse wheel press
- right: Right mouse button
inputButton: ["left", "right"]
inputButton: ["right"]
thresholdAngle
The threshold value that determines whether user action is horizontal or vertical (0~90).
info
Hint: These examples only have a x-axis. Try using the input direction similar to y-axis.
thresholdAngle: 15
thresholdAngle: 75
threshold
Minimal pan distance required before recognizing.
threshold: 0
threshold: 30
preventClickOnDrag
Whether to cancel the click event when the user finishes dragging more than 1 pixel.
preventClickOnDrag: false
preventClickOnDrag: true
preventDefaultOnDrag
Whether to use the preventDefault when the user starts dragging.
info
Hint: These examples only have a x-axis. Try using the input direction similar to y-axis.
preventDefaultOnDrag: false
preventDefaultOnDrag: true
iOSEdgeSwipeThreshold
Area (px) that can go to the next page when swiping the right edge in iOS safari.
iOSEdgeSwipeThreshold: 30
iOSEdgeSwipeThreshold: 120
releaseOnScroll
Whether to release input when a native event with cancelable: false
occurs while user input.
releaseOnScroll: false
releaseOnScroll: true
touchAction
Value that overrides the element's "touch-action" css property. If set to null, it is automatically set to prevent scrolling in the direction of the connected axis.
info
Hint: These examples only have a x-axis. Try using the input direction similar to y-axis in mobile device.
touchAction: "none"
touchAction: "pan-y"
WheelInput Options
inputKey
List of key combinations to allow input
- any: any key
- shift: shift key
- ctrl: ctrl key and pinch gesture on the trackpad
- alt: alt key
- meta: meta key
- none: none of these keys are pressed
inputKey: ["any"]
inputKey: ["ctrl"]
scale
Coordinate scale that a user can move.
scale: 5
scale: 20
releaseDelay
Millisecond that trigger release event after last input.
releaseDelay: 300
releaseDelay: 2000
useAnimation
Whether to process coordinate changes through the mouse wheel as a continuous animation.
useAnimation: false
useAnimation: true
MoveKeyInput Options
scale
Coordinate scale that a user can move.
scale: [5, -5]
scale: [20, -20]
PinchInput Options
info
Hint: You can compare the action of PinchInput on mobile device.
scale
Coordinate scale that a user can move.
scale: 4
scale: 10
threshold
Minimal scale before recognizing.
threshold: 0
threshold: 5
inputType
Types of input devices
- touch: Touch screen
- pointer: Mouse and touch
inputType: ["touch"]
inputType: ["touch", "pointer"]
touchAction
Value that overrides the element's "touch-action" css property. It is set to "none" to prevent scrolling during touch.
touchAction: "none"
touchAction: "pan-y"