|
@@ -348,6 +348,7 @@ import {
|
|
|
updateFrameMembershipOfSelectedElements,
|
|
|
isElementInFrame,
|
|
|
getFrameLikeTitle,
|
|
|
+ getElementsOverlappingFrame,
|
|
|
} from "../frame";
|
|
|
import {
|
|
|
excludeElementsInFramesFromSelection,
|
|
@@ -395,7 +396,7 @@ import {
|
|
|
import { Emitter } from "../emitter";
|
|
|
import { ElementCanvasButtons } from "../element/ElementCanvasButtons";
|
|
|
import { MagicCacheData, diagramToHTML } from "../data/magic";
|
|
|
-import { elementsOverlappingBBox, exportToBlob } from "../../utils/export";
|
|
|
+import { exportToBlob } from "../../utils/export";
|
|
|
import { COLOR_PALETTE } from "../colors";
|
|
|
import { ElementCanvasButton } from "./MagicButton";
|
|
|
import { MagicIcon, copyIcon, fullscreenIcon } from "./icons";
|
|
@@ -1803,11 +1804,10 @@ class App extends React.Component<AppProps, AppState> {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- const magicFrameChildren = elementsOverlappingBBox({
|
|
|
- elements: this.scene.getNonDeletedElements(),
|
|
|
- bounds: magicFrame,
|
|
|
- type: "overlap",
|
|
|
- }).filter((el) => !isMagicFrameElement(el));
|
|
|
+ const magicFrameChildren = getElementsOverlappingFrame(
|
|
|
+ this.scene.getNonDeletedElements(),
|
|
|
+ magicFrame,
|
|
|
+ ).filter((el) => !isMagicFrameElement(el));
|
|
|
|
|
|
if (!magicFrameChildren.length) {
|
|
|
if (source === "button") {
|