mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-17 06:21:16 +02:00
upload images and store them as base64
This commit is contained in:
@@ -25,6 +25,7 @@ function isElementDraggableFromInside(
|
||||
): boolean {
|
||||
const dragFromInside =
|
||||
element.backgroundColor !== "transparent" ||
|
||||
element.type === "image" ||
|
||||
appState.selectedElementIds[element.id];
|
||||
if (element.type === "line" || element.type === "draw") {
|
||||
return dragFromInside && isPathALoop(element.points);
|
||||
@@ -89,7 +90,7 @@ export function hitTest(
|
||||
);
|
||||
}
|
||||
return Math.hypot(a * tx - px, b * ty - py) < lineThreshold;
|
||||
} else if (element.type === "rectangle") {
|
||||
} else if (element.type === "rectangle" || element.type === "image") {
|
||||
if (isElementDraggableFromInside(element, appState)) {
|
||||
return (
|
||||
x > x1 - lineThreshold &&
|
||||
|
Reference in New Issue
Block a user