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.
- package/dist/bundle.js +1 -1
- package/dist/cjs/Pointer.js +5 -3
- package/dist/mjs/Pointer.mjs +5 -3
- package/package.json +1 -1
- package/src/Pointer.ts +5 -2
package/dist/cjs/Pointer.js
CHANGED
@@ -101,9 +101,11 @@ var Pointer = /** @class */ (function () {
|
|
101
101
|
if (evt.buttons & 0x2) {
|
102
102
|
device = PointerDevice.RightButtonMouse;
|
103
103
|
}
|
104
|
-
|
105
|
-
|
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
|
};
|
package/dist/mjs/Pointer.mjs
CHANGED
@@ -98,9 +98,11 @@ var Pointer = /** @class */ (function () {
|
|
98
98
|
if (evt.buttons & 0x2) {
|
99
99
|
device = PointerDevice.RightButtonMouse;
|
100
100
|
}
|
101
|
-
|
102
|
-
|
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
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(
|