|
|
@ -1,5 +1,6 @@ |
|
|
import { Model } from 'common'; |
|
|
import { Model } from 'common'; |
|
|
import { evPageSelect } from 'pages'; |
|
|
import { evPageSelect } from 'pages'; |
|
|
|
|
|
import Frames from './Frames'; |
|
|
|
|
|
|
|
|
export default class Canvas extends Model { |
|
|
export default class Canvas extends Model { |
|
|
defaults() { |
|
|
defaults() { |
|
|
@ -13,7 +14,7 @@ export default class Canvas extends Model { |
|
|
// Scripts to apply on all frames
|
|
|
// Scripts to apply on all frames
|
|
|
scripts: [], |
|
|
scripts: [], |
|
|
// Styles to apply on all frames
|
|
|
// Styles to apply on all frames
|
|
|
styles: [] |
|
|
styles: [], |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -21,6 +22,7 @@ export default class Canvas extends Model { |
|
|
const { em } = config; |
|
|
const { em } = config; |
|
|
this.config = config; |
|
|
this.config = config; |
|
|
this.em = em; |
|
|
this.em = em; |
|
|
|
|
|
this.set('frames', new Frames()); |
|
|
this.listenTo(this, 'change:zoom', this.onZoomChange); |
|
|
this.listenTo(this, 'change:zoom', this.onZoomChange); |
|
|
this.listenTo(em, 'change:device', this.updateDevice); |
|
|
this.listenTo(em, 'change:device', this.updateDevice); |
|
|
this.listenTo(em, evPageSelect, this._pageUpdated); |
|
|
this.listenTo(em, evPageSelect, this._pageUpdated); |
|
|
|