Skip to main content

Class: View

InkModel.View(model, rootIDopt)

new View(model, rootIDopt)

Parameters:
NameTypeAttributesDefaultDescription
modelInkModel
rootIDstring.<GUID><optional>auto generated GUIDRoot node ID
Properties:
NameTypeDescription
namestringView name
min length: 3 symbols
max length: 64 symbols
should start with alpha letter
symbols between first and last letters could be alpha-numeric, -, _
last symbol should be alpha-numeric
typeInkModel.InkTree.TypeModel type

Extends

Methods

addPath(path, parentopt) → InkModel.InkPath

Shorthand of createElement + appendChild

Parameters:
NameTypeAttributesDefaultDescription
pathStroke|InkInput.SensorDataReference, already available in model
parentInkModel.InkGroup<optional>rootWhere to add path
Returns:

InkPath node

Type

InkModel.InkPath

createElement(content, fragmentopt) → InkModel.InkPath

Creates path nodes for underlying view

Parameters:
NameTypeAttributesDescription
contentStroke|InkInput.SensorData
fragmentPathBuilding.SplineFragment<optional>Content part descriptor
Returns:

InkPath node

Type

InkModel.InkPath

createGroup(idopt) → InkModel.InkGroup

Creates group nodes for underlying view

Parameters:
NameTypeAttributesDefaultDescription
idstring.<GUID><optional>auto generated GUIDInkGroup ID
Returns:

InkGroup node

Type

InkModel.InkGroup

extractKnowledge() → {Array.<Semantics.SemanticTriple>}

Extracts knowledge for particular view from model knowledge graph

Returns:

underlying knowledge

Type

Array.<Semantics.SemanticTriple>

Home