js-draw 0.25.0 → 0.25.1

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.
@@ -101,9 +101,11 @@ var Pointer = /** @class */ (function () {
101
101
  if (evt.buttons & 0x2) {
102
102
  device = PointerDevice.RightButtonMouse;
103
103
  }
104
- else if (!(evt.buttons & 0x1)) {
105
- device = PointerDevice.Other;
106
- }
104
+ // Commented out to work around a bug in old versions of Chrome:
105
+ // Left mouse up events were being given type "other".
106
+ // else if (!(evt.buttons & 0x1)) {
107
+ // device = PointerDevice.Other;
108
+ //}
107
109
  }
108
110
  return new Pointer(screenPos, canvasPos, (_b = evt.pressure) !== null && _b !== void 0 ? _b : null, evt.isPrimary, isDown, device, evt.pointerId, timeStamp);
109
111
  };
@@ -98,9 +98,11 @@ var Pointer = /** @class */ (function () {
98
98
  if (evt.buttons & 0x2) {
99
99
  device = PointerDevice.RightButtonMouse;
100
100
  }
101
- else if (!(evt.buttons & 0x1)) {
102
- device = PointerDevice.Other;
103
- }
101
+ // Commented out to work around a bug in old versions of Chrome:
102
+ // Left mouse up events were being given type "other".
103
+ // else if (!(evt.buttons & 0x1)) {
104
+ // device = PointerDevice.Other;
105
+ //}
104
106
  }
105
107
  return new Pointer(screenPos, canvasPos, (_b = evt.pressure) !== null && _b !== void 0 ? _b : null, evt.isPrimary, isDown, device, evt.pointerId, timeStamp);
106
108
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "js-draw",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "Draw pictures using a pen, touchscreen, or mouse! JS-draw is a drawing library for JavaScript and TypeScript. ",
5
5
  "types": "./dist/mjs/lib.d.ts",
6
6
  "main": "./dist/cjs/lib.js",
package/src/Pointer.ts CHANGED
@@ -122,9 +122,12 @@ export default class Pointer {
122
122
  if (device === PointerDevice.PrimaryButtonMouse) {
123
123
  if (evt.buttons & 0x2) {
124
124
  device = PointerDevice.RightButtonMouse;
125
- } else if (!(evt.buttons & 0x1)) {
126
- device = PointerDevice.Other;
127
125
  }
126
+ // Commented out to work around a bug in old versions of Chrome:
127
+ // Left mouse up events were being given type "other".
128
+ // else if (!(evt.buttons & 0x1)) {
129
+ // device = PointerDevice.Other;
130
+ //}
128
131
  }
129
132
 
130
133
  return new Pointer(