Don't update statusbar with nonsense from helper layer

main
Isaiah Odhner 2019-09-30 23:58:11 -04:00
parent 091a6eaab1
commit df021f1540
3 changed files with 13 additions and 3 deletions

View File

@ -13,7 +13,7 @@ function OnCanvasObject(x, y, width, height, hideMainCanvasHandles){
} }
} }
OnCanvasObject.prototype.position = function(){ OnCanvasObject.prototype.position = function(updateStatus){
var offset_left = parseFloat($canvas_area.css("padding-left")); var offset_left = parseFloat($canvas_area.css("padding-left"));
var offset_top = parseFloat($canvas_area.css("padding-top")); var offset_top = parseFloat($canvas_area.css("padding-top"));
this.$el.css({ this.$el.css({
@ -23,8 +23,10 @@ OnCanvasObject.prototype.position = function(){
width: magnification * this.width, width: magnification * this.width,
height: magnification * this.height, height: magnification * this.height,
}); });
$status_position.text(this.x + "," + this.y); if (updateStatus) {
$status_size.text(this.width + "," + this.height); $status_position.text(this.x + "," + this.y);
$status_size.text(this.width + "," + this.height);
}
}; };
OnCanvasObject.prototype.destroy = function(){ OnCanvasObject.prototype.destroy = function(){

View File

@ -26,6 +26,10 @@ function OnCanvasSelection(x, y, width, height){
OnCanvasSelection.prototype = Object.create(OnCanvasObject.prototype); OnCanvasSelection.prototype = Object.create(OnCanvasObject.prototype);
OnCanvasSelection.prototype.position = function(){
OnCanvasObject.prototype.position.call(this, true);
}
OnCanvasSelection.prototype.instantiate = function(_img, _passive){ OnCanvasSelection.prototype.instantiate = function(_img, _passive){
var sel = this; var sel = this;

View File

@ -38,6 +38,10 @@ function OnCanvasTextBox(x, y, width, height){
OnCanvasTextBox.prototype = Object.create(OnCanvasObject.prototype); OnCanvasTextBox.prototype = Object.create(OnCanvasObject.prototype);
OnCanvasTextBox.prototype.position = function(){
OnCanvasObject.prototype.position.call(this, true);
}
OnCanvasTextBox.prototype.instantiate = function(){ OnCanvasTextBox.prototype.instantiate = function(){
var tb = this; var tb = this;