mirror of
https://github.com/konvajs/konva.git
synced 2026-03-03 16:58:33 +08:00
addressed issue presented in pull request #157
This commit is contained in:
@@ -122,13 +122,13 @@
|
|||||||
// Determine the region we are cropping
|
// Determine the region we are cropping
|
||||||
crop.x = crop.x || 0;
|
crop.x = crop.x || 0;
|
||||||
crop.y = crop.y || 0;
|
crop.y = crop.y || 0;
|
||||||
crop.width = crop.width || image.width - crop.x;
|
crop.width = crop.width || width - crop.x;
|
||||||
crop.height = crop.height || image.height - crop.y;
|
crop.height = crop.height || height - crop.y;
|
||||||
|
|
||||||
// Make a filterCanvas the same size as the cropped image
|
// Make a filterCanvas the same size as the cropped image
|
||||||
if (this.filterCanvas &&
|
if (this.filterCanvas &&
|
||||||
this.filterCanvas.getWidth() === crop.width &&
|
this.filterCanvas.getWidth() === crop.width &&
|
||||||
this.filterCanvas.getHeight() === crop.height) {
|
this.filterCanvas.getHeight() === crop.height) {
|
||||||
filterCanvas = this.filterCanvas;
|
filterCanvas = this.filterCanvas;
|
||||||
filterCanvas.getContext().clear();
|
filterCanvas.getContext().clear();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user