In the 2017 thread, it is not clear what needs to be changed, so here is
a result of "diff boot.js phyrama_boot.js" (you can see it in action @
http://pasta.phyrama.com/ ):
*****
68a69,103
> function touchHandler(event)
> {
> var touches = event.changedTouches,
> first = touches[0],
> type = "";
> switch(event.type)
> {
> case "touchstart": type = "mousedown"; break;
> case "touchmove": type = "mousemove"; break;
> case "touchend": type = "mouseup"; break;
> default: return;
> }
>
> // initMouseEvent(type, canBubble, cancelable, view, clickCount,
> // screenX, screenY, clientX, clientY, ctrlKey,
> // altKey, shiftKey, metaKey, button,
relatedTarget);
>
> var simulatedEvent = document.createEvent("MouseEvent");
> simulatedEvent.initMouseEvent(type, true, true, window, 1,
> first.screenX, first.screenY,
> first.clientX, first.clientY, false,
> false, false, false, 0/*left*/,
null);
>
> first.target.dispatchEvent(simulatedEvent);
> // event.preventDefault();
> }
>
> function touch2mouseinit()
> {
> document.addEventListener("touchstart", touchHandler, true);
> document.addEventListener("touchmove", touchHandler, true);
> document.addEventListener("touchend", touchHandler, true);
> document.addEventListener("touchcancel", touchHandler, true);
> }
>
91c126
< console.log ("connecting to " + adr);
---
> console.log ("Gnoga: connecting to " + adr);
94c129
< console.log ("trying again, connecting to " + adr);
---
> console.log ("Gnoga: trying again, connecting to " + adr);
100c135
< console.log ("connection successful");
---
> console.log ("Gnoga: connection successful");
105c140
< document.writeln ("If you are seeing this your browser or your
connection to the internet is blocking websockets.");
---
> document.writeln ("Gnoga: if you are seeing this your browser
or your connection to the internet is blocking websockets.");
107c142,146
< });
---
>
> touch2mouseinit();
>
> console.log ("Gnoga: ready.");
> });
_______________________________________________
Gnoga-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnoga-list