Jump to content

Signature Capture


Harry Rogers

Recommended Posts

Using the TUniCanvas it is easy to capture a signature on a desktop browser or tablet pc with a stylus using a canvas compatible browser

- Does anyone know how to do the same on a mobile device ?

e.g. on an Android you tend to end up moving the form around the screen and / or resizing it rather than actually getting to the canvas object.

Is there a way to disable the standard user screen interaction for a form / region on a form ?

Link to comment
Share on other sites

  • Administrators

I got my first Android device about three months ago and I noticed that our Paint demo can't draw on a mobile Android.

 

To resolve the auto pan problem "touchMove" event of browser must be captured and disabled:

 

document.body.addEventListener('touchmove',function(event){
 event.preventDefault();
},false);	

 

However, this is not enough.

 

On a touch enabled device we need to implement "touch" events for UniCanvas. Mouse move events don't work here, as there is no mouse here!

 

I'm already working on this and it may be included in next build.

  • Upvote 1
Link to comment
Share on other sites

  • 5 years later...
  • 3 weeks later...

Has anyone got a view on this? I'm trying to capture a signature using unicanvas, but it doesn't work on a touch screen because of touch panning in the browser.

 

Trying to use this code from Farshad, but I'm not sure where to put it.

 

 

I got my first Android device about three months ago and I noticed that our Paint demo can't draw on a mobile Android.

To resolve the auto pan problem "touchMove" event of browser must be captured and disabled:
 

document.body.addEventListener('touchmove',function(event){
  event.preventDefault();
},false);	
However, this is not enough.

On a touch enabled device we need to implement "touch" events for UniCanvas. Mouse move events don't work here, as there is no mouse here!

I'm already working on this and it may be included in next build.

 

 

Also any more on touch events in the unicanvas control ?

 

Thanks 

Mark

Link to comment
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

 

Hi Bocchi,
I've not worked with unimobile yet, but I have created a test for you, it sort of works although needs some polish, and I've not tested properly. its basic but if it helps you then that's great.
 
here it is;

https://www.e-quipit.co.uk/downloads/mobile_sig_test.zip

 

Regards

Mark

 

hi  mark

I' compile the program tks. 

 

But I get the following message in the log:

 

sigtest1.exe: 000010AC: 20.11.40 [HandleFileRequest[192.200.1.20]]:File not found: C:\DELPHI_UNIGUI_PRUEBAS\mobile_sig_test\MobileProjects\Win32\Debug\files\points.js

But I get the following message in the log:
Link to comment
Share on other sites

But I get the following message in the log:

 

sigtest1.exe: 000010AC: 20.11.40 [HandleFileRequest[192.200.1.20]]:File not found: C:\DELPHI_UNIGUI_PRUEBAS\mobile_sig_test\MobileProjects\Win32\Debug\files\points.js

In the folder the file exists.

 

a:/ servermodule.customFiles

files/signature_pad.js
files/points.js ------------------------------------> change to: files/point.js -
files/app.js
files/css/signature-pad.css
 
 
After the change, it does not capture the signature yet, it could help us Thanks
Link to comment
Share on other sites

Hi,

The point.js file is not needed it crept in by error just delete it and then in uniservermodule/CustomFiles/Strings ... remove the reference to it by deleting the line.

leave the css file where it is or if you move it, you will need to change the path ref to it in the uniservermodule/customfiles/strings .

Thanks

Mark

Link to comment
Share on other sites

  • 1 month later...

Hi,

On the mainform set fullscreen to false. I found that fixes it, but the mainform will get a border. I have no idea why it is happening, as I said I don't use unimobile yet (other than this simple test). Its not an issue with in my desktop implementation.

Regards

Mark

Link to comment
Share on other sites

Hi Bocchi,

I'm sure there must be, although I couldn't find it, I'm no expert here and am still learning Uni myself. I wish I had more time to help you debug it but I don't at the moment.

Maybe one of the more experienced guys on here can help out a bit. 

Good luck with it and when things ease off for me I'll take another look but hopefully you will have solved it by then.

Regards

Mark

Link to comment
Share on other sites

×
×
  • Create New...