mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
renamed handleCanvasPanUsingWheelOrSpaceDrag
This commit is contained in:
parent
74786de5ec
commit
ae40c783e8
2 changed files with 3 additions and 3 deletions
|
@ -6386,7 +6386,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||
// we must exit before we set `cursorButton` state and `savePointer`
|
||||
// else it will send pointer state & laser pointer events in collab when
|
||||
// panning
|
||||
if (this.handleCanvasPanUsingWheelOrSpaceDrag(event)) {
|
||||
if (this.handleCanvasPanUsingWheelOrSpaceDragOrRightClickHold(event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -6709,7 +6709,7 @@ class App extends React.Component<AppProps, AppState> {
|
|||
};
|
||||
|
||||
// Returns whether the event is a panning
|
||||
public handleCanvasPanUsingWheelOrSpaceDrag = (
|
||||
public handleCanvasPanUsingWheelOrSpaceDragOrRightClickHold = (
|
||||
event: React.PointerEvent<HTMLElement> | MouseEvent,
|
||||
): boolean => {
|
||||
const isRightClickDragging = event.button === POINTER_BUTTON.SECONDARY;
|
||||
|
|
|
@ -640,7 +640,7 @@ export const textWysiwyg = ({
|
|||
// trying to pan by clicking inside text area itself -> handle here
|
||||
if (target instanceof HTMLTextAreaElement) {
|
||||
event.preventDefault();
|
||||
app.handleCanvasPanUsingWheelOrSpaceDrag(event);
|
||||
app.handleCanvasPanUsingWheelOrSpaceDragOrRightClickHold(event);
|
||||
}
|
||||
temporarilyDisableSubmit();
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue