refactor(system,panzoom): return promise from transitioned panzoom actions

This commit is contained in:
braks
2023-11-09 22:41:59 +01:00
parent 428fced240
commit 1a57423204
2 changed files with 26 additions and 3 deletions
+2
View File
@@ -22,6 +22,8 @@ export const isRightClickPan = (panOnDrag: boolean | number[], usedButton: numbe
export const getD3Transition = (selection: D3SelectionInstance, duration = 0) =>
typeof duration === 'number' && duration > 0 ? selection.transition().duration(duration) : selection;
export const getD3Transition = (selection: D3SelectionInstance, duration = 0, onEnd = () => {}) =>
typeof duration === 'number' && duration > 0 ? selection.transition().duration(duration).on('end', onEnd) : selection;
export const wheelDelta = (event: any) => {
const factor = event.ctrlKey && isMacOs() ? 10 : 1;