From d1f729dc3d34bda8ffaff99a22ff0ee57c4411f9 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Wed, 2 Aug 2023 14:29:58 +0400 Subject: [PATCH] Add frame:render event --- src/canvas/view/FrameView.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/canvas/view/FrameView.ts b/src/canvas/view/FrameView.ts index beaade42c..076c1aa32 100644 --- a/src/canvas/view/FrameView.ts +++ b/src/canvas/view/FrameView.ts @@ -33,8 +33,7 @@ export default class FrameView extends ModuleView { constructor(model: Frame, view?: FrameWrapView) { super({ model }); bindAll(this, 'updateClientY', 'stopAutoscroll', 'autoscroll', '_emitUpdate'); - const { el, em } = this; - //el = em.config.el + const { el } = this; //@ts-ignore this.module._config = { ...(this.config || {}), @@ -42,7 +41,6 @@ export default class FrameView extends ModuleView { frameView: this, //canvasView: view?.cv }; - //console.log(this.config) this.frameWrapView = view; this.showGlobalTools = debounce(this.showGlobalTools.bind(this), 50); const cvModel = this.getCanvasModel(); @@ -257,9 +255,10 @@ export default class FrameView extends ModuleView { } render() { - const { $el, ppfx } = this; + const { $el, ppfx, em } = this; $el.attr({ class: `${ppfx}frame` }); this.renderScripts(); + em.trigger('frame:render', this); return this; }