polarvo-layout 1.0.50 → 1.0.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": "polarvo-layout",
3
- "version": "1.0.50",
3
+ "version": "1.0.52",
4
4
  "type": "module",
5
5
  "author": "unigence <unigencelab@gmail.com>",
6
6
  "repository": {
@@ -73,6 +73,9 @@ class FreeDropEngine {
73
73
  this._activeSection = $section;
74
74
  this._activeMode = $mode;
75
75
  this._activeConfig = $config;
76
+
77
+ this.setActiveElement(null);
78
+
76
79
  });
77
80
 
78
81
  this._subscribe('system:setElements', ({ $elements }) => {
@@ -56,6 +56,8 @@ class GridDropEngine {
56
56
  this._activeSection = $section;
57
57
  this._activeMode = $mode;
58
58
  this._activeConfig = $config;
59
+
60
+ this.setActiveElement(null);
59
61
  });
60
62
 
61
63
  this._subscribe('system:setElements', ({ $elements }) => {
@@ -276,19 +276,19 @@ class EngineManager {
276
276
  const newWidth = newValue.px;
277
277
  const newHeight = newValue.px / calculateAspectRatio(newValue.aspectRatio);
278
278
 
279
- await nextTick()
280
- // nextTick(() => {
279
+ await nextTick(() => {
280
+ // nextTick(() => {
281
281
  this.setContainerSize();
282
+ });
283
+ const normalizeElements = dataConverter.normalize(this.state.elements, oldWidth, oldHeight);
284
+ const denormalizedElements = dataConverter.denormalize(normalizeElements, newWidth, newHeight);
282
285
 
283
- const normalizeElements = dataConverter.normalize(this.state.elements, oldWidth, oldHeight);
284
- const denormalizedElements = dataConverter.denormalize(normalizeElements, newWidth, newHeight);
285
-
286
- this.state.elements = denormalizedElements;
286
+ this.state.elements = denormalizedElements;
287
287
 
288
- this.eventBus.emit('system:requestElementsScale', {
289
- $elements: this.state.elements,
290
- timestamp: Date.now(),
291
- });
288
+ this.eventBus.emit('system:requestElementsScale', {
289
+ $elements: this.state.elements,
290
+ timestamp: Date.now(),
291
+ });
292
292
  // });
293
293
  }
294
294