var left_diff = (this.canvasEl.width - old_canvas_width) / 2;
var top_diff = (this.canvasEl.height - old_canvas_height) / 2;
- var new_left = old_left - (this.canvasEl.width - old_canvas_width) / 2;
- var new_top = old_top - (this.canvasEl.height - old_canvas_height) / 2;
+ var new_left = old_left - left_diff;
+ var new_top = old_top - top_diff;
console.log("-----------------------------------------");