chore(zoompane): remove unused code

This commit is contained in:
Christopher Möller
2021-12-09 15:00:20 +01:00
parent 81585dbff5
commit 747097f61b
+2 -15
View File
@@ -235,29 +235,16 @@ const ZoomPane = ({
return false;
}
// if the target element is inside the nowheel class, we prevent zooming
// if the target element is inside an element with the nowheel class, we prevent zooming
if (isWrappedWithClass(event, noWheelClassName) && event.type === 'wheel') {
return false;
}
// if the target element is inside the nopan class, we prevent panning
// if the target element is inside an element with the nopan class, we prevent panning
if (isWrappedWithClass(event, noPanClassName) && event.type !== 'wheel') {
return false;
}
// when the target element is a node, we still allow zooming
// if (
// (event.target.closest('.react-flow__node') || event.target.closest('.react-flow__edge')) &&
// event.type !== 'wheel'
// ) {
// return false;
// }
// // when the target element is a node selection, we still allow zooming
// if (event.target.closest('.react-flow__nodesselection') && event.type !== 'wheel') {
// return false;
// }
if (!zoomOnPinch && event.ctrlKey && event.type === 'wheel') {
return false;
}