logo

/repo|v3.15.3

Class

new Ui(element, options, actions)

Ui class

PARAMETERS
NameTypeDescription

element

stringHTMLElement

Wrapper's element or selector

options

[ Object ]

Ui setting options

PROPERTIES
NameTypeDescription

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
NameTypeDescription

width

string

width of ui

height

string

height of ui

actions

Object

ui action instance

Instance Methods

changeHandButtonStatus(enabled)

Change hand button status

PARAMETERS
NameTypeDescription

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
NameTypeDescription

resizeInfo

Object = {}

ui & image size info

PROPERTIES
NameTypeDescription

uiSize

[ Object ]

image size dimension

PROPERTIES
NameTypeDescription

width

string

ui width

height

string

ui height

imageSize

[ Object ] = this.imageSize

image size dimension

PROPERTIES
NameTypeDescription

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
NameTypeDescription

event

object

event object

toggleZoomButtonStatus(type)

Toggle zoom button status

PARAMETERS
NameTypeDescription

type

string

type of zoom button

_addHistory(command)

Add history

PARAMETERS
NameTypeDescription

command

Commandstring

command or command name

_selectNextHistory()

Select next history

_selectPrevHistory()

Select prev history

Resizable