@lvce-editor/panel-worker 2.10.1 → 2.10.3
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 +10 -0
- package/package.json +1 -1
package/dist/panelWorkerMain.js
CHANGED
|
@@ -1641,8 +1641,18 @@ const set = rpc => {
|
|
|
1641
1641
|
state.connected = true;
|
|
1642
1642
|
};
|
|
1643
1643
|
|
|
1644
|
+
const layoutCommands = {
|
|
1645
|
+
handleClickClose: 'Layout.hidePanel',
|
|
1646
|
+
handleClickMaximize: 'Layout.maximizePanel',
|
|
1647
|
+
handleClickUnmaximize: 'Layout.unmaximizePanel'
|
|
1648
|
+
};
|
|
1644
1649
|
const handleMessagePort = async (port, viewletCommandMap) => {
|
|
1645
1650
|
const executeViewletCommand = async (uid, command, ...args) => {
|
|
1651
|
+
const layoutCommand = layoutCommands[command];
|
|
1652
|
+
if (layoutCommand) {
|
|
1653
|
+
await invoke$1(layoutCommand);
|
|
1654
|
+
return;
|
|
1655
|
+
}
|
|
1646
1656
|
const fn = viewletCommandMap[`Panel.${command}`];
|
|
1647
1657
|
if (typeof fn !== 'function') {
|
|
1648
1658
|
throw new TypeError(`Viewlet command not found: ${command}`);
|