From bbcb58e9167bc4e9aafa47ab057be41463e2b227 Mon Sep 17 00:00:00 2001
From: johnshaughnessy <johnfshaughnessy@gmail.com>
Date: Thu, 8 Nov 2018 17:44:33 -0800
Subject: [PATCH] Fix touchscreen user bindings

---
 .../userinput/bindings/touchscreen-user.js    | 28 ++++++-------------
 1 file changed, 9 insertions(+), 19 deletions(-)

diff --git a/src/systems/userinput/bindings/touchscreen-user.js b/src/systems/userinput/bindings/touchscreen-user.js
index 02c8d833c..f96a8558a 100644
--- a/src/systems/userinput/bindings/touchscreen-user.js
+++ b/src/systems/userinput/bindings/touchscreen-user.js
@@ -22,6 +22,7 @@ export const touchscreenUserBindings = addSetsToBindings({
       xform: xforms.scale(0.25)
     },
     {
+      src: {},
       dest: { value: zero },
       xform: xforms.always(0)
     },
@@ -81,16 +82,12 @@ export const touchscreenUserBindings = addSetsToBindings({
     {
       src: { value: paths.device.touchscreen.isTouchingGrabbable },
       dest: { value: paths.actions.cursor.grab },
-      xform: xforms.copy,
-      root: "touchscreen.isTouchingGrabbable",
-      priority: 100
+      xform: xforms.copy
     },
     {
       src: { value: paths.device.hud.penButton },
       dest: { value: paths.actions.spawnPen },
-      xform: xforms.rising,
-      root: "hud.penButton",
-      priority: 100
+      xform: xforms.rising
     }
   ],
   [sets.cursorHoldingInteractable]: [
@@ -98,36 +95,29 @@ export const touchscreenUserBindings = addSetsToBindings({
       src: { value: paths.device.touchscreen.isTouchingGrabbable },
       dest: { value: paths.actions.cursor.drop },
       xform: xforms.falling,
-      root: "touchscreen.cursorDrop",
-      priority: 100
+      priority: 1
     }
   ],
 
   [sets.cursorHoveringOnPen]: [],
   [sets.cursorHoldingPen]: [
-    {
-      src: { value: paths.device.touchscreen.isTouchingGrabbable },
-      dest: { value: paths.noop },
-      xform: xforms.noop,
-      root: "touchscreen.cursorDrop",
-      priority: 200
-    },
     {
       src: { value: paths.device.touchscreen.isTouchingGrabbable },
       dest: { value: paths.actions.cursor.startDrawing },
-      xform: xforms.risingWithFrameDelay(5)
+      xform: xforms.risingWithFrameDelay(5),
+      priority: 2
     },
     {
       src: { value: paths.device.touchscreen.isTouchingGrabbable },
       dest: { value: paths.actions.cursor.stopDrawing },
-      xform: xforms.falling
+      xform: xforms.falling,
+      priority: 2
     },
     {
       src: { value: paths.device.hud.penButton },
       dest: { value: paths.actions.cursor.drop },
       xform: xforms.rising,
-      root: "hud.penButton",
-      priority: 200
+      priority: 1
     }
   ]
 });
-- 
GitLab