Type aliases
CursorStyles
CursorStyles: "default" | "text" | "auto" | "pointer" | "move" | "not-allowed" | "no-drop" | "wait" | "help" | "crosshair" | "n-resize" | "s-resize" | "w-resize" | "e-resize" | "nw-resize" | "sw-resize" | "ne-resize" | "se-resize"
DragEvents
DragEvents: "drag" | "drop" | "dragend" | "dragstart" | "dragenter" | "dragleave" | "dragover"
KeyEventInits
Key
EventInits: { altKey?: boolean; bubbles?: boolean; cancelable?: boolean; ctrlKey?: boolean; detail?: any; keyCode: number; metaKey?: boolean; shiftKey?: boolean; target?: HTMLElement; view?: WindowProxy }
Type declaration
-
Optional altKey?: boolean
-
Optional bubbles?: boolean
-
Optional cancelable?: boolean
-
Optional ctrlKey?: boolean
-
Optional detail?: any
-
keyCode: number
-
Optional metaKey?: boolean
-
Optional shiftKey?: boolean
-
-
Optional view?: WindowProxy
KeyboardEvents
KeyboardEvents: "keyup" | "keydown" | "keypress"
MouseEvents
MouseEvents: "click" | "dblclick" | "mouseleave" | "mouseenter" | "mouseout" | "mouseover" | "mousedown" | "mouseup" | "mousemove" | "mousewheel"
SwipeEvents
SwipeEvents: "swipe" | "swipeleft" | "swiperight" | "swipeup" | "swipedown"
TapEvents
TapEvents: "tap" | "singletap" | "doubletap" | "longtap"
TouchEvents
TouchEvents: "touchstart" | "touchend" | "touchmove" | "touchcancel"
Variables
Const CTXMENU
CTXMENU: 900 = 900
Const DBL_TAP_INTERVAL
DBL_TAP_INTERVAL: 300 = 300
Const DRAG_IMAGE_OPACITY
DRAG_IMAGE_OPACITY: 0.5 = 0.5
Const DRAG_MOVE_PX
DRAG_MOVE_PX: 5 = 5
DataTransfer
Data
Transfer: DataTransfer = (function () {function DataTransfer() {this._dropEffect = 'move';this._effectAllowed = 'all';this._data = {};}Object.defineProperty(DataTransfer.prototype, "dropEffect", {/*** Gets or sets the type of drag-and-drop operation currently selected.* The value must be 'none', 'copy', 'link', or 'move'.*/get: function () {return this._dropEffect;},set: function (value) {this._dropEffect = value;},enumerable: true,configurable: true});Object.defineProperty(DataTransfer.prototype, "effectAllowed", {/*** Gets or sets the types of operations that are possible.* Must be one of 'none', 'copy', 'copyLink', 'copyMove', 'link',* 'linkMove', 'move', 'all' or 'uninitialized'.*/get: function () {return this._effectAllowed;},set: function (value) {this._effectAllowed = value;},enumerable: true,configurable: true});Object.defineProperty(DataTransfer.prototype, "types", {/*** Gets an array of strings giving the formats that were set in the @see:dragstart event.*/get: function () {return Object.keys(this._data);},enumerable: true,configurable: true});/*** Removes the data associated with a given type.** The type argument is optional. If the type is empty or not specified, the data* associated with all types is removed. If data for the specified type does not exist,* or the data transfer contains no data, this method will have no effect.** @param type Type of data to remove.*/DataTransfer.prototype.clearData = function (type) {if (type != null) {delete this._data[type];}else {this._data = null;}};/*** Retrieves the data for a given type, or an empty string if data for that type does* not exist or the data transfer contains no data.** @param type Type of data to retrieve.*/DataTransfer.prototype.getData = function (type) {return this._data[type] || '';};/*** Set the data for a given type.** For a list of recommended drag types, please see* https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Recommended_Drag_Types.** @param type Type of data to add.* @param value Data to add.*/DataTransfer.prototype.setData = function (type, value) {this._data[type] = value;};/*** Set the image to be used for dragging if a custom one is desired.** @param img An image element to use as the drag feedback image.* @param offsetX The horizontal offset within the image.* @param offsetY The vertical offset within the image.*/DataTransfer.prototype.setDragImage = function (img, offsetX, offsetY) {instance.setDragImage(img, offsetX, offsetY)};return DataTransfer;}())
Const KB_PROPS
KB_PROPS: string[] = ['altKey', 'ctrlKey', 'metaKey', 'shiftKey']
Const LONG_TAP_INTERVAL
LONG_TAP_INTERVAL: 750 = 750
Const PT_PROPS
PT_PROPS: string[] = ['pageX', 'pageY', 'clientX', 'clientY', 'screenX', 'screenY']
Const RM_ATTS
RM_ATTS: string[] = ['id', 'class', 'style', 'draggable']
keychar1 + keychar2 + ... + keycharN
Examples: