From fa13dd03f69817a45d31787544fad52b2beb77a0 Mon Sep 17 00:00:00 2001 From: Artur Arseniev Date: Tue, 1 Feb 2022 12:15:02 +0100 Subject: [PATCH] Up --- src/canvas/model/Canvas.js | 4 +++- src/editor/view/EditorView.js | 10 ++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/canvas/model/Canvas.js b/src/canvas/model/Canvas.js index 700b47852..558ea6a35 100644 --- a/src/canvas/model/Canvas.js +++ b/src/canvas/model/Canvas.js @@ -1,5 +1,6 @@ import { Model } from 'common'; import { evPageSelect } from 'pages'; +import Frames from './Frames'; export default class Canvas extends Model { defaults() { @@ -13,7 +14,7 @@ export default class Canvas extends Model { // Scripts to apply on all frames scripts: [], // Styles to apply on all frames - styles: [] + styles: [], }; } @@ -21,6 +22,7 @@ export default class Canvas extends Model { const { em } = config; this.config = config; this.em = em; + this.set('frames', new Frames()); this.listenTo(this, 'change:zoom', this.onZoomChange); this.listenTo(em, 'change:device', this.updateDevice); this.listenTo(em, evPageSelect, this._pageUpdated); diff --git a/src/editor/view/EditorView.js b/src/editor/view/EditorView.js index 3ef08f2b4..c563c14f9 100644 --- a/src/editor/view/EditorView.js +++ b/src/editor/view/EditorView.js @@ -21,7 +21,7 @@ export default Backbone.View.extend({ }, render() { - const { model, $el, conf } = this; + const { $el, conf, model } = this; const pfx = conf.stylePrefix; const contEl = $(conf.el || `body ${conf.container}`); appendStyles(conf.cssIcons, { unique: 1, prepand: 1 }); @@ -32,12 +32,10 @@ export default Backbone.View.extend({ $el.append(this.cv.render()); $el.append(this.pn.render()); + $el.attr('class', `${pfx}editor ${pfx}one-bg ${pfx}two-color`); - contEl - .addClass(`${pfx}editor-cont`) - .empty() - .append($el); + contEl.addClass(`${pfx}editor-cont`).empty().append($el); return this; - } + }, });