mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-19 12:14:24 +01:00
* fix: canvas panning stops when hovering over frame title (#10340) * improve --------- Co-authored-by: dwelle <5153846+dwelle@users.noreply.github.com>
This commit is contained in:
@@ -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";
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user