Added token animations back, edited token change event to support multiple edits

This stopped mounted vehicle animations from lagging
This commit is contained in:
Mitchell McCaffrey
2020-05-22 22:17:30 +10:00
parent ef1c875088
commit 09e423fd56
5 changed files with 64 additions and 40 deletions

View File

@@ -30,10 +30,12 @@ function TokenDragOverlay({
mountedToken.moveTo(layer);
mountedToken.absolutePosition(position);
onTokenStateChange({
...mapState.tokens[mountedToken.id()],
x: mountedToken.x() / mapWidth,
y: mountedToken.y() / mapHeight,
lastEditedBy: userId,
[mountedToken.id()]: {
...mapState.tokens[mountedToken.id()],
x: mountedToken.x() / mapWidth,
y: mountedToken.y() / mapHeight,
lastEditedBy: userId,
},
});
}
}