|
|
@ -5035,6 +5035,16 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
|
) => {
|
|
|
|
) => {
|
|
|
|
event.preventDefault();
|
|
|
|
event.preventDefault();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (
|
|
|
|
|
|
|
|
(event.nativeEvent.pointerType === "touch" ||
|
|
|
|
|
|
|
|
(event.nativeEvent.pointerType === "pen" &&
|
|
|
|
|
|
|
|
// always allow if user uses a pen secondary button
|
|
|
|
|
|
|
|
event.button !== POINTER_BUTTON.SECONDARY)) &&
|
|
|
|
|
|
|
|
this.state.elementType !== "selection"
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
const { x, y } = viewportCoordsToSceneCoords(event, this.state);
|
|
|
|
const { x, y } = viewportCoordsToSceneCoords(event, this.state);
|
|
|
|
const element = this.getElementAtPosition(x, y, { preferSelected: true });
|
|
|
|
const element = this.getElementAtPosition(x, y, { preferSelected: true });
|
|
|
|
|
|
|
|
|
|
|
|