@windborne/grapher 1.0.28 → 1.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windborne/grapher",
3
- "version": "1.0.28",
3
+ "version": "1.0.29",
4
4
  "description": "Graphing library",
5
5
  "main": "src/index.js",
6
6
  "module": "dist/bundle.esm.js",
@@ -171,7 +171,11 @@ function GraphBody({ stateController, webgl, bodyHeight, boundsSelectionEnabled,
171
171
  clientX: touch.clientX,
172
172
  clientY: touch.clientY
173
173
  });
174
- if (event.cancelable) event.preventDefault();
174
+
175
+ // Only prevent default if touch is within grapher bounds
176
+ if (event.cancelable && event.target.closest('.graph-body')) {
177
+ event.preventDefault();
178
+ }
175
179
  };
176
180
 
177
181
  const onGlobalTouchMove = (event) => {
@@ -184,7 +188,11 @@ function GraphBody({ stateController, webgl, bodyHeight, boundsSelectionEnabled,
184
188
  clientX: touch.clientX,
185
189
  clientY: touch.clientY
186
190
  });
187
- if (event.cancelable) event.preventDefault();
191
+
192
+ // Only prevent default if touch is within grapher bounds
193
+ if (event.cancelable && event.target.closest('.graph-body')) {
194
+ event.preventDefault();
195
+ }
188
196
  };
189
197
 
190
198
  const onGlobalTouchEnd = () => {