7
.changeset/lovely-lemons-approve.md
Normal file
7
.changeset/lovely-lemons-approve.md
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
'@xyflow/system': patch
|
||||
'@xyflow/react': patch
|
||||
'@xyflow/svelte': patch
|
||||
---
|
||||
|
||||
Prevent native page zoom when pinch zooming on node with nowheel class
|
||||
@@ -72,6 +72,9 @@ export function createPanOnScrollHandler({
|
||||
}: PanOnScrollParams) {
|
||||
return (event: any) => {
|
||||
if (isWrappedWithClass(event, noWheelClassName)) {
|
||||
if (event.ctrlKey) {
|
||||
event.preventDefault(); // stop native page zoom for pinch zooming
|
||||
}
|
||||
return false;
|
||||
}
|
||||
event.preventDefault();
|
||||
|
||||
Reference in New Issue
Block a user