Browse Source

Add frame:render event

canvas-spot
Artur Arseniev 3 years ago
parent
commit
d1f729dc3d
  1. 7
      src/canvas/view/FrameView.ts

7
src/canvas/view/FrameView.ts

@ -33,8 +33,7 @@ export default class FrameView extends ModuleView<Frame, HTMLIFrameElement> {
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<Frame, HTMLIFrameElement> {
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<Frame, HTMLIFrameElement> {
}
render() {
const { $el, ppfx } = this;
const { $el, ppfx, em } = this;
$el.attr({ class: `${ppfx}frame` });
this.renderScripts();
em.trigger('frame:render', this);
return this;
}

Loading…
Cancel
Save