MyScript / iinkTS

Other
41 stars 4 forks source link

Integrate in laravel project #5

Closed sparrow84001 closed 1 month ago

sparrow84001 commented 1 month ago

Hello,

   I want to integrate iinkts to my laravel project. But not running simple Text recognition. Show only editor and nothing works. 
   Can you help me?
leJsboureau commented 1 month ago

Hello, can you share us more details ? maybe share your code or what don't work ? Have you an error message ?

sparrow84001 commented 1 month ago

Hello, Thank you for your reply. When I use div (div id="editor" touch-action="none">/div) all functions work but the writing area is not showing and I can't write. Then I used this canvas (canvas id="editor" touch-action="none" style="border: 2px solid black;"></canvas) this time all functions were working but only the writing ink was not showing. Screenshot 2024-07-24 104217 This div uses pic.

leJsboureau commented 1 month ago

Hello, According to the images, the canvas is not visible. may be because the svg layers (data-layer="CAPTURE" and data-layer="MODEL") are positioned absolutely with 100% height. container (in our examples <div id="editor">) must therefore be of a defined height.

If that's not the cause, maybe you could share your code with us?

sparrow84001 commented 1 month ago

Ok, I will share my code. Note that this is the PHP blade page.

gg.docx

leJsboureau commented 1 month ago

ok, it's definitely a problem with the height of the container. putting "height:100%" on the #editor div does not give a height and a relative height does not work if its parent does not have a height defined. You must either:

sparrow84001 commented 1 month ago

Ok, thanks It works. I used "calc(100vh - 166px);" Thanks for helping.

leJsboureau commented 1 month ago

You're welcome