mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
⚡ Deconstructed store mutation data parameters for better readability
This commit is contained in:
@@ -31,7 +31,7 @@ export const moveNodeWorkflow = mixins(nodeIndex).extend({
|
||||
|
||||
const nodeViewOffsetPositionX = offsetPosition[0] + (e.pageX - this.moveLastPosition[0]);
|
||||
const nodeViewOffsetPositionY = offsetPosition[1] + (e.pageY - this.moveLastPosition[1]);
|
||||
this.$store.commit('setNodeViewOffsetPosition', {newOffset: [nodeViewOffsetPositionX, nodeViewOffsetPositionY], setStateDirty: true});
|
||||
this.$store.commit('setNodeViewOffsetPosition', {offset: [nodeViewOffsetPositionX, nodeViewOffsetPositionY], setStateDirty: true});
|
||||
|
||||
// Update the last position
|
||||
this.moveLastPosition[0] = e.pageX;
|
||||
@@ -87,7 +87,7 @@ export const moveNodeWorkflow = mixins(nodeIndex).extend({
|
||||
const offsetPosition = this.$store.getters.getNodeViewOffsetPosition;
|
||||
const nodeViewOffsetPositionX = offsetPosition[0] - e.deltaX;
|
||||
const nodeViewOffsetPositionY = offsetPosition[1] - e.deltaY;
|
||||
this.$store.commit('setNodeViewOffsetPosition', {newOffset: [nodeViewOffsetPositionX, nodeViewOffsetPositionY], setStateDirty: true});
|
||||
this.$store.commit('setNodeViewOffsetPosition', {offset: [nodeViewOffsetPositionX, nodeViewOffsetPositionY], setStateDirty: true});
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user