feat: wireframe-to-code (#7334)
This commit is contained in:
+9
-7
@@ -1,3 +1,4 @@
|
||||
import { TOOL_TYPE } from "./constants";
|
||||
import {
|
||||
Bounds,
|
||||
getCommonBounds,
|
||||
@@ -5,7 +6,7 @@ import {
|
||||
getElementAbsoluteCoords,
|
||||
} from "./element/bounds";
|
||||
import { MaybeTransformHandleType } from "./element/transformHandles";
|
||||
import { isBoundToContainer, isFrameElement } from "./element/typeChecks";
|
||||
import { isBoundToContainer, isFrameLikeElement } from "./element/typeChecks";
|
||||
import {
|
||||
ExcalidrawElement,
|
||||
NonDeletedExcalidrawElement,
|
||||
@@ -262,7 +263,7 @@ const getReferenceElements = (
|
||||
appState: AppState,
|
||||
) => {
|
||||
const selectedFrames = selectedElements
|
||||
.filter((element) => isFrameElement(element))
|
||||
.filter((element) => isFrameLikeElement(element))
|
||||
.map((frame) => frame.id);
|
||||
|
||||
return getVisibleAndNonSelectedElements(
|
||||
@@ -1352,10 +1353,11 @@ export const isActiveToolNonLinearSnappable = (
|
||||
activeToolType: AppState["activeTool"]["type"],
|
||||
) => {
|
||||
return (
|
||||
activeToolType === "rectangle" ||
|
||||
activeToolType === "ellipse" ||
|
||||
activeToolType === "diamond" ||
|
||||
activeToolType === "frame" ||
|
||||
activeToolType === "image"
|
||||
activeToolType === TOOL_TYPE.rectangle ||
|
||||
activeToolType === TOOL_TYPE.ellipse ||
|
||||
activeToolType === TOOL_TYPE.diamond ||
|
||||
activeToolType === TOOL_TYPE.frame ||
|
||||
activeToolType === TOOL_TYPE.magicframe ||
|
||||
activeToolType === TOOL_TYPE.image
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user