Typedef
| Static Public Summary | ||
| public |
Current behavior |
|
| public |
Set of behaviors to be used by the Editor |
|
| public |
Bounding box |
|
| public |
BuildWebSocketFunction(destructuredPromise: DestructuredPromise, recognizerContext: RecognizerContext): Callback: function Build websocket function |
|
| public |
Simple callback |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
Grab pointerDown, pointerMove and pointerUp events |
|
| public |
Grabber context |
|
| public |
Grabber listener |
|
| public |
|
|
| public |
|
|
| public |
Editor model |
|
| public |
|
|
| public |
Raw results |
|
| public |
Recognition context |
|
| public |
Recognition positions |
|
| public |
Recognition service entry point |
|
| public |
RecognizerCallback(err: Object, model: Model, types: ...String): function Recognizer callback |
|
| public |
Recognizer context |
|
| public |
Recognizer info |
|
| public |
Default renderer |
|
| public |
Renderer info |
|
| public |
Smart guide |
|
| public |
|
|
| public |
Stroke symbol |
|
| public |
Define how a stroke should be drawn |
|
| public |
Stroker info |
|
| public |
|
|
| public |
|
|
| public |
Triggers |
|
| public |
Undo/redo context |
|
| public |
Undo/redo manager |
|
| public |
pointerEvents symbol |
|
Static Public
public Behavior: Object source
Current behavior
Properties:
| Name | Type | Attribute | Description |
| grabber | Grabber | Grabber to capture strokes |
|
| stroker | Stroker | Stroker to draw stroke |
|
| renderer | Renderer | Renderer to draw on the editor |
|
| recognizer | Recognizer | Recognizer to call the recognition service |
|
| callbacks | Array | Functions to handle model changes |
public Behaviors: Object source
Set of behaviors to be used by the Editor
Properties:
| Name | Type | Attribute | Description |
| grabber | Grabber | Grabber to capture strokes |
|
| strokerList | Array<Stroker> | List of stroker to draw stroke |
|
| rendererList | Array<Renderer> | List of renderer to draw on the editor |
|
| recognizerList | Array<Recognizer> | Recognizers to call the recognition service |
|
| getBehaviorFromConfiguration | function(behaviors: Behaviors, configuration: Configuration): Behavior | Get the current behavior to use regarding the current configuration |
|
| callbacks | Array | Functions to handle model changes |
public BuildWebSocketFunction(destructuredPromise: DestructuredPromise, recognizerContext: RecognizerContext): Callback: function source
Build websocket function
Params:
| Name | Type | Attribute | Description |
| destructuredPromise | DestructuredPromise | ||
| recognizerContext | RecognizerContext |
public Grabber: Object source
Grab pointerDown, pointerMove and pointerUp events
Properties:
| Name | Type | Attribute | Description |
| attach | function(element: Element, editor: Editor): GrabberContext | Attach events and decide when to call editor pointerDown/Move/Up methods |
|
| detach | function(element: Element, context: GrabberContext) | Detach the grabber |
public GrabberContext: Object source
Grabber context
Properties:
| Name | Type | Attribute | Description |
| options | Boolean | Object | Options object that specifies characteristics about the event listener. (@see addEventListener.options for detail) |
|
| listeners | Array<GrabberListener> | Registered listeners |
public MathTheme: Object source
Properties:
| Name | Type | Attribute | Description |
| font-family | String |
|
Font-family to be used |
public Model: Object source
Editor model
Properties:
| Name | Type | Attribute | Description |
| currentStroke | Stroke |
|
Stroke in building process. |
| rawStrokes | Array<Stroke> |
|
List of captured strokes. |
| lastPositions | RecognitionPositions | Last recognition sent/received stroke indexes. |
|
| defaultSymbols | Array<Object> |
|
Default symbols, relative to the current recognition type. |
| recognizedSymbols | Array<Object> |
|
Symbols to render (e.g. stroke, shape primitives, string, characters...). |
| exports | Object |
|
Result of the export (e.g. mathml, latex, text...). |
| rawResults | RawResults | The recognition output as return by the recognition service. |
|
| creationTime | Number | Date of creation timestamp. |
|
| modificationTime | Number |
|
Date of lastModification. |
public PenStyle: Object source
Properties:
| Name | Type | Attribute | Description |
| color | String |
|
Color (supported formats rgb() rgba() hsl() hsla() #rgb #rgba #rrggbb #rrggbbaa) |
| -myscript-pen-width | String |
|
Width of strokes and primitives in mm (no other unit is supported yet) |
| -myscript-pen-fill-style | String |
|
|
| -myscript-pen-fill-color | String |
|
Color filled inside the area delimited by strokes and primitives |
public Recognizer: Object source
Recognition service entry point
Properties:
| Name | Type | Attribute | Description |
| getInfo | function(): RecognizerInfo | Get information about the supported configuration (protocol, type, apiVersion, ...). |
|
| init | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback) | Initialize recognition. |
|
| clear | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback) | Clear server context. Currently nothing to do there. |
|
| close | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback) | Close and free all resources that will no longer be used by the recognizer. |
|
| undo | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback) |
|
Undo Undo the last done action. |
| redo | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback) |
|
Redo Redo the previously undone action. |
| resize | function(recognizerContext: RecognizerContext, model: Model, element: Element, callback: RecognizerCallback) |
|
Resize. |
| pointerEvents | function(recognizerContext: RecognizerContext, model: Model, strokes: Array<Stroke>, callback: RecognizerCallback) |
|
Pointer Events. |
| addStrokes | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback) |
|
Add strokes. |
| export_ | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback) |
|
Export content. |
| import_ | function(recognizerContext: RecognizerContext, model: Model, data: Blob, callback: RecognizerCallback) |
|
Import content. |
| convert | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback, conversionState: String) |
|
Convert. |
| waitForIdle | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback) |
|
Wait for idle. |
| setPenStyle | function(recognizerContext: RecognizerContext, model: Model, penStyle: PenStyle, callback: RecognizerCallback) |
|
Set pen style. |
| setPenStyleClasses | function(recognizerContext: RecognizerContext, model: Model, penStyleClasses: String, callback: RecognizerCallback) |
|
Set pen style classes. |
| setTheme | function(recognizerContext: RecognizerContext, model: Model, theme: Theme, callback: RecognizerCallback) |
|
Set theme. |
public RecognizerCallback(err: Object, model: Model, types: ...String): function source
Recognizer callback
public RecognizerContext: Object source
Recognizer context
Properties:
| Name | Type | Attribute | Description |
| editor | Editor | Get a reference to the current editor |
|
| recognitionContexts | Array<RecognitionContext> |
|
|
| initPromise | Promise |
|
|
| lastPositions | RecognitionPositions | Last recognition sent/received stroke indexes. |
|
| url | String |
|
|
| websocket | WebSocket |
|
|
| websocketCallback | function |
|
|
| reconnect | function |
|
|
| currentReconnectionCount | Number |
|
|
| sessionId | String |
|
|
| contentPartCount | Number |
|
|
| currentPartId | String |
|
|
| instanceId | String |
|
|
| canUndo | Boolean |
|
|
| canRedo | Boolean |
|
|
| isEmpty | Boolean |
|
|
| undoStackIndex | Number |
|
|
| possibleUndoCount | Number |
|
|
| idle | Boolean |
|
|
| initialized | Boolean |
|
public Renderer: Object source
Default renderer
Properties:
| Name | Type | Attribute | Description |
| getInfo | function(): RendererInfo | Get some information about this renderer |
|
| attach | function(element: Element, minHeight: Number, minWidth: Number): Object | Populate the DOM element to create rendering area. |
|
| detach | function(element: Element, context: Object) | Remove rendering area from the DOM element. |
|
| resize | function(context: Object, model: Model, stroker: Stroker) | Explicitly resize the rendering area. |
|
| drawCurrentStroke | function(context: Object, model: Model, stroker: Stroker): Model | Draw the model currentStroke. |
|
| drawModel | function(context: Object, model: Model, stroker: Stroker): Model | Draw the model defaultSymbols and recognizedSymbols. |
public SmartGuide: Object source
Smart guide
Properties:
| Name | Type | Attribute | Description |
| editor | Editor | A reference to the current editor. |
|
| wordToChange | String | Word to change following a click on a word. |
|
| lastWord | String | Keep the last word of the previous export to compare with the new and scroll if it's different. |
|
| previousLabelExport | String | Keep the previous label export to know if we should repopulate the prompter text. |
|
| perfectScrollbar | PerfectScrollbar | Perfect Scrollbar used to get gestures from smart guide using touch-action none anyway and get scrolling too. |
|
| elements | Object | All the HTML elements of the smart guide. |
|
| smartGuideTimeOutId | Number | Id of the setTimeOut from fade out animation to clear. |
public Stroke: Object source
Stroke symbol
Properties:
| Name | Type | Attribute | Description |
| type | String |
|
Symbol type, 'stroke' for stroke |
| pointerType | String |
|
Pointer type |
| pointerId | Number |
|
Pointer id |
| x | Array<Number> |
|
X coordinates |
| y | Array<Number> |
|
Y coordinates |
| t | Array<Number> |
|
Timestamps matching x,y coordinates |
| p | Array<Number> |
|
Pressure |
| l | Array<Number> |
|
Length from origin |
| width | Number |
|
(for rendering) Pen/brush width |
| color | String |
|
(for rendering) Pen/brush color |
public Stroker: Object source
Define how a stroke should be drawn
Properties:
| Name | Type | Attribute | Description |
| getInfo | function(): StrokerInfo | Get some information about this stroker |
|
| drawStroke | function(context: Object, stroke: Stroke) | Render a stroke on the current context. |
public Theme: Object source
Properties:
| Name | Type | Attribute | Description |
| ink | InkTheme | General settings |
|
| .math | MathTheme | Math theme |
|
| .math-solver | GeneratedTheme | Theme to be used for generated items |
|
| .text | TextTheme | Text theme |
public UndoRedoManager: Object source
Undo/redo manager
Properties:
| Name | Type | Attribute | Description |
| updateModel | function(undoRedoContext: UndoRedoContext, model: Model, callback: RecognizerCallback) | Push the current model into the undo/redo context. |
|
| undo | function(undoRedoContext: UndoRedoContext, model: Model, callback: RecognizerCallback) | Undo. |
|
| redo | function(undoRedoContext: UndoRedoContext, model: Model, callback: RecognizerCallback) | Redo. |
|
| clear | function(undoRedoContext: UndoRedoContext, model: Model, callback: RecognizerCallback) | Clear. |