Interactive Ink

Answered

Angular 8 and math recognition

Dear,

I need to integrate the recognition of mathematical writing into my web app.

I followed this exampleand it works perfectly.


But if I replace:

 

 recognitionParams.type: 'TEXT'

with:

 

 recognitionParams.type: 'MATH'

 Interactive ink SDK no works.

What am I doing wrong?

Thx


Best Answer

Dear Davide,


Thank you for your request.


This Angular example is indeed only for TEXT, and we don't have any ready to use Angular example for MATH.


So, if you want to customise it for MATH, our recommandation is to take a look at the MyScript JS examples, to adjust the configuration and code according to your needs.

So in your case, you should probably take a look at https://github.com/MyScript/MyScriptJS/blob/master/examples/v4/websocket_math_iink.html for a MATH example.


Regards,


Gwenaëlle









Answer

Dear Davide,


Thank you for your request.


This Angular example is indeed only for TEXT, and we don't have any ready to use Angular example for MATH.


So, if you want to customise it for MATH, our recommandation is to take a look at the MyScript JS examples, to adjust the configuration and code according to your needs.

So in your case, you should probably take a look at https://github.com/MyScript/MyScriptJS/blob/master/examples/v4/websocket_math_iink.html for a MATH example.


Regards,


Gwenaëlle








Thank you very much for the quick reply.

Now everything works on a PC, but it is not possible to use the touch because the track is not detected by any browser on iPad (on Android, on the other hand, it works).

Any ideas to solve the problem?

Dear Davide,


Your issue is probably related to the editor style that shall be updated with 'touch-action': 'none' in the app.component.css file:


#editor {
  margin: auto;
  min-width: 500px;
  max-width: 500px;
  min-height: 500px;
  max-height: 500px;
  touch-action: none;
  border: 1px lightgrey solid;
}



You might have to add PEP (Pointer Events Polyfill)  in index.html so that touch-action none works everywhere as well.


For further details, please take a look at:

https://developer-support.myscript.com/support/discussions/topics/16000025939



Best Regards,


Gwenaëlle






Login or Signup to post a comment