Skip to main content

Class: SketcherBase

dg.chem.SketcherBase

A common interface that all sketchers should implement

Hierarchy

Constructors

constructor

new SketcherBase()

Overrides

Widget.constructor

Defined in

src/chem.ts:76

Properties

_name

_name: string = ''

Defined in

src/chem.ts:74


_properties

Protected _properties: Property[]

Inherited from

Widget._properties

Defined in

src/widgets.ts:174


_root

Protected _root: HTMLElement

Inherited from

Widget._root

Defined in

src/widgets.ts:173


dart

dart: any

Inherited from

Widget.dart

Defined in

src/widgets.ts:177


factory

factory: null | Func = null

Constructor function. No parameters, returns [Widget].

Inherited from

Widget.factory

Defined in

src/widgets.ts:171


host

Optional host: Sketcher

Defined in

src/chem.ts:73


isDetached

isDetached: boolean = false

Inherited from

Widget.isDetached

Defined in

src/widgets.ts:178


onChanged

onChanged: Subject<any>

Defined in

src/chem.ts:72


props

props: any

Inherited from

Widget.props

Defined in

src/widgets.ts:175


subs

subs: Subscription[]

Inherited from

Widget.subs

Defined in

src/widgets.ts:176


temp

temp: any

Contains auxiliary information

Inherited from

Widget.temp

Defined in

src/widgets.ts:168

Accessors

height

get height(): number

Returns

number

Defined in

src/chem.ts:111


isInitialized

Abstract get isInitialized(): boolean

Returns

boolean

Defined in

src/chem.ts:101


molFile

Abstract get molFile(): string

MolFile representation of the molecule

Returns

string

Defined in

src/chem.ts:86

Abstract set molFile(s): void

Parameters

NameType
sstring

Returns

void

Defined in

src/chem.ts:92


molV3000

Abstract get molV3000(): string

Returns

string

Defined in

src/chem.ts:88

Abstract set molV3000(s): void

Parameters

NameType
sstring

Returns

void

Defined in

src/chem.ts:90


root

get root(): HTMLElement

Widget's visual root.

Returns

HTMLElement

Inherited from

Widget.root

Defined in

src/widgets.ts:255

set root(r): void

Parameters

NameType
rHTMLElement

Returns

void

Inherited from

Widget.root

Defined in

src/widgets.ts:256


smarts

Abstract set smarts(s): void

Parameters

NameType
sstring

Returns

void

Defined in

src/chem.ts:99


smiles

Abstract get smiles(): string

SMILES representation of the molecule

Returns

string

Defined in

src/chem.ts:81

Abstract set smiles(s): void

Parameters

NameType
sstring

Returns

void

Defined in

src/chem.ts:83


supportedExportFormats

get supportedExportFormats(): string[]

Returns

string[]

Defined in

src/chem.ts:103


type

get type(): string

Returns

string

Inherited from

Widget.type

Defined in

src/widgets.ts:165


width

get width(): number

Returns

number

Defined in

src/chem.ts:107

Methods

addProperty

Private addProperty(propertyName, propertyType, defaultValue?, options?): any

Registers an property with the specified type, name, and defaultValue. Registered property gets added to {@see properties}. Returns default value, thus allowing to combine registering a property with the initialization

Parameters

NameTypeDefault value
propertyNamestringundefined
propertyType"string" | "bigint" | "object" | "map" | "file" | "view" | "int" | "double" | "bool" | "byte_array" | "datetime" | "qnum" | "dataframe" | "num" | "string_list" | "dataframe_list" | "cell" | "column" | "column_list" | "graphics" | "tablerowfiltercall" | "colfiltercall" | "bitset" | "dynamic" | "viewer" | "list" | "semantic_value" | "func" | "funccall" | "property" | "categorical" | "numerical" | "GridCellRenderArgs" | "TableView" | "User" | "Menu" | "Project" | "event_data" | "progressindicator" | "Credentials" | "ScriptEnvironment" | "Notebook"undefined
defaultValueanynull
optionsnull | { [key: string]: any; } & PropertyOptionsnull

Returns

any

Inherited from

Widget.addProperty

Defined in

src/widgets.ts:276


apply

apply(properties): Widget<any>

Parameters

NameType
propertiesobject

Returns

Widget<any>

Inherited from

Widget.apply

Defined in

src/widgets.ts:226


detach

detach(): void

Gets called when a widget is detached and will no longer be used. Typically used for unsubscribing from events. Be sure to call super.detach() if this method is overridden.

Returns

void

Inherited from

Widget.detach

Defined in

src/widgets.ts:260


getDartProperties

getDartProperties(): any[]

Returns

any[]

Inherited from

Widget.getDartProperties

Defined in

src/widgets.ts:242


getProperties

getProperties(): Property[]

Returns

Property[]

Inherited from

Widget.getProperties

Defined in

src/widgets.ts:236


getSmarts

getSmarts(): Promise<string>

SMARTS query

Returns

Promise<string>

Defined in

src/chem.ts:95


init

init(host): Promise<void>

Override to provide custom initialization. At this point, the root is already in the DOM.

Parameters

NameType
hostSketcher

Returns

Promise<void>

Defined in

src/chem.ts:116


onFrameAttached

onFrameAttached(dataFrame): void

Parameters

NameType
dataFrameDataFrame

Returns

void

Inherited from

Widget.onFrameAttached

Defined in

src/widgets.ts:248


onPropertyChanged

onPropertyChanged(property): void

Gets called when viewer's property is changed.

Parameters

NameTypeDescription
propertynull | Propertyor null, if multiple properties were changed.

Returns

void

Inherited from

Widget.onPropertyChanged

Defined in

src/widgets.ts:240


refresh

refresh(): void

Returns

void

Defined in

src/chem.ts:120


resize

resize(): void

Returns

void

Defined in

src/chem.ts:122


sourceRowsChanged

sourceRowsChanged(): void

Returns

void

Inherited from

Widget.sourceRowsChanged

Defined in

src/widgets.ts:246


sub

sub(subscription): void

Registers a subscription to an external event.

Parameters

NameType
subscriptionSubscription

Returns

void

Inherited from

Widget.sub

Defined in

src/widgets.ts:219


toDart

toDart(): any

Returns

any

Inherited from

Widget.toDart

Defined in

src/widgets.ts:211


find

Static find(root): null | Widget<any>

Finds existing widget from its visual root.

Parameters

NameType
rootElement

Returns

null | Widget<any>

Inherited from

Widget.find

Defined in

src/widgets.ts:207


fromRoot

Static fromRoot(root): Widget<any>

Creates a new widget from the root element.

Parameters

NameType
rootHTMLElement

Returns

Widget<any>

Inherited from

Widget.fromRoot

Defined in

src/widgets.ts:299


getAll

Static getAll(): Widget<any>[]

Returns all currently active widgets.

Returns

Widget<any>[]

Inherited from

Widget.getAll

Defined in

src/widgets.ts:202