@lvce-editor/panel-worker 2.10.4 → 2.10.5
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/panelWorkerMain.js +7 -2
- package/package.json +1 -1
package/dist/panelWorkerMain.js
CHANGED
|
@@ -1646,12 +1646,17 @@ const layoutCommands = {
|
|
|
1646
1646
|
handleClickMaximize: 'Layout.maximizePanel',
|
|
1647
1647
|
handleClickUnmaximize: 'Layout.unmaximizePanel'
|
|
1648
1648
|
};
|
|
1649
|
+
const forwardLayoutCommand = layoutCommand => {
|
|
1650
|
+
setTimeout(() => {
|
|
1651
|
+
void invoke('Viewlet.forwardRendererWorkerCommand', layoutCommand);
|
|
1652
|
+
}, 0);
|
|
1653
|
+
};
|
|
1649
1654
|
const handleMessagePort = async (port, viewletCommandMap) => {
|
|
1650
1655
|
const executeViewletCommand = async (uid, command, ...args) => {
|
|
1651
1656
|
const layoutCommand = layoutCommands[command];
|
|
1652
1657
|
if (layoutCommand) {
|
|
1653
|
-
//
|
|
1654
|
-
|
|
1658
|
+
// Forward after this direct event returns so layout callbacks use an idle worker RPC.
|
|
1659
|
+
forwardLayoutCommand(layoutCommand);
|
|
1655
1660
|
return;
|
|
1656
1661
|
}
|
|
1657
1662
|
const fn = viewletCommandMap[`Panel.${command}`];
|