Skip to content

Commit

Permalink
Avoid updating frame offset on Layer click. Fixes #1711
Browse files Browse the repository at this point in the history
  • Loading branch information
artf committed Jan 13, 2019
1 parent 8af686c commit c1ba949
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/canvas/view/CanvasView.js
Expand Up @@ -25,7 +25,7 @@ module.exports = Backbone.View.extend({
*/
isElInViewport(el) {
const rect = getElement(el).getBoundingClientRect();
const frameRect = this.getFrameOffset(1);
const frameRect = this.getFrameOffset();
const rTop = rect.top;
const rLeft = rect.left;
return (
Expand Down
1 change: 1 addition & 0 deletions src/editor/model/Editor.js
Expand Up @@ -563,6 +563,7 @@ module.exports = Backbone.Model.extend({
* @private
*/
refreshCanvas() {
this.set('canvasOffset', null);
this.set('canvasOffset', this.get('Canvas').getOffset());
},

Expand Down

0 comments on commit c1ba949

Please sign in to comment.