Jump to content
uniGUI Discussion Forums
Harry Rogers

Signature Capture

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 ?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Hi,

I know this is old post, but as it has no clear resolution/ update I thought I'd ask.

 

Is this fixed in the present version/ build of unigui? We need to caption client signatures and I'm hoping that by know this is not an issue.

Thanks

Mark

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Can you send me a sample project?
I don't know how to use jSignature.

Thanks in advance.

Share this post


Link to post
Share on other sites

Oh also, although this thread is in the mobile forum our sample is not a unigui mobile ap, but a webmode one.

Mark

Share this post


Link to post
Share on other sites

I'm searching a solution for unigui mobile app.

Can your code work in a unigui mobile app?

Thanks.

Share this post


Link to post
Share on other sites

 

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:

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I'm testing your solution but It work only if I resize the web browser.

How can I solve this problem?

Share this post


Link to post
Share on other sites

I haven't forgotten, I'm just extremely busy at the moment, I'll do my best to help at the weekend.

Mark

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Unfortunately in my project I can't change the fullscreen property of the mainform.

Is there another way to solve the problem?

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I solve my problem by adding this line:

UniSession.AddJS( 'setTimeout(resizeCanvas, 1000);' );
 
Best regards.

Share this post


Link to post
Share on other sites

×