ui-layout-manager-dev 0.0.36-dev → 0.0.37-dev
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/dist/cjs/index.js +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/Worker/LayoutWorker.js +3 -5
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LayoutManager/Controller/LayoutController.js +9 -5
- package/src/components/LayoutManager/Controller/Worker/LayoutEditor.js +2 -4
- package/src/components/LayoutManager/Controller/Worker/LayoutWorker.js +1 -1
package/package.json
CHANGED
|
@@ -79,8 +79,7 @@ export class LayoutController {
|
|
|
79
79
|
|
|
80
80
|
if (this.registeredContainers === this.numberOfContainers && !this.layoutLoaded) {
|
|
81
81
|
// console.log("All containers registered, layout is ready.");
|
|
82
|
-
this.sendToWorker(LAYOUT_WORKER_PROTOCOL.INITIALIZE_FLEXBOX
|
|
83
|
-
{ sizes: this.getContainerSizes() });
|
|
82
|
+
this.sendToWorker(LAYOUT_WORKER_PROTOCOL.INITIALIZE_FLEXBOX);
|
|
84
83
|
}
|
|
85
84
|
}
|
|
86
85
|
|
|
@@ -179,12 +178,17 @@ export class LayoutController {
|
|
|
179
178
|
break;
|
|
180
179
|
}
|
|
181
180
|
};
|
|
182
|
-
if (isInitial) {
|
|
183
|
-
// After the initial transformations have been applied, we can hide
|
|
184
|
-
// the loading screen for the root container.
|
|
181
|
+
if (this.layoutLoaded && !isInitial) {
|
|
185
182
|
this.containers[this.ldf.layoutRoot].current.hideLoadingScreen();
|
|
186
183
|
console.log("Layout is ready, hiding loading screen.");
|
|
187
184
|
}
|
|
185
|
+
if (isInitial) {
|
|
186
|
+
// After the initial style has been applied, we request the worker
|
|
187
|
+
// to apply layout before we hide the loading screen so containers
|
|
188
|
+
// are set to correct initial state.
|
|
189
|
+
this.layoutLoaded = true;
|
|
190
|
+
this.handleRootResize();
|
|
191
|
+
}
|
|
188
192
|
});
|
|
189
193
|
};
|
|
190
194
|
|
|
@@ -19,10 +19,8 @@ export class LayoutEditor {
|
|
|
19
19
|
* Initializes flexbox layout by processing LDF file.
|
|
20
20
|
* @param {Object} sizes Initial sizes of the containers.
|
|
21
21
|
*/
|
|
22
|
-
initializeFlexBox(
|
|
23
|
-
this.initializeNode(this.ldf.containers[this.ldf.layoutRoot]);
|
|
24
|
-
this.sizes = sizes;
|
|
25
|
-
this.applyLayoutToNode(this.ldf.layoutRoot);
|
|
22
|
+
initializeFlexBox() {
|
|
23
|
+
this.initializeNode(this.ldf.containers[this.ldf.layoutRoot]);
|
|
26
24
|
postMessage({
|
|
27
25
|
type: LAYOUT_WORKER_PROTOCOL.INITIALIZE_FLEXBOX,
|
|
28
26
|
data: this.transformations
|
|
@@ -17,7 +17,7 @@ self.onmessage = function (e) {
|
|
|
17
17
|
editor = new LayoutEditor(args.ldf);
|
|
18
18
|
break;
|
|
19
19
|
case LAYOUT_WORKER_PROTOCOL.INITIALIZE_FLEXBOX:
|
|
20
|
-
editor.initializeFlexBox(
|
|
20
|
+
editor.initializeFlexBox();
|
|
21
21
|
break;
|
|
22
22
|
case LAYOUT_WORKER_PROTOCOL.APPLY_SIZES:
|
|
23
23
|
editor.applySizes(args.sizes);
|