Replaced borderWith with strokeWidth as it differs between wallpaper and canvas
This commit is contained in:
@@ -35,8 +35,8 @@ function Viewport(canvas) {
|
|||||||
if (croppedData) {
|
if (croppedData) {
|
||||||
// Calculate the new position after screenresize and when the
|
// Calculate the new position after screenresize and when the
|
||||||
// image already has been cropped to a certain position.
|
// image already has been cropped to a certain position.
|
||||||
var left = _rect.left + _borderWidth - (canvas.getImage().width * croppedData.x);
|
var left = _rect.left + _rect.strokeWidth - (canvas.getImage().width * croppedData.x);
|
||||||
var top = _rect.top + _borderWidth - (canvas.getImage().height * croppedData.y);
|
var top = _rect.top + _rect.strokeWidth - (canvas.getImage().height * croppedData.y);
|
||||||
|
|
||||||
canvas.getImage().set({ left: left, top: top }).setCoords();
|
canvas.getImage().set({ left: left, top: top }).setCoords();
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user