* setup events * * @memberof Skeleton
()
| 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 |
no test coverage detected