Datamapper - autoscroll when connecting nodes#372
Datamapper - autoscroll when connecting nodes#372VincentvanMedenbach wants to merge 8 commits intomasterfrom
Conversation
…slt to properties page and added unset highlights
stijnpotters1
left a comment
There was a problem hiding this comment.
Also try to fix the linting warnings if possible
| const updatePosition = (event: MouseEvent) => { | ||
| if (scrollIntervalEnabled.current) { | ||
| const topThreshold = 150 | ||
| const bottomThreshold = window.innerHeight - 150 |
There was a problem hiding this comment.
| const bottomThreshold = window.innerHeight - 150 | |
| const bottomThreshold = window.innerHeight - topTreshold |
There was a problem hiding this comment.
Moved the 150 to a const
| if (event.clientY < topThreshold) { | ||
| reactFlowInstance.setViewport({ | ||
| x: reactFlowInstance.getViewport().x, | ||
| y: reactFlowInstance.getViewport().y + 10, |
There was a problem hiding this comment.
Is this because of padding?
Perhaps add a padding const to replace it with if this is true
const paddingY = 10
y: reactFlowInstance.getViewport().y + paddingY,
There was a problem hiding this comment.
This is the amount it scrolls on the reactflow pane, moved it to a seperate const
| if (event.clientY > bottomThreshold) { | ||
| reactFlowInstance.setViewport({ | ||
| x: reactFlowInstance.getViewport().x, | ||
| y: reactFlowInstance.getViewport().y - 10, |
There was a problem hiding this comment.
Moved it to a const here as well
| return () => { | ||
| document.removeEventListener('mousemove', updatePosition) | ||
| } | ||
| }, []) |
There was a problem hiding this comment.
Did you already check if you could solve these eslint warnings?
There was a problem hiding this comment.
Fixed the one eslint warning created by my new additions, I'm currently working on code cleanup on a different branch where i'll look at the other ones
|



No description provided.