|
@@ -173,7 +173,7 @@ import {
|
|
getContainerElement,
|
|
getContainerElement,
|
|
isValidTextContainer,
|
|
isValidTextContainer,
|
|
redrawTextBoundingBox,
|
|
redrawTextBoundingBox,
|
|
- shouldShowBoundingBox,
|
|
|
|
|
|
+ hasBoundingBox,
|
|
getFrameChildren,
|
|
getFrameChildren,
|
|
isCursorInFrame,
|
|
isCursorInFrame,
|
|
addElementsToFrame,
|
|
addElementsToFrame,
|
|
@@ -5262,7 +5262,7 @@ class App extends React.Component<AppProps, AppState> {
|
|
if (
|
|
if (
|
|
considerBoundingBox &&
|
|
considerBoundingBox &&
|
|
this.state.selectedElementIds[element.id] &&
|
|
this.state.selectedElementIds[element.id] &&
|
|
- shouldShowBoundingBox([element], this.state)
|
|
|
|
|
|
+ hasBoundingBox([element], this.state)
|
|
) {
|
|
) {
|
|
// if hitting the bounding box, return early
|
|
// if hitting the bounding box, return early
|
|
// but if not, we should check for other cases as well (e.g. frame name)
|
|
// but if not, we should check for other cases as well (e.g. frame name)
|
|
@@ -6165,7 +6165,13 @@ class App extends React.Component<AppProps, AppState> {
|
|
(!this.state.selectedLinearElement ||
|
|
(!this.state.selectedLinearElement ||
|
|
this.state.selectedLinearElement.hoverPointIndex === -1) &&
|
|
this.state.selectedLinearElement.hoverPointIndex === -1) &&
|
|
this.state.openDialog?.name !== "elementLinkSelector" &&
|
|
this.state.openDialog?.name !== "elementLinkSelector" &&
|
|
- !(selectedElements.length === 1 && isElbowArrow(selectedElements[0]))
|
|
|
|
|
|
+ !(selectedElements.length === 1 && isElbowArrow(selectedElements[0])) &&
|
|
|
|
+ // HACK: Disable transform handles for linear elements on mobile until a
|
|
|
|
+ // better way of showing them is found
|
|
|
|
+ !(
|
|
|
|
+ isLinearElement(selectedElements[0]) &&
|
|
|
|
+ (isMobileOrTablet() || selectedElements[0].points.length === 2)
|
|
|
|
+ )
|
|
) {
|
|
) {
|
|
const elementWithTransformHandleType =
|
|
const elementWithTransformHandleType =
|
|
getElementWithTransformHandleType(
|
|
getElementWithTransformHandleType(
|
|
@@ -7285,14 +7291,8 @@ class App extends React.Component<AppProps, AppState> {
|
|
!this.state.selectedLinearElement?.isEditing &&
|
|
!this.state.selectedLinearElement?.isEditing &&
|
|
!isElbowArrow(selectedElements[0]) &&
|
|
!isElbowArrow(selectedElements[0]) &&
|
|
!(
|
|
!(
|
|
- isLineElement(selectedElements[0]) &&
|
|
|
|
- LinearElementEditor.getPointIndexUnderCursor(
|
|
|
|
- selectedElements[0],
|
|
|
|
- elementsMap,
|
|
|
|
- this.state.zoom,
|
|
|
|
- pointerDownState.origin.x,
|
|
|
|
- pointerDownState.origin.y,
|
|
|
|
- ) !== -1
|
|
|
|
|
|
+ isLinearElement(selectedElements[0]) &&
|
|
|
|
+ (isMobileOrTablet() || selectedElements[0].points.length === 2)
|
|
) &&
|
|
) &&
|
|
!(
|
|
!(
|
|
this.state.selectedLinearElement &&
|
|
this.state.selectedLinearElement &&
|