new Ui(element, options, actions)
Ui class
PARAMETERS
Name Type Description element
stringHTMLElement
Wrapper's element or selector
options
[ Object ]
Ui setting options
PROPERTIES
Name Type Description loadImage
number
Init default load image
initMenu
number
Init start menu
menuBarPosition
Boolean = bottom
Let
applyCropSelectionStyle
Boolean = false
Let
usageStatistics
Boolean = false
Use statistics or not
uiSize
[ Object ]
ui size of editor
PROPERTIES
Name Type Description width
string
width of ui
height
string
height of ui
actions
Object
ui action instance
Instance Methods
changeHandButtonStatus(enabled)
Change hand button status
PARAMETERS
Name Type Description enabled
boolean
status to change
clearHistory()
Clear history
destroy()
Destroys the instance.
initHistory()
Init history
offZoomInButtonStatus()
Turn off zoom-in button status
resizeEditor(resizeInfo)
Change editor size
PARAMETERS
Name Type Description resizeInfo
Object = {}
ui & image size info
PROPERTIES
Name Type Description uiSize
[ Object ]
image size dimension
PROPERTIES
Name Type Description width
string
ui width
height
string
ui height
imageSize
[ Object ] = this.imageSize
image size dimension
PROPERTIES
Name Type Description oldWidth
Number
old width
oldHeight
Number
old height
newWidth
Number
new width
newHeight
Number
new height
EXAMPLES
// Change the image size and ui size, and change the affected ui state together. imageEditor.ui.resizeEditor({ imageSize: {oldWidth: 100, oldHeight: 100, newWidth: 700, newHeight: 700}, uiSize: {width: 1000, height: 1000} });
// Apply the ui state while preserving the previous attribute (for example, if responsive Ui) imageEditor.ui.resizeEditor();
toggleHistoryMenu(event)
Toggle history menu
PARAMETERS
Name Type Description event
object
event object
toggleZoomButtonStatus(type)
Toggle zoom button status
PARAMETERS
Name Type Description type
string
type of zoom button
_addHistory(command)
Add history
PARAMETERS
Name Type Description command
Commandstring
command or command name
_selectNextHistory()
Select next history
_selectPrevHistory()
Select prev history