Migrate from 1.4
This page lists the key points to pay attention to when migrating existing code from iink SDK 1.4 to the new iink SDK 1.5.
You are recommended to use the latest recognition resource packs to benefit from the latest improvements made to MyScript technology.
To improve error management, the method
onError has been modified to include a new argument that gives the error code corresponding to the Editor error.
In addition, new ink gestures errors have been added.
➤ In Objective-C: you should modify your
IEditorListener implementation if you want to use this new parameter into the
➤ In java and C#, for the sake of clarity, we have decided to take advantage of this update to merge the legacy
IEditorListener2 interfaces into a single one. So, you should modify your implementation to add this new parameter into the
onError signature, and refactor your code to use the new
IEditorListener. If you were using
IEditorListener, this means adding the
activeBlockChanged methods coming from
IEditorListener2. If you were implementing
IEditorListener2, you should update the interface name and your imports to use
The JIIX format has been updated to version 3. This allowed the inclusion of new information. If you were parsing JIIX output, you will have to update your parser code to follow the (small) evolutions that came with this new version.
characterobject now includes a
candidatesarray that contains the list of recognition candidates associated with this character.
labelproperty of diagram item of type
Nodehas been renamed
For raw content and diagram item blocks, the
idvalue has evolved with the addition of a prefix identifying their parents.
- For drawing blocks containing images, an
imageobject has been added.
- For text blocks, a new object
structureis available with the
- By default, the
linebreaksobject is no more present. If you want to have information about the line breaks, we recommend you using the new
structureobject. If you still want to use the deprecated
linebreaksobject, you might though prefer to use the
➤ JIIX reference (updated to version 3)
Eraser settings have changed for
The default behavior remains unchanged for
"Drawing": by default the
erase-preciselyis true, ie the eraser only erases ink portions within its trajectory. This corresponds to the previous
erase-entire-strokesfalse value. So if you were using the default values, you don’t have anything to do. But if you have customised the
erase-entire-strokesvalue, make sure to update your application with the new
"Text Document", the behavior is now identical for all types of blocks: eraser precision default level is the object or groups of objects (stroke, character, …). Precision change applies to all blocks of a
"Text Document"with the
drawing.erase-entire-strokeshas been withdrawn, so it is no more possible to have for example “stroke” precision on
"Text"blocks and “precise” precision on
- By default the diagram shape recognition feedback is activated but there is no
.diagram-fillstyling class pen fill color. So if you want to keep the same blue background shape coloring as with previous version, you should set the following theme:
- With iink 1.4, the setting that was used for enabling the shape recognition feedback in a Raw Content part was
raw-content.feedback.fill-shapewhich has been replaced by the new one
raw-content.recognition.feedback. The latter proposes more options. By default, there is no feedback which was already the case with iink 1.4. So, if you had not modified this setting, you don’t have anything to do. But if you had enabled it, you should modify your code to use the new setting. For further details on how to do it, please refer to the configuration and styling pages.
Up to the 1.4 version, the
diagram.enable-sub-blocks property was used to control whether sub blocks were accessible in either Diagram parts or Diagram or Raw Content blocks of Text Document parts.
In 1.5 we introduce a new property
text-document.enable-sub-blocks to control sub-block access for blocks within Text Document parts.
diagram.enable-sub-blocks property now only applies to Diagram parts. By default, both properties remain
So, if you had disabled the
diagram.enable-sub-blocks property and are using Text Document parts, make sure to set the
The default styling -myscript-text-decoration-style applied when drawing a frame around some stroke text has changed. It used to be an outline frame around the text. In 1.5, it is a background color decoration that highlights the text. So, if you want to keep the same behavior as the 1.4 default one, you should set the following theme:
In addition, in 1.4 the highlight color was the pen color with alpha except for some predefined colors like black that led to a yellow highlight. In 1.5 there is no more exception: the highlight color is always the pen color with alpha.
The undo/redo behavior has been standardized and is now based on strokes for all Content Types.