Jump to content

Webserver buttons not touch friendly


Recommended Posts

Hi Everybody,

I have created an application for an offset machine (a printer for plastic packaging like flower pots). We can move inker motors in position (x, y, z).
It works like a charm and we are very happy with it. Now we want to be able to use an android tablet connected to the wifi of the machine to make adjustments.
We do not want to use VNC, because this is just not an ideal way for a "permanent" setup.
I have created an android app which connects to the webserver and shows the web page. This also works perfectly, but...
The buttons on the screen only react on "release" and not "press".  When using a mouse, it works, but a touch enabled device sends different events.
When I look at the source code of the webpages which are generated by unilogic, I see these events on the buttons:
 

$("#widgetV3f5e46a2a0c449cca4e9a35a1a21b850").mouseup(function(){i()});
$("#widgetV3f5e46a2a0c449cca4e9a35a1a21b850").keyup(function(){execute3f5e46a2a0c449cca4e9a35a1a21b850Actions();n=!1});
$("#widgetV3f5e46a2a0c449cca4e9a35a1a21b850").mousedown(function(){r()});
$("#widgetV3f5e46a2a0c449cca4e9a35a1a21b850").keydown(function(t){n||t.keyCode!=32||n=!0,execute3f5e46a2a0c449cca4e9a35a1a21b850Actions())});
$("#widgetV3f5e46a2a0c449cca4e9a35a1a21b850").keyup(function(){n=!1});

Looks like touch events are missing.
The pages are built using bootstrap. Bootstrap is touch aware, so you do see the button is pressed when you press it, but the event is not triggerred.
This is not a problem for buttons you just press once, but my interface requires the operator to hold a button to keep the motor running and release it to stop. As I said, this is working when using a mouse, but touch enabled devices just don't work.

Too bad we can not make any changes to the webserver on the unistream.

Does anyone have an idea of how to work around this?
Are there any plans on updating the webpage generator to support touch?

See below an image of the interface to get a little understanding of what I mean:

InkmotorControlInterface.png

The operator presses an arow to move the inker unit into the correct position. The inker will move as long as the operator touches the button.

Link to post
Share on other sites

Thanks for the fast response!

I just installed and tested on v1.30.52

Following events exist now:

$("#widgetV0f4f3bbf1be34d4c8cc57c87093239c3").on("pointerup",function(){c()});
$("#widgetV0f4f3bbf1be34d4c8cc57c87093239c3").keyup(function(){execute0f4f3bbf1be34d4c8cc57c87093239c3Actions(); n=!1});
$("#widgetV0f4f3bbf1be34d4c8cc57c87093239c3").on("pointerdown",function(){l()});
$("#widgetV0f4f3bbf1be34d4c8cc57c87093239c3").keydown(function(t){n||t.keyCode!=32||(n=!0,execute0f4f3bbf1be34d4c8cc57c87093239c3Actions())});
$("#widgetV0f4f3bbf1be34d4c8cc57c87093239c3").keyup(function(){n=!1});

I also see long press and select is disabled.
Great job!

This just totally made my day.

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...