MCPcopy Create free account
hub / github.com/alibaba/lowcode-engine / toggleFloatStatus

Method toggleFloatStatus

packages/editor-skeleton/src/skeleton.ts:285–297  ·  view source on GitHub ↗
(panel: Panel)

Source from the content-addressed store, hash-verified

283 */
284 @action
285 toggleFloatStatus(panel: Panel) {
286 const isFloat = panel?.parent?.name === 'leftFloatArea';
287 if (isFloat) {
288 this.leftFloatArea.remove(panel);
289 this.leftFixedArea.add(panel);
290 this.leftFixedArea.container.active(panel);
291 } else {
292 this.leftFixedArea.remove(panel);
293 this.leftFloatArea.add(panel);
294 this.leftFloatArea.container.active(panel);
295 }
296 engineConfig.getPreference().set(`${panel.name}-pinned-status-isFloat`, !isFloat, 'skeleton');
297 }
298
299 buildFromConfig(config?: EditorConfig, components: PluginClassSet = {}) {
300 if (config) {

Callers 2

setupEventsMethod · 0.95
setDisplayMethod · 0.80

Calls 5

removeMethod · 0.65
addMethod · 0.65
activeMethod · 0.65
setMethod · 0.65
getPreferenceMethod · 0.65

Tested by

no test coverage detected