From 1ebe8babb4b0ac4b08584310bd35802457a25767 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 10 Jan 2023 17:23:09 +0400 Subject: [PATCH] Up --- src/style_manager/view/SectorView.ts | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/style_manager/view/SectorView.ts b/src/style_manager/view/SectorView.ts index 8b0d6cef0..5191ada27 100644 --- a/src/style_manager/view/SectorView.ts +++ b/src/style_manager/view/SectorView.ts @@ -14,6 +14,20 @@ export default class SectorView extends View { config: Config; pfx: string; + constructor(o: { config: Config }) { + // @ts-ignore + super(o); + const config = o.config || {}; + const { model } = this; + const { em } = config; + this.config = config; + this.em = em; + this.pfx = config.stylePrefix || ''; + this.listenTo(model, 'destroy remove', this.remove); + this.listenTo(model, 'change:open', this.updateOpen); + this.listenTo(model, 'change:visible', this.updateVisibility); + } + template({ pfx, label }: { pfx?: string; label: string }) { const icons = this.em?.getConfig().icons; const iconCaret = icons?.caret || ''; @@ -33,20 +47,6 @@ export default class SectorView extends View { }; } - constructor(o: { config: Config }) { - // @ts-ignore - super(o); - const config = o.config || {}; - const { model } = this; - const { em } = config; - this.config = config; - this.em = em; - this.pfx = config.stylePrefix || ''; - this.listenTo(model, 'destroy remove', this.remove); - this.listenTo(model, 'change:open', this.updateOpen); - this.listenTo(model, 'change:visible', this.updateVisibility); - } - updateOpen() { const { $el, model, pfx } = this; const isOpen = model.isOpen();