diff --git a/package-lock.json b/package-lock.json index aeca7dc8..46dbdfe5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "gantt-task-react", - "version": "0.3.8", + "version": "0.3.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "gantt-task-react", - "version": "0.3.8", + "version": "0.3.9", "license": "MIT", "devDependencies": { "@testing-library/jest-dom": "^5.16.4", diff --git a/src/components/gantt/gantt.tsx b/src/components/gantt/gantt.tsx index b90483f3..fbd9a6ce 100644 --- a/src/components/gantt/gantt.tsx +++ b/src/components/gantt/gantt.tsx @@ -257,28 +257,8 @@ export const Gantt: React.FunctionComponent = ({ // scroll events useEffect(() => { const handleWheel = (event: WheelEvent) => { - if (event.shiftKey || event.deltaX) { - const scrollMove = event.deltaX ? event.deltaX : event.deltaY; - let newScrollX = scrollX + scrollMove; - if (newScrollX < 0) { - newScrollX = 0; - } else if (newScrollX > svgWidth) { - newScrollX = svgWidth; - } - setScrollX(newScrollX); - event.preventDefault(); - } else if (ganttHeight) { - let newScrollY = scrollY + event.deltaY; - if (newScrollY < 0) { - newScrollY = 0; - } else if (newScrollY > ganttFullHeight - ganttHeight) { - newScrollY = ganttFullHeight - ganttHeight; - } - if (newScrollY !== scrollY) { - setScrollY(newScrollY); - event.preventDefault(); - } - } + console.log("Anika"); + console.log(event); setIgnoreScrollEvent(true); };