Add horizontal scroll (#1172)

This commit is contained in:
Tristian Flanagan 2020-11-18 23:29:12 +01:00 committed by GitHub
parent d9a7d5fa34
commit 137c334389
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -99,8 +99,8 @@ export const moveNodeWorkflow = mixins(
wheelMoveWorkflow (e: WheelEvent) {
const normalized = normalizeWheel(e);
const offsetPosition = this.$store.getters.getNodeViewOffsetPosition;
const nodeViewOffsetPositionX = offsetPosition[0] - normalized.pixelX;
const nodeViewOffsetPositionY = offsetPosition[1] - normalized.pixelY;
const nodeViewOffsetPositionX = offsetPosition[0] - (e.shiftKey ? normalized.pixelY : normalized.pixelX);
const nodeViewOffsetPositionY = offsetPosition[1] - (e.shiftKey ? normalized.pixelX : normalized.pixelY);
this.$store.commit('setNodeViewOffsetPosition', {newOffset: [nodeViewOffsetPositionX, nodeViewOffsetPositionY]});
},
},