Harry Rogers 19 Posted August 2, 2011 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
Farshad Mohajeri 1328 Posted August 2, 2011 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. 1 Share this post Link to post Share on other sites
Harry Rogers 19 Posted August 2, 2011 Nice to hear Thank you Share this post Link to post Share on other sites
Farshad Mohajeri 1328 Posted August 3, 2011 My tests show that signing using finger is very difficult! Are you going to use a pen enabled device? Share this post Link to post Share on other sites
Harry Rogers 19 Posted August 3, 2011 I was thinking of a stylus compatible with capacitive screens e.g. http://www.mobilefun.co.uk/search/?searchterm=capacitive+stylus there seem to be quite a few available now - some get very poor reviews though Share this post Link to post Share on other sites
MarkLince 10 Posted January 26, 2017 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
MarkLince 10 Posted February 15, 2017 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
MarkLince 10 Posted February 23, 2017 OK, no takers? Decided to use this JQuery instead https://willowsystems.github.io/jSignature/#/about/ Looks just what I need Thanks anyway Mark Share this post Link to post Share on other sites
Bocchi 1 Posted March 15, 2017 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
MarkLince 10 Posted March 15, 2017 Hi Bocchi, I didn't actually use Jsignature in the end I used this one instead https://github.com/szimek/signature_pad, but the principles are the same. If you like I will try and put together a sample project for you to look at in the next day or so. Regards Mark Share this post Link to post Share on other sites
MarkLince 10 Posted March 15, 2017 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
Bocchi 1 Posted March 16, 2017 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
MarkLince 10 Posted March 16, 2017 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 Share this post Link to post Share on other sites
asapltda 9 Posted March 27, 2017 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
asapltda 9 Posted March 27, 2017 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
asapltda 9 Posted March 27, 2017 files/css/signature-pad.css -->>>> This JS should be moved to: custumCSS? Share this post Link to post Share on other sites
MarkLince 10 Posted March 27, 2017 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
Bocchi 1 Posted May 11, 2017 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
MarkLince 10 Posted May 12, 2017 I'll take a look when I have a moment (bit hectic at the min) and get back to you soon. Mark Share this post Link to post Share on other sites
MarkLince 10 Posted May 17, 2017 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
MarkLince 10 Posted May 21, 2017 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
Bocchi 1 Posted May 22, 2017 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
MarkLince 10 Posted May 23, 2017 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
Bocchi 1 Posted May 23, 2017 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