Compare commits

...
Author SHA1 Message Date
Ryan Di cbf4d5a591 fix other imports as well 2025-11-19 14:40:16 +08:00
Ryan Di 38d0966227 fix: use index path instead of ellipse 2025-11-19 14:37:05 +08:00
37882c66cb fix: canvas panning stops when hovering over frame title (#10340) (#10351)
* fix: canvas panning stops when hovering over frame title (#10340)

* improve

---------

Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
2025-11-18 09:24:02 +00:00
7 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -22,8 +22,8 @@ import {
isLineSegment, isLineSegment,
type GlobalPoint, type GlobalPoint,
type LineSegment, type LineSegment,
isCurve,
} from "@excalidraw/math"; } from "@excalidraw/math";
import { isCurve } from "@excalidraw/math/curve";
import React from "react"; import React from "react";
+1
View File
@@ -105,6 +105,7 @@ export const CLASSES = {
SEARCH_MENU_INPUT_WRAPPER: "layer-ui__search-inputWrapper", SEARCH_MENU_INPUT_WRAPPER: "layer-ui__search-inputWrapper",
CONVERT_ELEMENT_TYPE_POPUP: "ConvertElementTypePopup", CONVERT_ELEMENT_TYPE_POPUP: "ConvertElementTypePopup",
SHAPE_ACTIONS_THEME_SCOPE: "shape-actions-theme-scope", SHAPE_ACTIONS_THEME_SCOPE: "shape-actions-theme-scope",
FRAME_NAME: "frame-name",
}; };
export const CJK_HAND_DRAWN_FALLBACK_FONT = "Xiaolai"; export const CJK_HAND_DRAWN_FALLBACK_FONT = "Xiaolai";
+1 -4
View File
@@ -11,12 +11,9 @@ import {
vectorFromPoint, vectorFromPoint,
vectorNormalize, vectorNormalize,
vectorScale, vectorScale,
} from "@excalidraw/math";
import {
ellipse, ellipse,
ellipseSegmentInterceptPoints, ellipseSegmentInterceptPoints,
} from "@excalidraw/math/ellipse"; } from "@excalidraw/math";
import type { import type {
Curve, Curve,
+2 -2
View File
@@ -2,10 +2,10 @@ import {
curvePointDistance, curvePointDistance,
distanceToLineSegment, distanceToLineSegment,
pointRotateRads, pointRotateRads,
ellipse,
ellipseDistanceFromPoint,
} from "@excalidraw/math"; } from "@excalidraw/math";
import { ellipse, ellipseDistanceFromPoint } from "@excalidraw/math/ellipse";
import type { GlobalPoint, Radians } from "@excalidraw/math"; import type { GlobalPoint, Radians } from "@excalidraw/math";
import { import {
+4 -2
View File
@@ -1476,6 +1476,7 @@ class App extends React.Component<AppProps, AppState> {
return ( return (
<div <div
id={this.getFrameNameDOMId(f)} id={this.getFrameNameDOMId(f)}
className={CLASSES.FRAME_NAME}
key={f.id} key={f.id}
style={{ style={{
position: "absolute", position: "absolute",
@@ -11252,12 +11253,13 @@ class App extends React.Component<AppProps, AppState> {
( (
event: WheelEvent | React.WheelEvent<HTMLDivElement | HTMLCanvasElement>, event: WheelEvent | React.WheelEvent<HTMLDivElement | HTMLCanvasElement>,
) => { ) => {
// if not scrolling on canvas/wysiwyg, ignore
if ( if (
!( !(
event.target instanceof HTMLCanvasElement || event.target instanceof HTMLCanvasElement ||
event.target instanceof HTMLTextAreaElement || event.target instanceof HTMLTextAreaElement ||
event.target instanceof HTMLIFrameElement event.target instanceof HTMLIFrameElement ||
(event.target instanceof HTMLElement &&
event.target.classList.contains(CLASSES.FRAME_NAME))
) )
) { ) {
// prevent zooming the browser (but allow scrolling DOM) // prevent zooming the browser (but allow scrolling DOM)
+1 -1
View File
@@ -30,7 +30,7 @@ import { getBoundTextElementId } from "@excalidraw/element";
import type { Bounds } from "@excalidraw/element"; import type { Bounds } from "@excalidraw/element";
import type { GlobalPoint, LineSegment } from "@excalidraw/math/types"; import type { GlobalPoint, LineSegment } from "@excalidraw/math";
import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types"; import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
import { AnimatedTrail } from "../animated-trail"; import { AnimatedTrail } from "../animated-trail";
+1 -1
View File
@@ -15,7 +15,7 @@ import {
intersectElementWithLineSegment, intersectElementWithLineSegment,
} from "@excalidraw/element"; } from "@excalidraw/element";
import type { ElementsSegmentsMap, GlobalPoint } from "@excalidraw/math/types"; import type { ElementsSegmentsMap, GlobalPoint } from "@excalidraw/math";
import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types"; import type { ElementsMap, ExcalidrawElement } from "@excalidraw/element/types";
export const getLassoSelectedElementIds = (input: { export const getLassoSelectedElementIds = (input: {