mirror of
https://github.com/igorski/bitmappery.git
synced 2026-07-05 14:59:15 +02:00
Fixed issue where cropping certain selections could lead to a crop larger than the original document size
This commit is contained in:
@@ -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 );
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user