Added initial token label

Added token pop up menu
Added token label
Added better token positioning
Split tokens into list and map variants
Moved size input to more generic number input
Changed game handler names to be more consistent
This commit is contained in:
Mitchell McCaffrey
2020-04-13 00:24:03 +10:00
parent da0f80316c
commit cb93922d59
12 changed files with 388 additions and 123 deletions

View File

@@ -86,10 +86,11 @@ function ProxyToken({ tokenClassName, onProxyDragEnd }) {
x = x / (mapRect.right - mapRect.left);
y = y / (mapRect.bottom - mapRect.top);
target.setAttribute("data-x", x);
target.setAttribute("data-y", y);
onProxyDragEnd(proxyOnMap.current, {
image: imageSource,
x,
y,
// Pass in props stored as data- in the dom node
...target.dataset,
});