Migration guide

This page lists the key points to pay attention to when migrating existing code from MyScript iink SDK 2.3 to the new MyScript iink SDK 3.0.

Shape enhancements

This enhancement allows for easier manipulation of shapes in "Raw Content": By optimizing shape design and connections, shapes are now easier to manipulate and control. By default, this feature is not activated to keep previous behavior. So, to take advantage of this enhancement in "Raw Content" you should tune your configuration :

  // Shape enhancement configuration for Raw Content

  // Allow auto connection of shapes and connectors
  setBoolean("raw-content.auto-connection", true)
  // Define shape enhancement policy
  setStringArray("raw-content.edge.policy", arrayOf("default-with-drag"))
  // Configure shapes axis snapping
  setStringArray("raw-content.shape.snap-axis", arrayOf("triangle", "rectangle", "rhombus", "parallelogram", "ellipse"))

You can also refer to our Demo examples that we've configured as above.

Selection API changes

We have refactored some APIs related to selections. As a result, we have deprecated the ContentSelection getBox and getConversionState methods. So you will need to make the following code changes:

  • if you have been using the ContentSelection getBox() method, replace it by Editor getBox method with the selection as parameter.
  • if you have been using the ContentSelection getConversionState() method, replace it by Editor getConversionState method with the selection as parameter.

Math fonts changes

We have updated our fonts for Math content:

.math and .math-solved

PropertyNew default valuePrevious default value
font-familySTIX Two MathSTIXGeneral

.math-variable

PropertyNew default valuePrevious default value
font-familySTIX Two TextSTIX
font-styleitalicitalic

As a result of this font change, the square root bar is now calculated slightly differently. Depending on the font, it may appear thicker.

  • If you have been using the STIX font, our recommendation is to upgrade to the STIX Two font. To do this, you can take a look at our Demo examples, which we've modified to make use of the new fonts.
  • If you have been using another font, for a better rendering, you may need to adjust the thickness of the square root bar using the renderer.sqrt.bar-scale property.

Recognizer and RecognitionAssetsBuilder exception changes

Some of the exceptions have been modified to provide better error handling, so if you were using the following methods, you may need to make some adjustments to your code:

  • On Android, RecognitionAssetsBuilder.compile, Engine.createRecognizer, and Recognizer.clear have been reworked.
  • On other plaftorms, Recognizer clear method has been reworked.