Make it possible to move workflow with mouse-wheel/two-finger

This commit is contained in:
Jan Oberhauser
2019-07-26 07:41:09 +02:00
parent d00610e629
commit 4bbc7edad2
2 changed files with 10 additions and 0 deletions

View File

@@ -83,5 +83,11 @@ export const moveNodeWorkflow = mixins(nodeIndex).extend({
this.moveWorkflow(e);
},
wheelMoveWorkflow (e: WheelEvent) {
const offsetPosition = this.$store.getters.getNodeViewOffsetPosition;
const nodeViewOffsetPositionX = offsetPosition[0] - e.deltaX;
const nodeViewOffsetPositionY = offsetPosition[1] - e.deltaY;
this.$store.commit('setNodeViewOffsetPosition', [nodeViewOffsetPositionX, nodeViewOffsetPositionY]);
},
},
});