@sequent-org/moodboard 1.2.51 → 1.2.52

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.51",
3
+ "version": "1.2.52",
4
4
  "type": "module",
5
5
  "description": "Interactive moodboard",
6
6
  "main": "./src/index.js",
@@ -11,25 +11,9 @@ export class BoardService {
11
11
 
12
12
  async init(getCanvasSize) {
13
13
  this._getCanvasSize = getCanvasSize;
14
- // Инициализируем сетку (по умолчанию линейная)
15
- const canvasSize = (this._getCanvasSize?.() || {});
16
- this.grid = GridFactory.createGrid('line', {
17
- enabled: true,
18
- size: 32,
19
- width: canvasSize.width || 800,
20
- height: canvasSize.height || 600,
21
- color: 0x6a6aff,
22
- opacity: 0.4
23
- });
24
- this.grid.updateVisual();
25
- this.pixi.setGrid(this.grid);
26
- this.eventBus.emit(Events.UI.GridCurrent, { type: 'line' });
27
- // Сообщаем о текущих данных сетки для сохранения в boardData
28
- try {
29
- this.eventBus.emit(Events.Grid.BoardDataChanged, {
30
- grid: { type: 'line', options: this.grid.serialize ? this.grid.serialize() : {} }
31
- });
32
- } catch (_) {}
14
+ // Не создаём сетку по умолчанию, чтобы избежать визуального переключения.
15
+ // Сетка будет установлена из сохранённых настроек через Events.UI.GridChange.
16
+ this.grid = null;
33
17
 
34
18
  this._attachEvents();
35
19
  }