@sequent-org/moodboard 1.2.17 → 1.2.18

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.17",
3
+ "version": "1.2.18",
4
4
  "type": "module",
5
5
  "description": "Interactive moodboard",
6
6
  "main": "./src/index.js",
package/src/core/index.js CHANGED
@@ -2062,6 +2062,15 @@ export class CoreMoodBoard {
2062
2062
  * Создание объекта из полных данных (для загрузки с сервера)
2063
2063
  */
2064
2064
  createObjectFromData(objectData) {
2065
+ // Инициализируем флаг компенсации пивота для загруженных объектов,
2066
+ // чтобы PIXI не применял компенсацию повторно
2067
+ if (!objectData.transform) {
2068
+ objectData.transform = {};
2069
+ }
2070
+ if (objectData.transform.pivotCompensated === undefined) {
2071
+ objectData.transform.pivotCompensated = true;
2072
+ }
2073
+
2065
2074
  // Используем существующие данные объекта (с его ID, размерами и т.д.)
2066
2075
  this.state.addObject(objectData);
2067
2076
  this.pixi.createObject(objectData);