ensure extent is valid when scale is negative

test large flipped icon in buffer zone
test hit detection for negative image scale
This commit is contained in:
mike-000
2020-08-06 10:15:09 +01:00
parent 1a356332f3
commit 9468a088c0
4 changed files with 33 additions and 11 deletions

View File

@@ -409,7 +409,13 @@ class Executor {
tmpExtent
);
} else {
createOrUpdate(boxX, boxY, boxX + boxW, boxY + boxH, tmpExtent);
createOrUpdate(
Math.min(boxX, boxX + boxW),
Math.min(boxY, boxY + boxH),
Math.max(boxX, boxX + boxW),
Math.max(boxY, boxY + boxH),
tmpExtent
);
}
let renderBufferX = 0;
let renderBufferY = 0;