mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
revert: remove bound-arrows from frames (#7190)
This commit is contained in:
parent
71ad3c5356
commit
104f64f1dc
7 changed files with 16 additions and 81 deletions
|
@ -2554,12 +2554,18 @@ class App extends React.Component<AppProps, AppState> {
|
|||
|
||||
const lineHeight = getDefaultLineHeight(textElementProps.fontFamily);
|
||||
if (text.length) {
|
||||
const topLayerFrame = this.getTopLayerFrameAtSceneCoords({
|
||||
x,
|
||||
y: currentY,
|
||||
});
|
||||
|
||||
const element = newTextElement({
|
||||
...textElementProps,
|
||||
x,
|
||||
y: currentY,
|
||||
text,
|
||||
lineHeight,
|
||||
frameId: topLayerFrame ? topLayerFrame.id : null,
|
||||
});
|
||||
acc.push(element);
|
||||
currentY += element.height + LINE_GAP;
|
||||
|
@ -3574,11 +3580,6 @@ class App extends React.Component<AppProps, AppState> {
|
|||
return getElementsAtPosition(elements, (element) =>
|
||||
hitTest(element, this.state, this.frameNameBoundsCache, x, y),
|
||||
).filter((element) => {
|
||||
// arrows don't clip even if they're children of frames,
|
||||
// so always allow hitbox regardless of beinging contained in frame
|
||||
if (isArrowElement(element)) {
|
||||
return true;
|
||||
}
|
||||
// hitting a frame's element from outside the frame is not considered a hit
|
||||
const containingFrame = getContainingFrame(element);
|
||||
return containingFrame &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue