@knotx/plugins-selection 0.4.15 → 0.5.0
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/index.cjs +5 -4
- package/dist/index.js +4 -3
- package/package.json +8 -8
package/dist/index.cjs
CHANGED
|
@@ -169,8 +169,9 @@ class Selection extends (_a = core.BasePlugin, _selected_dec = [decorators.regis
|
|
|
169
169
|
__publicField(this, "onBeforeStart", (_) => {
|
|
170
170
|
});
|
|
171
171
|
__publicField(this, "onBeforeDrag", () => {
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
const isDragging = Boolean(this.enableDrag && this.interaction.canInteract(core.InteractionPriority.MarqueeSelection));
|
|
173
|
+
this.isDragging = isDragging;
|
|
174
|
+
return isDragging;
|
|
174
175
|
});
|
|
175
176
|
__publicField(this, "onStart", ({ event, store }) => {
|
|
176
177
|
var _a2;
|
|
@@ -253,8 +254,8 @@ class Selection extends (_a = core.BasePlugin, _selected_dec = [decorators.regis
|
|
|
253
254
|
this.isDragging = false;
|
|
254
255
|
}
|
|
255
256
|
}
|
|
256
|
-
cancelAnimationFrame(this.updateFrameId);
|
|
257
|
-
this.updateFrameId = requestAnimationFrame(this.updateSelected);
|
|
257
|
+
core.cancelAnimationFrame(this.updateFrameId);
|
|
258
|
+
this.updateFrameId = core.requestAnimationFrame(this.updateSelected);
|
|
258
259
|
this.scrollingPosition = { x: 0, y: 0 };
|
|
259
260
|
});
|
|
260
261
|
__publicField(this, "updateSelected", () => {
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { bem, BasePlugin, InteractionPriority } from '@knotx/core';
|
|
1
|
+
import { bem, BasePlugin, InteractionPriority, cancelAnimationFrame, requestAnimationFrame } from '@knotx/core';
|
|
2
2
|
import { register, observable, inject, subscribe, tool, OnInit, OnDestroy } from '@knotx/decorators';
|
|
3
3
|
import SelectionArea from '@knotx/viselect';
|
|
4
4
|
|
|
@@ -163,8 +163,9 @@ class Selection extends (_a = BasePlugin, _selected_dec = [register("selected")]
|
|
|
163
163
|
__publicField(this, "onBeforeStart", (_) => {
|
|
164
164
|
});
|
|
165
165
|
__publicField(this, "onBeforeDrag", () => {
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
const isDragging = Boolean(this.enableDrag && this.interaction.canInteract(InteractionPriority.MarqueeSelection));
|
|
167
|
+
this.isDragging = isDragging;
|
|
168
|
+
return isDragging;
|
|
168
169
|
});
|
|
169
170
|
__publicField(this, "onStart", ({ event, store }) => {
|
|
170
171
|
var _a2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knotx/plugins-selection",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Selection Plugin for Knotx",
|
|
5
5
|
"author": "boenfu",
|
|
6
6
|
"license": "MIT",
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"dist"
|
|
29
29
|
],
|
|
30
30
|
"peerDependencies": {
|
|
31
|
-
"@knotx/plugins-canvas": "0.
|
|
31
|
+
"@knotx/plugins-canvas": "0.5.0"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@knotx/viselect": "^3.9.0",
|
|
35
35
|
"rxjs": "^7.8.1",
|
|
36
|
-
"@knotx/core": "0.
|
|
37
|
-
"@knotx/decorators": "0.
|
|
36
|
+
"@knotx/core": "0.5.0",
|
|
37
|
+
"@knotx/decorators": "0.5.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@knotx/build-config": "0.
|
|
41
|
-
"@knotx/eslint-config": "0.
|
|
42
|
-
"@knotx/plugins-canvas": "0.
|
|
43
|
-
"@knotx/typescript-config": "0.
|
|
40
|
+
"@knotx/build-config": "0.5.0",
|
|
41
|
+
"@knotx/eslint-config": "0.5.0",
|
|
42
|
+
"@knotx/plugins-canvas": "0.5.0",
|
|
43
|
+
"@knotx/typescript-config": "0.5.0"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "unbuild",
|