fix: show bounding box for 3 or more linear point elements (#5554)
* fix: show bounding box for 3+ linear point elements * refactor * show bounding box for 3 points as well * fix dragging bounding box for linear elements * Increase margin/padding for linear elements * fix cursor and keep bounding box same but offset resize handles * introduce slight padding for selection border * better * add constant for spacing
This commit is contained in:
@ -261,6 +261,7 @@ import {
|
||||
isPointHittingLinkIcon,
|
||||
isLocalLink,
|
||||
} from "../element/Hyperlink";
|
||||
import { shouldShowBoundingBox } from "../element/transformHandles";
|
||||
|
||||
const deviceContextInitialValue = {
|
||||
isSmScreen: false,
|
||||
@ -3046,6 +3047,16 @@ class App extends React.Component<AppProps, AppState> {
|
||||
} else {
|
||||
setCursor(this.canvas, CURSOR_TYPE.MOVE);
|
||||
}
|
||||
} else if (
|
||||
shouldShowBoundingBox([element]) &&
|
||||
isHittingElementBoundingBoxWithoutHittingElement(
|
||||
element,
|
||||
this.state,
|
||||
scenePointerX,
|
||||
scenePointerY,
|
||||
)
|
||||
) {
|
||||
setCursor(this.canvas, CURSOR_TYPE.MOVE);
|
||||
}
|
||||
|
||||
if (
|
||||
|
Reference in New Issue
Block a user