rebasing on master
This commit is contained in:
@@ -19,8 +19,8 @@ define([
|
|||||||
maxLength: Infinity,
|
maxLength: Infinity,
|
||||||
modelField: 'styles.block.height',
|
modelField: 'styles.block.height',
|
||||||
onResize: function (event) {
|
onResize: function (event) {
|
||||||
var currentLength = parseFloat(this.view.model.get(this.options.modelField)),
|
var currentLength = parseFloat(this.view.model.get(this.options.modelField));
|
||||||
newLength = currentLength + this.options.transformationFunction(event.dy);
|
var newLength = currentLength + event.y;
|
||||||
newLength = Math.min(this.options.maxLength, Math.max(this.options.minLength, newLength));
|
newLength = Math.min(this.options.maxLength, Math.max(this.options.minLength, newLength));
|
||||||
this.view.model.set(this.options.modelField, newLength + 'px');
|
this.view.model.set(this.options.modelField, newLength + 'px');
|
||||||
}
|
}
|
||||||
|
@@ -48,8 +48,8 @@ define([
|
|||||||
elementSelector: '.mailpoet_image',
|
elementSelector: '.mailpoet_image',
|
||||||
resizeHandleSelector: '.mailpoet_image_resize_handle',
|
resizeHandleSelector: '.mailpoet_image_resize_handle',
|
||||||
onResize: function (event) {
|
onResize: function (event) {
|
||||||
var corner = this.$('.mailpoet_image').offset(),
|
var corner = this.$('.mailpoet_image').offset();
|
||||||
width = event.pageX - corner.left;
|
var width = event.pageX - corner.left;
|
||||||
this.view.model.set('width', width + 'px');
|
this.view.model.set('width', width + 'px');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user