@ -97,6 +97,7 @@ export default {
);
em[method]('change:canvasOffset', this.updateAttached, this);
em[method]('frame:updated', this.onFrameUpdated, this);
em[method]('canvas:updateTools', this.onFrameUpdated, this);
em.get('Canvas')
.getFrames()
.forEach(frame => {
@ -490,8 +490,8 @@ export default (config = {}) => {
*
* @private
*/
refresh() {
em.refreshCanvas();
refresh(opts) {
em.refreshCanvas(opts);
},
/**
@ -614,9 +614,10 @@ export default Backbone.Model.extend({
* Update canvas dimensions and refresh data useful for tools positioning
refreshCanvas() {
refreshCanvas(opts = {}) {
this.set('canvasOffset', null);
this.set('canvasOffset', this.get('Canvas').getOffset());
opts.tools && this.trigger('canvas:updateTools');