|
|
@ -245,6 +245,7 @@ import {
|
|
|
|
isTransparent,
|
|
|
|
isTransparent,
|
|
|
|
easeToValuesRAF,
|
|
|
|
easeToValuesRAF,
|
|
|
|
muteFSAbortError,
|
|
|
|
muteFSAbortError,
|
|
|
|
|
|
|
|
arrayToMap,
|
|
|
|
} from "../utils";
|
|
|
|
} from "../utils";
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
ContextMenu,
|
|
|
|
ContextMenu,
|
|
|
@ -1094,6 +1095,12 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// update frame membership if needed
|
|
|
|
|
|
|
|
updateFrameMembershipOfSelectedElements(
|
|
|
|
|
|
|
|
this.scene.getElementsIncludingDeleted(),
|
|
|
|
|
|
|
|
this.state,
|
|
|
|
|
|
|
|
);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
@ -3018,11 +3025,13 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
|
!(isTextElement(element) && element.containerId)),
|
|
|
|
!(isTextElement(element) && element.containerId)),
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const elementsMap = arrayToMap(elements);
|
|
|
|
|
|
|
|
|
|
|
|
return getElementsAtPosition(elements, (element) =>
|
|
|
|
return getElementsAtPosition(elements, (element) =>
|
|
|
|
hitTest(element, this.state, this.frameNameBoundsCache, x, y),
|
|
|
|
hitTest(element, this.state, this.frameNameBoundsCache, x, y),
|
|
|
|
).filter((element) => {
|
|
|
|
).filter((element) => {
|
|
|
|
// hitting a frame's element from outside the frame is not considered a hit
|
|
|
|
// hitting a frame's element from outside the frame is not considered a hit
|
|
|
|
const containingFrame = getContainingFrame(element);
|
|
|
|
const containingFrame = getContainingFrame(element, elementsMap);
|
|
|
|
return containingFrame && this.state.shouldRenderFrames
|
|
|
|
return containingFrame && this.state.shouldRenderFrames
|
|
|
|
? isCursorInFrame({ x, y }, containingFrame)
|
|
|
|
? isCursorInFrame({ x, y }, containingFrame)
|
|
|
|
: true;
|
|
|
|
: true;
|
|
|
@ -5845,7 +5854,10 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
if (linearElement?.frameId) {
|
|
|
|
if (linearElement?.frameId) {
|
|
|
|
const frame = getContainingFrame(linearElement);
|
|
|
|
const frame = getContainingFrame(
|
|
|
|
|
|
|
|
linearElement,
|
|
|
|
|
|
|
|
arrayToMap(this.scene.getElementsIncludingDeleted()),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
if (frame && linearElement) {
|
|
|
|
if (frame && linearElement) {
|
|
|
|
if (!elementOverlapsWithFrame(linearElement, frame)) {
|
|
|
|
if (!elementOverlapsWithFrame(linearElement, frame)) {
|
|
|
|