@sequent-org/moodboard 1.2.106 → 1.2.107

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.2.106",
3
+ "version": "1.2.107",
4
4
  "type": "module",
5
5
  "description": "Interactive moodboard",
6
6
  "main": "./src/index.js",
@@ -38,7 +38,7 @@ export class PlacementTool extends BaseTool {
38
38
  // Состояние выбранного изображения
39
39
  this.selectedImage = null; // { file, fileName, fileSize, mimeType, properties }
40
40
  this.ghostContainer = null; // Контейнер для "призрака" файла, изображения, текста, записки, эмоджи, фрейма или фигур
41
- // Оригинальные стили курсора PIXI, чтобы можно было временно переопределить pointer для текстового инструмента
41
+ // Оригинальные стили курсора PIXI, чтобы можно было временно переопределить pointer/default для текстового инструмента
42
42
  this._origCursorStyles = null;
43
43
 
44
44
  if (this.eventBus) {
@@ -575,8 +575,8 @@ export class PlacementTool extends BaseTool {
575
575
  }
576
576
 
577
577
  /**
578
- * Включает/выключает временное переопределение cursorStyles.pointer в PIXI,
579
- * чтобы во время работы с текстом курсор оставался текстовым даже при наведении на объекты.
578
+ * Включает/выключает временное переопределение cursorStyles.pointer/default в PIXI,
579
+ * чтобы во время работы с текстом курсор оставался системным 'text' даже при наведении на объекты.
580
580
  * @param {boolean} forceReset - если true, всегда восстанавливает оригинальные стили
581
581
  */
582
582
  _updateCursorOverride(forceReset = false) {
@@ -593,15 +593,22 @@ export class PlacementTool extends BaseTool {
593
593
  // Сохраняем оригинальные стили только один раз
594
594
  if (!this._origCursorStyles) {
595
595
  this._origCursorStyles = {
596
- pointer: cursorStyles.pointer
596
+ pointer: cursorStyles.pointer,
597
+ default: cursorStyles.default
597
598
  };
598
599
  }
599
- cursorStyles.pointer = TEXT_CURSOR;
600
+ // И pointer, и default делаем системным текстовым курсором,
601
+ // чтобы при наведении/уходе с объектов тип курсора не менялся.
602
+ cursorStyles.pointer = 'text';
603
+ cursorStyles.default = 'text';
600
604
  } else if (this._origCursorStyles) {
601
- // Восстанавливаем оригинальный pointer
605
+ // Восстанавливаем оригинальные значения
602
606
  if (Object.prototype.hasOwnProperty.call(this._origCursorStyles, 'pointer')) {
603
607
  cursorStyles.pointer = this._origCursorStyles.pointer;
604
608
  }
609
+ if (Object.prototype.hasOwnProperty.call(this._origCursorStyles, 'default')) {
610
+ cursorStyles.default = this._origCursorStyles.default;
611
+ }
605
612
  this._origCursorStyles = null;
606
613
  }
607
614
  } catch (_) {