Constructor
new VisualEditor(options)
Create a visual editor.
Parameters:
| Name | Type | Description |
|---|---|---|
options |
Object | Configuration options. |
- Source:
Methods
clear()
Clear this VisualEditor by setting all of the callbacks to null.
- Source:
draw()
Draw this VisualEditor.
- Source:
drawEditBox(startX, endX, startY, endY)
Draw the edit box.
Parameters:
| Name | Type | Description |
|---|---|---|
startX |
number | Start x. |
endX |
number | End x. |
startY |
number | Start y. |
endY |
number | End y. |
- Source:
erase()
Erase this VisualEditor.
- Source:
eraseEditBox()
Erase the edit box.
- Source:
initialize(parentElement, width, height)
Initialize this VisualEditor.
Parameters:
| Name | Type | Description |
|---|---|---|
parentElement |
Element | The parent element. |
width |
number | The parent width. |
height |
number | The parent height. |
- Source:
setVisual(visual)
Set the specified visual to be edited by this editor, calling setEditor() for the visual to set relevant callbacks.
Parameters:
| Name | Type | Description |
|---|---|---|
visual |
object | Configuration options. |
- Source: