Migration guide
This page lists the key points to pay attention to when migrating existing code from MyScript iink SDK 3.0 to the new MyScript iink SDK 3.1.
Configuration changes
To improve the interactivity configuration, we have revised our iink SDK configuration for Raw Content and Diagram.
Main changes
- The equivalent of
raw-content.guides.enable: trueis nowraw-content.guides.show: { "alignment", "text", "square", "square-inside", "image-aspect-ratio", "rotation" } - The equivalent of
raw-content.guides.snap: trueis nowraw-content.guides.snap: { "alignment", "text", "square", "square-inside", "image-aspect-ratio", "rotation" } - The equivalent of the set of boolean values held in
raw-content.recognition.[text|shapes]is nowraw-content.recognition.types, a string array among { "text", "math", "shape" }. - The equivalent of the set of boolean values held in
raw-content.convert.[text|edge|node]is nowraw-content.convert.types, a string array among { "text", "math", "shape" }. This also applies to migration todiagram.convert.types. - If the
background-fillarray value ofraw-content.recognition.feedbackwas set, it should be cleared and the "shape" array value ofraw-content.interactive-blocks.feedbackshall be set. Same fordiagram.recognition.feedback: [ "background-fill"]that translates intodiagram.interactive-blocks.feedback: [ "shape" ] - Animations for selection handles and bounding boxes are now enabled by default. They can be disabled by removing the "animate" string from the
raw-content.selection.feedbackstring array, which can be set to the following value: "show-grabbed-handle-only", "selection-connection-sites" - Forget anything about
raw-content|diagram.interactive-itemsandraw-content|diagram.tap-interactions: The new policy for customizing interactivity in the Raw-Content and Diagram parts is set with new interactivity customization keys defined for Raw Content and Diagram.
Text Document impacts
We have moved any text-document.raw-content.* or text-document.diagram.* key directly to raw-content.* or diagram.*.
We have also modified some behaviors of Raw Content and Diagram blocks in Text Document parts.
➤ To keep the same behavior as iink SDK 3.0.x for Raw Content blocks in Text Document parts, you can use the following json string for your configuration:
"raw-content": {
"convert": {
"shape-on-hold": true
},
"recognition": {
"types": ["text"]
},
"eraser": {
"erase-precisely": false,
"dynamic-radius": true
},
"pen": {
"gestures": [ "underline", "scratch-out", "strike-through" ]
},
"z-order": {
"edge": "default",
},
"edge": {
"policy": [ "default-with-drag"]
},
"shape": {
"snap-axis": [ "triangle", "rectangle", "rhombus", "parallelogram", "ellipse" ]
},
"line-pattern": "grid",
"auto-connection": true,
"guides": {
"show": [ "alignment", "text", "square", "square-inside", "image-aspect-ratio", "rotation" ],
"snap": [ "alignment", "text", "square", "square-inside", "image-aspect-ratio", "rotation" ]
},
"rotation": [ "shape", "image" ],
},
Then, to inject this json use the inject method of the Configuration object of your Engine or of your Editor.
➤ To keep the same behavior as iink SDK 3.0.x for Diagram blocks in Text Document parts, you can use the following json string for your configuration:
"diagram": {
"convert": {
"shape-on-hold": true
},
"eraser": {
"erase-precisely": false,
"dynamic-radius": true
},
"edge": {
"policy": [ "default-with-drag" ],
"snapping-axis": [
-45,
0,
45,
90
]
},
"rotation": [ "shape", "image" ],
"slanted-shape": true,
"text-resize-type": "reflow-within-width"
},
Then, to inject this json use the inject method of the Configuration object of your Engine or of your Editor.
➤ If you need more details, refer to the configuration reference guide or contact our support team.
InkPoint C++ Struct change
The InkPoint C++ Struct was moved from IStroker.h to InkPoint.h, so if you use it, you must update your include.
clampViewOffset usage in UIReferenceImplementation and Demo samples
The Editor clampViewOffset method is no longer called by the UI reference implementation:
Previously, you had to call this method to make sure that the view offset you wanted to use fit within the boundaries of the ContentPart.
Now the Editor automatically adjusts the view offset to make sure it does not exceed the limits of the ContentPart.
➤ If you used the clampViewOffset method in your application, you can remove it from your code.