iink SDK Web

Answered

Increasing space between smartguide and first line

 Hello,


the smartguide is a very nice feature, but unfortunately its position can be problematic.


Consider the example at: https://myscript.github.io/MyScriptJS/examples/v4/websocket_text_iink.html

If you write in the first line in a rather big font, and your letter is something which has a horizontal stroke at the top (like a 'Z', '2', 'T' etc.), you will notice that the stroke is often lost because you hit the smartguide. Vertical strokes seem to work, as do strokes that start below the smartguide.


The obvious solutions to this are:

1. don't use the first line --> problematic if you have limited space or import text, which is automatically placed at the beginning

2. use more line-height or font-size so that it is unlikely that the issue occurs --> again problematic if you have limited space, and looks weird for the following lines


Instead I would like to do one of the following, however, don't know how:

1. Create a margin between the smartguide and the first line (tried the margin property of v4.text, but it only moved the whole smartguide + text. Also tried to add a margin to the .smartguide class, which did not impact the position of the text)

2. Make sure the 1st line is empty when importing text (don't know how)

3. Any other solution that does the job...


Any ideas how this can be achieved?


Thanks and kind regards

Nico


Best Answer

Hello Olivier,


thanks for your reply. I now quick fixed it through CSS:


 

.smartguide {
  top: 10px !important;
}

 This is a bit hacky, but it reduces the space above the smartguide and increases the space between smartguide and first line.


It would be nice if you could add this issue to your backlog for the future, as I guess I am not the only one having it. At least some configuration parameters for defining the smartguide's position would be a nice extension.


Thanks and kind regards

Nico


Dear Nico,


thank you for your question, which raised interest on our side.


Currently, as you have access to the while MyScriptJS source code, if you are familiar with JS, you can tune the code according to your needs. 


For your specific need, you could tune the insertSmartGuide function: https://github.com/MyScript/MyScriptJS/blob/master/src/smartguide/SmartGuide.js#L345


Of course, this is demanding, but it will be the best way to match your expectation.


Best regards,


Olivier

Answer

Hello Olivier,


thanks for your reply. I now quick fixed it through CSS:


 

.smartguide {
  top: 10px !important;
}

 This is a bit hacky, but it reduces the space above the smartguide and increases the space between smartguide and first line.


It would be nice if you could add this issue to your backlog for the future, as I guess I am not the only one having it. At least some configuration parameters for defining the smartguide's position would be a nice extension.


Thanks and kind regards

Nico