Added token rotation
This commit is contained in:
@@ -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}
|
||||
/>
|
||||
</Flex>
|
||||
<Flex sx={{ alignItems: "center" }}>
|
||||
<Text
|
||||
as="label"
|
||||
variant="body2"
|
||||
sx={{ width: "95%", fontSize: "16px" }}
|
||||
p={1}
|
||||
>
|
||||
Rotation:
|
||||
</Text>
|
||||
<Slider
|
||||
value={(tokenState && tokenState.rotation) || 0}
|
||||
onChange={handleRotationChange}
|
||||
step={45}
|
||||
min={0}
|
||||
max={360}
|
||||
mr={1}
|
||||
/>
|
||||
</Flex>
|
||||
</Box>
|
||||
</MapMenu>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user