Migration guide
This page lists the key points to pay attention to when migrating existing code from MyScript iink SDK 3.1 to the new MyScript iink SDK 3.2.
Changes for Drawing and Raw Content content types
Drawing
We have introduced a new raw-content.classification.types property, that combined with the raw-content.recognition.types, allows you to disable both ink classification and recognition in a Raw Content content part type.
With such a configuration, the ink analysis process is reduced, allowing Raw Content part to be used for optimized drawing while taking advantage of the interactive tools.
➤ This drawing.json illustrates a Raw Content configuration that you can use for doodling and drawing activities with a Raw Content part. See here how to use it.
{
"raw-content": {
"line-pattern": "none",
"recognition": {
"types": []
},
"classification": {
"types": []
},
"convert": {
"shape-on-hold": false
},
"shape": {
"snap-axis": []
},
"interactive-blocks": {
"auto-classified": []
},
"eraser": {
"erase-precisely": true,
"dynamic-radius": true
},
"auto-connection": false,
"guides": {
"show": [],
"snap": []
},
"pen": {
"gestures": []
},
"rotation": [
"image"
]
}
}
➤ As a result, we have deprecated the Drawing content part type.
Raw Content
With the introduction of this new raw-content.classification.types property, to maintain the previous behavior when using a Raw Content part or block, you may need to change the value of this raw-content.classification.types property to suit your needs.
For example, if you were using Raw Content to perform both text and shape recognition, you need to add shape to the list of content types that can be output by the ink strokes classifier:
{
"raw-content": {
"classification": {
"types": [ "text", "drawing", "shape" ]
},
"recognition": {
"types": [ "text", "shape" ]
},
...
}
}
➤ For more information, look at these configuration examples that illustrate different uses of a Raw Content part, and refer to the raw-content.classification.types possible values.
Other configuration changes
In order to clarify and standardize our configuration properties, we have made the following changes:
Math solver changes
- The half-up value name for
math.solver.rounding-modehalf-up value has been changed fromhalf uptohalf-up. - The
math.solver.fraction-modekey has been renamed tomath.solver.number-format. Its possible values are unchanged.
Default value changes
- Shapes and images rotations are now allowed everywhere, with
raw-content.rotationanddiagram.rotationdefault values set to[ "shape", "image" ]. - The default value for
raw-content.edge.policyis nowdefault-with-dragwhich is more appropriate to raw content than the previousdefaultvalue which corresponds to a diagram use case.
➤ Be sure to update your code if necessary.
Undo and redo improvement
Undo and redo have been made more reliable, but to avoid deadlocks, undo() or redo() must not be called inside an iink SDK callback.
Selection API changes
We have deprecated the ContentSelection getBox and getConversionState methods. So, we advise you to make the following code changes:
- if you have been using the
ContentSelectiongetBox()method, replace it byEditorgetBoxmethod with the selection as parameter. - if you have been using the
ContentSelectiongetConversionState()method, replace it byEditorgetConversionStatemethod with the selection as parameter.
OffscreenEditor session time optimization
Session time can be described as the time interval (in milliseconds) between the last pen up event and subsequent contentChanged() notifications.
Since the OffscreenEditor does not move strokes, the session time has no impact on the user experience.
As a result, we have decreased the session time for OffscreenEditor, so that contentChanged() notifications from OffscreenEditor are received faster and the waitForIdle() wait time is reduced.