Typedef
| Static Public Summary | ||
| public |
Analyzer v3 parameters |
|
| public |
Parameters to be used for v3 recognition |
|
| public |
Parameters to be used for v4 recognition |
|
| 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 |
Editor configuration |
|
| public |
|
|
| public |
Debug renderer v4 parameters |
|
| public |
|
|
| public |
Diagram v4 parameters |
|
| public |
Export v4 parameters |
|
| public |
|
|
| public |
Grab pointerDown, pointerMove and pointerUp events |
|
| public |
Grabber context |
|
| public |
Grabber listener |
|
| public |
|
|
| public |
jiix export v4 parameters |
|
| public |
Math solver v4 parameters |
|
| public |
|
|
| public |
Math v3 parameters |
|
| public |
Math v4 parameters |
|
| public |
Editor model |
|
| public |
Music clef v3 parameters |
|
| public |
Music staff v3 parameters |
|
| public |
Music v3 parameters |
|
| public |
|
|
| public |
Raw results |
|
| public |
Recognition context |
|
| public |
Parameters to be used for recognition |
|
| 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 |
Renderer v4 parameters |
|
| public |
Parameters to be used for rendering |
|
| public |
Server configuration |
|
| public |
Shape v3 parameters |
|
| public |
|
|
| public |
Stroke symbol |
|
| public |
Define how a stroke should be drawn |
|
| public |
Stroker info |
|
| public |
Text margin v4 parameters |
|
| public |
|
|
| public |
Text v3 parameters |
|
| public |
Text v3 properties |
|
| public |
Text v4 parameters |
|
| public |
|
|
| public |
Triggers to be used for recognition |
|
| public |
Triggers |
|
| public |
Undo/redo context |
|
| public |
Undo/redo manager |
|
| public |
WebSocket configuration |
|
Static Public
public AnalyzerV3Parameters: Object source
Analyzer v3 parameters
Properties:
| Name | Type | Attribute | Description |
| textParameter | TextV3Parameters | ||
| coordinateResolution | Number |
|
public ApiV3RecognitionParameters: Object source
Parameters to be used for v3 recognition
Properties:
| Name | Type | Attribute | Description |
| mathParameter | MathV3Parameters | Parameters of the math recognition if in use. |
|
| textParameter | TextV3Parameters | Parameters of the text recognition if in use. |
|
| shapeParameter | ShapeV3Parameters | Parameters of the shape recognition if in use. |
|
| musicParameter | MusicV3Parameters | Parameters of the music recognition if in use. |
|
| analyzerParameter | AnalyzerV3Parameters | Parameters of the analyzer recognition if in use. |
public ApiV4RecognitionParameters: Object source
Parameters to be used for v4 recognition
Properties:
| Name | Type | Attribute | Description |
| lang | String |
|
Language to be used |
| export | ExportV4Parameters | Generic export parameters |
|
| renderer | RendererV4Parameters | iink renderer parameters |
|
| math | MathV4Parameters | Parameters of the math recognition if in use. |
|
| text | TextV4Parameters | Parameters of the text recognition if in use. |
|
| diagram | DiagramV4Parameters | Parameters of the diagram recognition if in use. |
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 Configuration: Object source
Editor configuration
Properties:
| Name | Type | Attribute | Description |
| listenerOptions | Object | Boolean |
|
Options object that specifies characteristics about the event listener. (@see addEventListener.options for detail) |
| undoRedoMaxStackSize | Number |
|
Max number of items kept in the undo/redo stack |
| xyFloatPrecision | Number |
|
Precision of x and y from 0 to 10 (integer). More the value is high more precise will be the point capture but object in memory and send to the server will be heavier. |
| timestampFloatPrecision | Number |
|
Precision of the timestamp |
| triggerDelay | Number |
|
Delay in millisecond to wait before doing an action if in QUIET_PERIOD. If an other action is perform during the quiet period, timer is reset. |
| processDelay | Number |
|
Quiet period duration in millisecond while editor wait for another event before triggering events |
| resizeTriggerDelay | Number |
|
Delay in millisecond to wait before applying a resize action. If a other resize order is perform during the quiet period, resizeTimer is clear. Prevent resize storms. |
| triggers | TriggerSettings | Editor actions trigger |
|
| renderingParams | RenderingParameters | Rendering parameters. |
|
| recognitionParams | RecognitionParameters | Recognition parameters. |
public ExportV4Parameters: Object source
Export v4 parameters
Properties:
| Name | Type | Attribute | Description |
| image-resolution | Number |
|
|
| jiix | JiixExportV4Parameters |
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 MathSolverV4Parameters: Object source
Math solver v4 parameters
Properties:
| Name | Type | Attribute | Description |
| enable | Boolean |
|
Enable/disable embedded solver |
| fractional-part-digits | Number |
|
Number of digits to be used on fraction solving |
| decimal-separator | String |
|
Decimal separator to be used (e.g. "." or ",") |
| rounding-mode | String |
|
Rounding mode for approximations |
| angle-unit | String |
|
Unit to be used for angles |
public MathTheme: Object source
Properties:
| Name | Type | Attribute | Description |
| font-family | String |
|
Font-family to be used |
public MathV3Parameters: Object source
Math v3 parameters
Properties:
| Name | Type | Attribute | Description |
| resultTypes | Array<String> |
|
Export types |
| columnarOperation | Boolean |
|
True to activate columnar recognition |
| userResources | Array<String> |
|
Custom user resources to use |
| scratchOutDetectionSensitivity | Number |
|
Sensitivity of to scratch-out gesture |
public MathV4Parameters: Object source
Math v4 parameters
Properties:
| Name | Type | Attribute | Description |
| mimeTypes | Array<String> |
|
Exports mimeTypes |
| fonts | Array<String> |
|
Fonts to be used for conversion (https://github.com/typekit/fvd) |
| solver | MathSolverV4Parameters | Settings of the solver |
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 MusicV3Parameters: Object source
Music v3 parameters
Properties:
| Name | Type | Attribute | Description |
| divisions | Number |
|
|
| resultTypes | Array<String> |
|
|
| userResources | Array<String> |
|
|
| staff | MusicStaffV3Parameters | ||
| clef | MusicClefV3Parameters | ||
| scratchOutDetectionSensitivity | Number |
|
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 RecognitionParameters: Object source
Parameters to be used for recognition
Properties:
| Name | Type | Attribute | Description |
| type | String |
|
Recognition type (TEXT, MATH, SHAPE, MUSIC, ANALYZER). |
| protocol | String |
|
REST or WEBSOCKET to choose the API to use. |
| apiVersion | String |
|
Version of the api to use. |
| server | ServerParameters | Server configuration |
|
| v3 | ApiV3RecognitionParameters | Recognition parameters for v3 API |
|
| v4 | ApiV4RecognitionParameters | Recognition parameters for v4 API |
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. |
| importInk | function(recognizerContext: RecognizerContext, model: Model, strokes: Array<Stroke>, callback: RecognizerCallback) |
|
Import ink. |
| addStrokes | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback) |
|
Add strokes. |
| exportContent | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback) |
|
Export content. |
| importContent | function(recognizerContext: RecognizerContext, model: Model, point: {x: Number, y: Number}, data: Blob, callback: RecognizerCallback) |
|
Import content. |
| convert | function(recognizerContext: RecognizerContext, model: Model, callback: RecognizerCallback) |
|
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. |
| 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 |
|
|
| 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): 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 RendererV4Parameters: Object source
Renderer v4 parameters
Properties:
| Name | Type | Attribute | Description |
| debug | DebugRendererV4Parameters |
public RenderingParameters: Object source
Parameters to be used for rendering
Properties:
| Name | Type | Attribute | Description |
| stroker | String |
|
Type of stroker. Actually only quadratic is implemented. |
public ServerParameters: Object source
Server configuration
Properties:
| Name | Type | Attribute | Description |
| scheme | String |
|
Server URL scheme (http/https) |
| host | String |
|
Server host |
| applicationKey | String |
|
MyScript Cloud applicationKey |
| hmacKey | String |
|
MyScript Cloud hmacKey |
| websocket | WebSocketConf | WebSocket configuration. |
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 TextMarginV4Parameters: Object source
Text margin v4 parameters
Properties:
| Name | Type | Attribute | Description |
| top | Number |
|
Margin from the top of the part to the top of the text bounding box (will be used for reflow operations) |
| left | Number |
|
Margin from the left of the part to the left of the text bounding box (will be used for reflow operations) |
| right | Number |
|
Margin from the right of the part to the right of the text bounding box (will be used for reflow operations) |
public TextV3Parameters: Object source
Text v3 parameters
Properties:
| Name | Type | Attribute | Description |
| language | String |
|
Language to be used |
| textInputMode | String |
|
|
| resultDetail | String |
|
|
| contentTypes | Array<String> |
|
|
| subsetKnowledges | Array<String> |
|
|
| userLkWords | Array<String> |
|
|
| userResources | Array<String> |
|
|
| textProperties | TextV3Properties |
public TextV3Properties: Object source
Text v3 properties
Properties:
| Name | Type | Attribute | Description |
| textCandidateListSize | Number |
|
|
| wordCandidateListSize | Number |
|
Can't set a wordCandidateListSize > 0 if ResultDetail is not set to WORD or CHARACTER |
| wordPredictionListSize | Number |
|
|
| wordCompletionListSize | Number |
|
|
| characterCandidateListSize | Number |
|
Can't set a characterCandidateListSize > 0 if ResultDetail is not set to CHARACTER |
| enableOutOfLexicon | Boolean |
|
|
| discardCaseVariations | Boolean |
|
|
| discardAccentuationVariations | Boolean |
|
|
| glyphDistortion | Boolean |
|
Only valid with ISOLATED mode |
| enableTagger | Boolean |
|
|
| spellingDistortion | Number |
|
Only valid with ISOLATED mode |
public TextV4Parameters: Object source
Text v4 parameters
Properties:
| Name | Type | Attribute | Description |
| mimeTypes | Array<String> |
|
Exports mimeTypes |
| fonts | Array<String> |
|
Fonts to be used for conversion (https://github.com/typekit/fvd) |
| margin | TextMarginV4Parameters | Margin of the text bounding box (will be used for reflow operations) |
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. |
public WebSocketConf: Object source
WebSocket configuration
Properties:
| Name | Type | Attribute | Description |
| pingEnabled | Boolean |
|
Enable/disable ping feature. |
| pingDelay | Number |
|
Delay in millisecond to wait before sending a ping. |
| maxPingLostCount | Number |
|
Failed ping count before closing the socket |
| autoReconnect | Boolean |
|
Will try to reconnect when websocket is close or when a timeout is detected. Do not handle the case when user change network on his device. |
| maxRetryCount | Number |
|
Number of retries when auto reconnect is enabled |
| fileChunkSize | Number |
|
File chunk size in bytes |