Browse Source

"Udpate" typo fix

pull/2158/head
Juan 7 years ago
parent
commit
70bbfe09d7
  1. 2
      src/canvas/view/CanvasView.js
  2. 10
      src/canvas/view/FrameView.js
  3. 8
      src/utils/Sorter.js

2
src/canvas/view/CanvasView.js

@ -262,7 +262,7 @@ export default Backbone.View.extend({
body.append(this.getJsContainer());
em.trigger('loaded');
this.frame.el.contentWindow.onscroll = this.onFrameScroll;
this.frame.udpateOffset();
this.frame.updateOffset();
// Avoid the default link behaviour in the canvas
body.on(

10
src/canvas/view/FrameView.js

@ -13,7 +13,7 @@ export default Backbone.View.extend({
},
initialize(o) {
bindAll(this, 'udpateOffset');
bindAll(this, 'updateOffset');
this.config = o.config || {};
this.ppfx = this.config.pStylePrefix || '';
this.em = this.config.em;
@ -45,19 +45,19 @@ export default Backbone.View.extend({
const noChanges = currW == newW && currH == newH;
style.width = newW;
style.height = newH;
this.udpateOffset();
this.updateOffset();
// Prevent fixed highlighting box which appears when on
// component hover during the animation
em.stopDefault({ preserveSelected: 1 });
noChanges ? this.udpateOffset() : $el.on(motionsEv, this.udpateOffset);
noChanges ? this.updateOffset() : $el.on(motionsEv, this.updateOffset);
},
udpateOffset() {
updateOffset() {
const em = this.em;
const offset = em.get('Canvas').getOffset();
em.set('canvasOffset', offset);
em.runDefault({ preserveSelected: 1 });
this.$el.off(motionsEv, this.udpateOffset);
this.$el.off(motionsEv, this.updateOffset);
},
getDoc() {

8
src/utils/Sorter.js

@ -27,7 +27,7 @@ export default Backbone.View.extend({
'onMove',
'endMove',
'rollback',
'udpateOffset',
'updateOffset',
'moveDragHelper'
);
var o = opt || {};
@ -69,8 +69,8 @@ export default Backbone.View.extend({
this.activeTextModel = null;
if (this.em && this.em.on) {
this.em.on('change:canvasOffset', this.udpateOffset);
this.udpateOffset();
this.em.on('change:canvasOffset', this.updateOffset);
this.updateOffset();
}
},
@ -98,7 +98,7 @@ export default Backbone.View.extend({
/**
* Triggered when the offset of the editro is changed
*/
udpateOffset() {
updateOffset() {
const offset = this.em.get('canvasOffset') || {};
this.offTop = offset.top;
this.offLeft = offset.left;

Loading…
Cancel
Save