MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / setupEvents

Method setupEvents

packages/editor-skeleton/src/skeleton.ts:263–276  ·  view source on GitHub ↗

* setup events * * @memberof Skeleton

()

Source from the content-addressed store, hash-verified

261 * @memberof Skeleton
262 */
263 setupEvents() {
264 // adjust pinned status when panel shown
265 this.editor.eventBus.on(SkeletonEvents.PANEL_SHOW, (panelName, panel) => {
266 const panelNameKey = `${panelName}-pinned-status-isFloat`;
267 const isInFloatAreaPreferenceExists = engineConfig.getPreference()?.contains(panelNameKey, 'skeleton');
268 if (isInFloatAreaPreferenceExists) {
269 const isInFloatAreaFromPreference = engineConfig.getPreference()?.get(panelNameKey, 'skeleton');
270 const isCurrentInFloatArea = panel?.isChildOfFloatArea();
271 if (isInFloatAreaFromPreference !== isCurrentInFloatArea) {
272 this.toggleFloatStatus(panel);
273 }
274 }
275 });
276 }
277
278 /**
279 * set isFloat status for panel

Callers 1

constructorMethod · 0.95

Calls 6

toggleFloatStatusMethod · 0.95
isChildOfFloatAreaMethod · 0.80
onMethod · 0.65
containsMethod · 0.65
getPreferenceMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected