Harry Rogers Posted August 2, 2011 Share 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 ? Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 2, 2011 Administrators Share 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 Link to comment Share on other sites More sharing options...
Harry Rogers Posted August 2, 2011 Author Share Posted August 2, 2011 Nice to hear Thank you Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted August 3, 2011 Administrators Share Posted August 3, 2011 My tests show that signing using finger is very difficult! Are you going to use a pen enabled device? Link to comment Share on other sites More sharing options...
Harry Rogers Posted August 3, 2011 Author Share 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 Link to comment Share on other sites More sharing options...
MarkLince Posted January 26, 2017 Share 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 Link to comment Share on other sites More sharing options...
MarkLince Posted February 15, 2017 Share 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 Link to comment Share on other sites More sharing options...
MarkLince Posted February 23, 2017 Share 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 Link to comment Share on other sites More sharing options...
Bocchi Posted March 15, 2017 Share Posted March 15, 2017 Can you send me a sample project?I don't know how to use jSignature. Thanks in advance. Link to comment Share on other sites More sharing options...
MarkLince Posted March 15, 2017 Share 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 Link to comment Share on other sites More sharing options...
MarkLince Posted March 15, 2017 Share 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 Link to comment Share on other sites More sharing options...
Bocchi Posted March 16, 2017 Share Posted March 16, 2017 I'm searching a solution for unigui mobile app. Can your code work in a unigui mobile app? Thanks. Link to comment Share on other sites More sharing options...
MarkLince Posted March 16, 2017 Share 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 Link to comment Share on other sites More sharing options...
asapltda Posted March 27, 2017 Share 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: Link to comment Share on other sites More sharing options...
asapltda Posted March 27, 2017 Share 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 Link to comment Share on other sites More sharing options...
asapltda Posted March 27, 2017 Share Posted March 27, 2017 files/css/signature-pad.css -->>>> This JS should be moved to: custumCSS? Link to comment Share on other sites More sharing options...
MarkLince Posted March 27, 2017 Share 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 Link to comment Share on other sites More sharing options...
Bocchi Posted May 11, 2017 Share 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? Link to comment Share on other sites More sharing options...
MarkLince Posted May 12, 2017 Share 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 Link to comment Share on other sites More sharing options...
MarkLince Posted May 17, 2017 Share 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 Link to comment Share on other sites More sharing options...
Bocchi Posted May 17, 2017 Share Posted May 17, 2017 Ok, thanks! Link to comment Share on other sites More sharing options...
MarkLince Posted May 21, 2017 Share 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 Link to comment Share on other sites More sharing options...
Bocchi Posted May 22, 2017 Share 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? Link to comment Share on other sites More sharing options...
MarkLince Posted May 23, 2017 Share 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 Link to comment Share on other sites More sharing options...
Bocchi Posted May 23, 2017 Share Posted May 23, 2017 I solve my problem by adding this line: UniSession.AddJS( 'setTimeout(resizeCanvas, 1000);' ); Best regards. Link to comment Share on other sites More sharing options...
Recommended Posts