Extends
Members
allowDrop :Boolean
If the element allows drop on it
angle :Number
The clockwise rotation of the entry
background :String
The background of the element
borderBottomColor :String
The bottom border color of the element
borderBottomStyle :String
The bottom border style of the element
borderBottomWidth :String|Number
The bottom border width of the element
borderLeftColor :String
The left border color of the element
borderLeftStyle :String
The left border style of the element
borderLeftWidth :String|Number
The left border width of the element
borderRightColor :String
The right border color of the element
borderRightStyle :String
The right border style of the element
borderRightWidth :String|Number
The right border width of the element
borderTopColor :String
The top border color of the element
borderTopStyle :String
The top border style of the element
borderTopWidth :String|Number
The top border width of the element
(readonly) bottom :Number
The bottom position of the element on the screen, including margin
cursor :String
The cursor type of the element
draggable :Boolean
Allows the element to be moved using the mouse
dragState :Boolean
The dragging status of the element
(readonly) elementName :String
The name of the element
(readonly) elementType :String
The type of the element
flipX :Boolean
If the element should be mirrored horizontally
flipY :Boolean
If the element should be mirrored vertically
flow :'none'|'horizontal'|'vertical'
The flow of the element
height :Number|String
The height of the element
horizontalAlign :'left'|'center'|'right'
The horizontal align of the element
(readonly) id :String
The id of the element
isBlock :Boolean
If the element allows mouse events through transparent pixel
(readonly) left :Number
The left position of the element on the screen, including margin
marginBottom :String|Number
The bottom margin of the element
marginLeft :String|Number
The left margin of the element
marginRight :String|Number
The right margin of the element
marginTop :String|Number
The top margin of the element
maxHeight :Number|String
The maximum height of the element
maxWidth :Number|String
The maximum width of the element
maxX :Number|String
The maximum x position of the element
maxY :Number|String
The maximum y position of the element
minHeight :Number|String
The minimum height of the element
minWidth :Number|String
The minimum width of the element
minX :Number|String
The minimum x position of the element
minY :Number|String
The minimum y position of the element
offsetX :Number|String
The horizontal offset of the element
offsetY :Number|String
The vertical offset of the element
onFocus :Boolean
The focus status of the element
opacity :Number
The transparency of the element
paddingBottom :String|Number
The bottom padding of the element
paddingLeft :String|Number
The left padding of the element
paddingRight :String|Number
The right padding of the element
paddingTop :String|Number
The top padding of the element
(readonly) parentElement :ContainerElement
The parentElement of the element
- Type:
- Default Value:
- null
- Source:
(readonly) parentLayer :Layer
The parentLayer of the element
(readonly) parentX :Number
The x position of the element, relative to it's parent
(readonly) parentXC :Number
The horizontal center position of the element, relative to it's parent
(readonly) parentXE :Number
The horizontal end position of the element, relative to it's parent
(readonly) parentY :Number
The y position of the element, relative to it's parent
(readonly) parentYC :Number
The vertical center position of the element, relative to it's parent
(readonly) parentYE :Number
The vertical end position of the element, relative to it's parent
(readonly) renderHeight :Number
The layout height of the element
(readonly) renderWidth :Number
The layout width of the element
(readonly) right :Number
The right position of the element on the screen, including margin
scaleX :Number
The width ratio of the element
scaleY :Number
The height ratio of the element
(readonly) screenX :Number
The x position of the element, relative to the scene
(readonly) screenXC :Number
The horizontal center position of the element, relative to the scene
(readonly) screenXE :Number
The horizontal end position of the element, relative to the scene
(readonly) screenY :Number
The y position of the element, relative to the scene
(readonly) screenYC :Number
The vertical center position of the element, relative to the scene
(readonly) screenYE :Number
The vertical end position of the element, relative to the scene
title :String
The title of the element
(readonly) top :Number
The top position of the element on the screen, including margin
(readonly) uuid :String
The uuid of the element
verticalAlign :'top'|'middle'|'bottom'
The vertical align of the element
width :Number|String
The width of the element
x :Number|String
The x position of the element
y :Number|String
The y position of the element
Methods
addClass(item, orderIDopt) → {Element}
Adds a class to the element's classList
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
item |
String | ||
orderID |
int |
<optional> |
- Source:
- See:
Returns:
Elementthis
addEventListener(type, listener) → {EventTarget}
Adds a listener to the specified event
Parameters:
Name | Type | Description |
---|---|---|
type |
String | |
listener |
function |
- Inherited From:
- Source:
Returns:
EventTargetthis
addProp(propertyKey, primitiveValue, inheritableopt) → {Element}
Adds a property to the Element
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
propertyKey |
String | ||
primitiveValue |
* | ||
inheritable |
Boolean |
<optional> |
Returns:
Elementthis
addPropSafe(propertyKey, primitiveValue, inheritableopt) → {Element}
Adds a property to the Element if it doesn't has it already
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
propertyKey |
String | ||
primitiveValue |
* | ||
inheritable |
Boolean |
<optional> |
Returns:
Elementthis
animate(animData, duration, delayopt) → (nullable) {Task}
If the element is in a scene, adds an animation task to the scene's queue
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
animData |
Object | ||
duration |
int | ||
delay |
int |
<optional> |
Returns:
Taskanimation(animData, duration, delayopt) → {Task}
Creates an animation task
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
animData |
Object | ||
duration |
int | ||
delay |
int |
<optional> |
Returns:
TaskapplyMask(ctx) → {Element}
Applies a mask to the rendering context
Parameters:
Name | Type | Description |
---|---|---|
ctx |
CanvasRenderingContext2D |
Returns:
Elementthis
applyTransform(ctx) → {Element}
Applies transformation to the rendering context
Parameters:
Name | Type | Description |
---|---|---|
ctx |
CanvasRenderingContext2D |
Returns:
Elementthis
dispatchEvent(type) → {EventTarget}
Dispatches an Event at the specified EventTarget
Parameters:
Name | Type | Description |
---|---|---|
type |
String |
- Inherited From:
- Source:
Returns:
EventTargetthis
drawBox(ctx) → {Element}
Draws background and border if necessary
Parameters:
Name | Type | Description |
---|---|---|
ctx |
CanvasRenderingContext2D |
Returns:
Elementthis
eachEventListener(type, callback) → {EventTarget}
Executes a provided function once per event listener
Parameters:
Name | Type | Description |
---|---|---|
type |
String | |
callback |
function |
- Inherited From:
- Source:
Returns:
EventTargetthis
edit(source) → {Element}
Edits the element
Parameters:
Name | Type | Description |
---|---|---|
source |
Object |
Returns:
Elementthis
emit(type) → {EventTarget}
Dispatches an Event at the specified EventTarget
Parameters:
Name | Type | Description |
---|---|---|
type |
String |
- Inherited From:
- Source:
- See:
Returns:
EventTargetthis
getProp(propertyKey) → (nullable) {ElementProperty}
Returns an ElementProperty of the Element by key
Parameters:
Name | Type | Description |
---|---|---|
propertyKey |
String |
Returns:
ElementPropertygetProps(filteropt) → {Array}
Returns all ElementProperty from the Element (reduced by the given filter)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
filter |
function |
<optional> |
Returns:
ArrayhasEventListener(type) → {Boolean}
Determines if the eventTarget has eventListeners of the given type
Parameters:
Name | Type | Description |
---|---|---|
type |
String |
- Inherited From:
- Source:
Returns:
BooleanhasProp(propertyKey) → {Boolean}
Checks if the Element has a specific property
Parameters:
Name | Type | Description |
---|---|---|
propertyKey |
String |
Returns:
BooleanisChildOf(container) → {Boolean}
Determines if the element is child of a container
Parameters:
Name | Type | Description |
---|---|---|
container |
ContainerElement |
Returns:
Booleanmousedown(callback) → {Element}
Registers a "mousedown" event listener on the element
Parameters:
Name | Type | Description |
---|---|---|
callback |
String | function |
Returns:
Elementthis
mouseenter(callback) → {Element}
Registers a "mouseenter" event listener on the element
Parameters:
Name | Type | Description |
---|---|---|
callback |
String | function |
Returns:
Elementthis
mouseleave(callback) → {Element}
Registers a "mouseleave" event listener on the element
Parameters:
Name | Type | Description |
---|---|---|
callback |
String | function |
Returns:
Elementthis
mousemove(callback) → {Element}
Registers a "mousemove" event listener on the element
Parameters:
Name | Type | Description |
---|---|---|
callback |
String | function |
Returns:
Elementthis
mouseup(callback) → {Element}
Registers a "mouseup" event listener on the element
Parameters:
Name | Type | Description |
---|---|---|
callback |
String | function |
Returns:
Elementthis
off(type, listener) → {EventTarget}
Removes a listener from the specified event
Parameters:
Name | Type | Description |
---|---|---|
type |
String | |
listener |
function |
- Inherited From:
- Source:
- See:
Returns:
EventTargetthis
offAll() → {EventTarget}
Removes all listeners
- Inherited From:
- Source:
- See:
Returns:
EventTargetthis
on(type, listener) → {EventTarget}
Adds a listener to the specified event
Parameters:
Name | Type | Description |
---|---|---|
type |
String | |
listener |
function |
- Inherited From:
- Source:
- See:
Returns:
EventTargetthis
removeAllEventListeners() → {EventTarget}
Removes all listeners
- Inherited From:
- Source:
Returns:
EventTargetthis
removeClass(item) → {Element}
Removes a class from the element's classList
Parameters:
Name | Type | Description |
---|---|---|
item |
String |
- Source:
- See:
Returns:
Elementthis
removeEventListener(type, listener) → {EventTarget}
Removes a listener from the specified event
Parameters:
Name | Type | Description |
---|---|---|
type |
String | |
listener |
function |
- Inherited From:
- Source:
Returns:
EventTargetthis
removeProp(propertyKey) → {Element}
Removes a property from the Element
Parameters:
Name | Type | Description |
---|---|---|
propertyKey |
String |
Returns:
Elementthis
scale(widthRatio, heightRatio) → {Element}
Scales the element
Parameters:
Name | Type | Description |
---|---|---|
widthRatio |
int | |
heightRatio |
int |
Returns:
Elementthis
setProp(propertyKey, primitiveValue, inheritableopt) → {Element}
Edits a property of the Element
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
propertyKey |
String | ||
primitiveValue |
* | ||
inheritable |
Boolean |
<optional> |
Returns:
Elementthis
toggle(propertyKey) → {Element}
Toggles a boolean property of the element
Parameters:
Name | Type | Description |
---|---|---|
propertyKey |
String |
Returns:
Elementthis
toggleClass(item, orderIDopt) → {Element}
Toggles a class
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
item |
String | ||
orderID |
int |
<optional> |
- Source:
- See:
Returns:
Elementthis
toString() → {String}
Returns the string value of the element
- Overrides:
- Source: