Closed VargBurz closed 3 years ago
This PR refactors zoom events
zoomEvents?: { brush: { isActive: boolean; keyEvent: KeyEvent; orientation?: BrushOrientation; }, pan: { isActive: boolean; keyEvent: KeyEvent; orientation?: PanOrientation; }, scroll: { isActive: boolean; keyEvent: KeyEvent; }, }
enum KeyEvent { MAIN = 'main', SHIFT = 'shift' }
With new options zoom events can be divided by KeyEvent: which key should be pressed to activate the specific zoom event. KeyEvent.MAIN - zoom event active with no key KeyEvent.SHIFT- zoom event active if shift key is pressed
KeyEvent
KeyEvent.MAIN
KeyEvent.SHIFT
fix zoom on scroll. the problem was: scroll zoom works bad with values below zero see more: https://stackoverflow.com/questions/15261447/how-do-i-capture-keystroke-events-in-d3-force-layout
fix rewriting of deep options: use lodash.defaultsDeep indstead of lodash.defaults
lodash.defaultsDeep
lodash.defaults
separate wheel panning and mouse panning
This PR refactors zoom events
Changes:
With new options zoom events can be divided by
KeyEvent
: which key should be pressed to activate the specific zoom event.KeyEvent.MAIN
- zoom event active with no keyKeyEvent.SHIFT
- zoom event active if shift key is pressedfix zoom on scroll. the problem was: scroll zoom works bad with values below zero see more: https://stackoverflow.com/questions/15261447/how-do-i-capture-keystroke-events-in-d3-force-layout
fix rewriting of deep options: use
lodash.defaultsDeep
indstead oflodash.defaults
separate wheel panning and mouse panning