Add the old position to the afterPositionChange event
const eventAfterPositionChange = {
oldPos: {
x,
y
},
newPos: {
x,
y
},
source,
target,
spellName,
spell
};
const eventAfterPositionChange = {
oldPos: {
x,
y
},
newPos: {
x,
y
},
source,
target,
spellName,
spell
};