Browse Source

Update frame updateOffset

pull/4378/head
Artur Arseniev 4 years ago
parent
commit
0df8b2fd2d
  1. 10
      src/canvas/view/FrameWrapView.ts

10
src/canvas/view/FrameWrapView.ts

@ -16,15 +16,15 @@ export default class FrameWrapView extends View<Frame> {
elTools?: HTMLElement; elTools?: HTMLElement;
frame: FrameView; frame: FrameView;
dragger?: Dragger; dragger?: Dragger;
cv: CanvasView cv: CanvasView;
classAnim: string classAnim: string;
constructor(model: Frame, canvasView: CanvasView) { constructor(model: Frame, canvasView: CanvasView) {
super({model}); super({ model });
bindAll(this, 'onScroll', 'frameLoaded', 'updateOffset', 'remove', 'startDrag'); bindAll(this, 'onScroll', 'frameLoaded', 'updateOffset', 'remove', 'startDrag');
//console.log(model.module) //console.log(model.module)
const config = { const config = {
...(model.config), ...model.config,
frameWrapView: this, frameWrapView: this,
}; };
this.cv = canvasView; this.cv = canvasView;
@ -88,7 +88,7 @@ export default class FrameWrapView extends View<Frame> {
if (!em) return; if (!em) return;
em.runDefault({ preserveSelected: 1 }); em.runDefault({ preserveSelected: 1 });
$el.removeClass(this.classAnim); $el.removeClass(this.classAnim);
frame.model._emitUpdated(); frame?.model?._emitUpdated();
} }
updatePos(md?: boolean) { updatePos(md?: boolean) {

Loading…
Cancel
Save