diff --git a/src/components/map/MapToken.js b/src/components/map/MapToken.js
index bed4815..1408fc3 100644
--- a/src/components/map/MapToken.js
+++ b/src/components/map/MapToken.js
@@ -178,7 +178,7 @@ function MapToken({
onDragEnd={handleDragEnd}
onDragStart={handleDragStart}
opacity={tokenOpacity}
- name={token.isVehicle ? "vehicle" : "token"}
+ name={token && token.isVehicle ? "vehicle" : "token"}
id={tokenState.id}
>
-
-
+
+
+
+
);
}
diff --git a/src/components/token/TokenMenu.js b/src/components/token/TokenMenu.js
index 91df1c6..eecfdab 100644
--- a/src/components/token/TokenMenu.js
+++ b/src/components/token/TokenMenu.js
@@ -74,6 +74,11 @@ function TokenMenu({
onTokenChange({ ...tokenState, size: newSize });
}
+ function handleRotationChange(event) {
+ const newRotation = parseInt(event.target.value);
+ onTokenChange({ ...tokenState, rotation: newRotation });
+ }
+
function handleModalContent(node) {
if (node) {
// Focus input
@@ -192,6 +197,24 @@ function TokenMenu({
mr={1}
/>
+
+
+ Rotation:
+
+
+
);
diff --git a/src/components/token/Tokens.js b/src/components/token/Tokens.js
index 5b3a265..f514ecf 100644
--- a/src/components/token/Tokens.js
+++ b/src/components/token/Tokens.js
@@ -33,6 +33,7 @@ function Tokens({ onMapTokenStateCreate }) {
x: token.x,
y: token.y,
lastEditedBy: userId,
+ rotation: 0,
});
}
}