var sx = Math.min(this.canvasEl.width - this.thumbEl.getWidth(), this.thumbEl.getLeft(true) - this.previewEl.getLeft(true));
var sy = Math.min(this.canvasEl.height - this.thumbEl.getHeight(), this.thumbEl.getTop(true) - this.previewEl.getTop(true));
+ console.log("sx: " + sx);
+ console.log("sy: " + sy);
+
sx = sx < 0 ? 0 : (sx / this.getScaleLevel());
sy = sy < 0 ? 0 : (sy / this.getScaleLevel());