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)
- Annotations
- @JSType()
- Alphabetic
- By Inheritance
- RestrictOptions
- Object
- Any
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- val elementRect: UndefOr[RelativeRect]
With the restrict variant, restricting is by default relative to the pointer coordinates so that the action coordinates, not the element’s dimensions, will be kept within the restriction area.
With the restrict variant, restricting is by default relative to the pointer coordinates so that the action coordinates, not the element’s dimensions, will be kept within the restriction area. The elementRect option changes this so that the element’s edges are considered while dragging.
For the left and right properties, 0 means the left edge of the element and 1 means the right edge. For top and bottom, 0 means the top edge of the element and 1 means the bottom.
{ top: 0.25, left: 0.25, bottom: 0.75, right: 0.75 } would result in a quarter of the element being allowed to hang over the restriction edges.
- Annotations
- @JSOptional()
- val endOnly: UndefOr[Boolean]
The endOnly option is used to restrict just before the end of a drag or resize.
The endOnly option is used to restrict just before the end of a drag or resize. Before the end event is fired, an extra <action>move event is restricted and fired.
If inertia is enabled and endOnly is set to true then the pointer will follow a curve to the restricted coordinates.
- Annotations
- @JSOptional()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hasOwnProperty(v: String): Boolean
- Definition Classes
- Object
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isPrototypeOf(v: Object): Boolean
- Definition Classes
- Object
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def propertyIsEnumerable(v: String): Boolean
- Definition Classes
- Object
- val restriction: UndefOr[|[|[|[RelativeRect, AbsoluteRect], Function3[Double, Double, Element, |[|[RelativeRect, AbsoluteRect], Element]]], String]]
The restriction value specifies the area that the action will be confined to.
The restriction value specifies the area that the action will be confined to. The value can be: - a rect object with top, left, bottom and right or x, y, width and height, - an element whose dimensions will be used as the restriction area, - a function which takes (x, y, element) and returns a rect or an element one of these strings: 'self' – restrict to the target element’s rect 'parent' – restrict to the rect of the element’s parentNode or a CSS selector string – if one of the parents of the target element matches this selector, it’s rect will be used as the restriction area.
- Annotations
- @JSOptional()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toLocaleString(): String
- Definition Classes
- Object
- def toString(): String
- Definition Classes
- AnyRef → Any
- def valueOf(): Any
- Definition Classes
- Object
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated