@sequent-org/moodboard 1.0.13 → 1.0.14

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": "@sequent-org/moodboard",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "type": "module",
5
5
  "description": "Interactive moodboard",
6
6
  "main": "./src/index.js",
@@ -308,6 +308,11 @@ export class SelectTool extends BaseTool {
308
308
  * Перемещение мыши
309
309
  */
310
310
  onMouseMove(event) {
311
+ // Проверяем, что инструмент не уничтожен
312
+ if (this.destroyed) {
313
+ return;
314
+ }
315
+
311
316
  super.onMouseMove(event);
312
317
 
313
318
  // Обновляем текущие координаты мыши
@@ -468,6 +473,11 @@ export class SelectTool extends BaseTool {
468
473
  * Тестирование попадания курсора
469
474
  */
470
475
  hitTest(x, y) {
476
+ // Проверяем, что инструмент не уничтожен
477
+ if (this.destroyed) {
478
+ return { type: 'empty' };
479
+ }
480
+
471
481
  // Сначала проверяем ручки изменения размера (они имеют приоритет)
472
482
  if (this.resizeHandles) {
473
483
  const pixiObjectAtPoint = this.getPixiObjectAt(x, y);
@@ -509,7 +519,7 @@ export class SelectTool extends BaseTool {
509
519
  return null;
510
520
  }
511
521
 
512
- if (!this.resizeHandles || !this.resizeHandles.app) return null;
522
+ if (!this.resizeHandles || !this.resizeHandles.app || !this.resizeHandles.container) return null;
513
523
 
514
524
  const point = new PIXI.Point(x, y);
515
525
 
@@ -1051,6 +1061,11 @@ export class SelectTool extends BaseTool {
1051
1061
  * Обновление курсора
1052
1062
  */
1053
1063
  updateCursor(event) {
1064
+ // Проверяем, что инструмент не уничтожен
1065
+ if (this.destroyed) {
1066
+ return;
1067
+ }
1068
+
1054
1069
  const hitResult = this.hitTest(event.x, event.y);
1055
1070
 
1056
1071
  switch (hitResult.type) {