fix: selection not working sometimes when transformHandles disabled

This commit is contained in:
ad1992 2022-04-25 14:23:28 +05:30
parent db9c9eb3d2
commit 5f57daa132

View File

@ -3461,15 +3461,6 @@ class App extends React.Component<AppProps, AppState> {
const elements = this.scene.getElements(); const elements = this.scene.getElements();
const selectedElements = getSelectedElements(elements, this.state); const selectedElements = getSelectedElements(elements, this.state);
if (selectedElements.length === 1 && !this.state.editingLinearElement) { if (selectedElements.length === 1 && !this.state.editingLinearElement) {
if (selectedElements[0].type === "custom") {
const config = getCustomElementConfig(
this.props.customElementsConfig,
selectedElements[0].customType,
);
if (!config?.transformHandles) {
return false;
}
}
const elementWithTransformHandleType = const elementWithTransformHandleType =
getElementWithTransformHandleType( getElementWithTransformHandleType(
elements, elements,