Home Reference Source
import GradientEditor from './ui/dialogs/gradienteditor.js'
public class | source

GradientEditor

gradient editor dialog

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

type: *

Private Members
private

_anim: *

private

_bg: *

private
private

_ctx: *

private
private
private
private
private

_height: number

private
private

_keyOpacity: number

private

_keyStrokeWidth: number

private
private

_keys: *[]

private

_log: *

private

_movingkey: boolean

private
private

_oldKeys: *[]

private

_op: *

private

_opId: *

private
private

_options: {}

private

_paper: *

private

_port: *

private
private
private
private
private

_width: number

Method Summary

Public Methods
public

addKey(pos: *, posy: *, r: *, g: *, b: *)

public

clamp(value: *, min: *, max: *): *

public

close()

public

deleteKey(k: *)

public

getInvStrokeColor(r: *, g: *, b: *): *

public

oklabToRGB(L: *, a: *, b: *): undefined[]

public
public

rgbToOklab(r: *, g: *, b: *): undefined[]

public

selectKey(i: *)

public

setCurrentKey(key: *)

public

show(cb: *)

public
Private Methods
private

_setKeyStyle(key: *)

Public Constructors

public constructor() source

Public Members

public type: * source

Private Members

private _anim: * source

private _bg: * source

private _callback: * source

private _ctx: * source

private _ctxCurve: * source

private _currentKey: * source

private _dragDownDeleteThreshold: number source

private _elContainer: * source

private _height: number source

private _imageData: * source

private _keyOpacity: number source

private _keyStrokeWidth: number source

private _keyWidth: * source

private _keys: *[] source

private _log: * source

private _movingkey: boolean source

private _oldCurrentKey: * source

private _oldKeys: *[] source

private _op: * source

private _opId: * source

private _openerEle: * source

private _options: {} source

private _paper: * source

private _port: * source

private _portName: * source

private _previousContent: string source

private _startMouseY: * source

private _timeout: * source

private _width: number source

Public Methods

public addKey(pos: *, posy: *, r: *, g: *, b: *) source

Params:

NameTypeAttributeDescription
pos *
posy *
r *
g *
b *

public clamp(value: *, min: *, max: *): * source

Params:

NameTypeAttributeDescription
value *
min *
max *

Return:

*

public close() source

public deleteKey(k: *) source

Params:

NameTypeAttributeDescription
k *

public getInvStrokeColor(r: *, g: *, b: *): * source

Params:

NameTypeAttributeDescription
r *
g *
b *

Return:

*

public oklabToRGB(L: *, a: *, b: *): undefined[] source

Params:

NameTypeAttributeDescription
L *
a *
b *

Return:

undefined[]

public onChange() source

public rgbToOklab(r: *, g: *, b: *): undefined[] source

Params:

NameTypeAttributeDescription
r *
g *
b *

Return:

undefined[]

public selectKey(i: *) source

Params:

NameTypeAttributeDescription
i *

public setCurrentKey(key: *) source

Params:

NameTypeAttributeDescription
key *

public show(cb: *) source

Params:

NameTypeAttributeDescription
cb *

public updateCanvas() source

Private Methods

private _setKeyStyle(key: *) source

Params:

NameTypeAttributeDescription
key *