@sequent-org/moodboard 1.2.73 → 1.2.74

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.73",
3
+ "version": "1.2.74",
4
4
  "type": "module",
5
5
  "description": "Interactive moodboard",
6
6
  "main": "./src/index.js",
@@ -49,7 +49,8 @@ export class FileObject {
49
49
  fill: 0x333333,
50
50
  align: 'center',
51
51
  wordWrap: true,
52
- wordWrapWidth: this.width - 8,
52
+ breakWords: true,
53
+ wordWrapWidth: Math.max(1, this.width - 24), // горизонтальный padding 12px с каждой стороны
53
54
  lineHeight: 14,
54
55
  resolution: (typeof window !== 'undefined' && window.devicePixelRatio) ? window.devicePixelRatio : 1
55
56
  });
@@ -239,9 +240,11 @@ export class FileObject {
239
240
  _updateTextPosition() {
240
241
  if (!this.fileNameText) return;
241
242
 
242
- // Обновляем стиль текста (ограничиваем по подложке и переносим слова)
243
+ // Обновляем стиль текста (ограничиваем по подложке и переносим слова, учитываем padding)
244
+ const sidePad = 12;
243
245
  this.fileNameText.style.wordWrap = true;
244
- this.fileNameText.style.wordWrapWidth = Math.max(1, this.width - 16);
246
+ this.fileNameText.style.breakWords = true;
247
+ this.fileNameText.style.wordWrapWidth = Math.max(1, this.width - sidePad * 2);
245
248
  this.fileNameText.updateText();
246
249
 
247
250
  // Параметры иконки и отступов
@@ -611,7 +611,8 @@ export class PlacementTool extends BaseTool {
611
611
  fill: 0x333333,
612
612
  align: 'center',
613
613
  wordWrap: true,
614
- wordWrapWidth: Math.max(1, width - 16)
614
+ breakWords: true,
615
+ wordWrapWidth: Math.max(1, width - 24) // padding 12px по бокам
615
616
  });
616
617
  nameText.anchor.set(0.5, 0);
617
618
  nameText.x = width / 2;