Fixed issue where cropping certain selections could lead to a crop larger than the original document size

This commit is contained in:
Igor Zinken
2022-01-31 10:01:12 +01:00
parent 0a4848b723
commit 59bc83c282

View File

@@ -575,8 +575,8 @@ export default {
const commit = async () => {
await store.commit( "cropActiveDocumentContent", { left, top });
store.commit( "setActiveDocumentSize", {
width : Math.min( currentSize.width, width ),
height : Math.min( currentSize.height, height )
width : Math.min( currentSize.width - left, width ),
height : Math.min( currentSize.height - top, height )
});
getCanvasInstance()?.interactionPane.setSelection( null, false );
};