#262 Shape selection not working as expected with the rectangle / circle tool active

This commit is contained in:
agriyadev5
2021-07-22 12:06:26 +05:30
parent 45991f6880
commit a5945db3c4

View File

@@ -877,7 +877,10 @@ export const mouseUpEvent = function (evt) {
if (eventContext_.getCurrentMode() === 'path') {
svgCanvas.pathActions.toEditMode(element);
} else if (eventContext_.getCurConfig().selectNew) {
svgCanvas.setMode('select');
const modes = [ 'circle', 'ellipse', 'square', 'rect', 'fhpath', 'line', 'fhellipse', 'fhrect', 'star', 'polygon' ];
if ( modes.indexOf(eventContext_.getCurrentMode()) !== -1) {
svgCanvas.setMode('select');
}
svgCanvas.selectOnly([ element ], true);
}
// we create the insert command that is stored on the stack