Remove int requirement from default token size
This commit is contained in:
parent
485c418b57
commit
68a5ae1f46
@ -71,7 +71,7 @@ function TokenPreview({ token }) {
|
||||
const gridWidth = tokenWidth;
|
||||
const gridX = token.defaultSize;
|
||||
const gridSize = gridWidth / gridX;
|
||||
const gridY = Math.ceil(tokenHeight / gridSize);
|
||||
const gridY = Math.round(tokenHeight / gridSize);
|
||||
const gridHeight = gridY > 0 ? gridY * gridSize : tokenHeight;
|
||||
const borderWidth = Math.max(
|
||||
(Math.min(tokenWidth, gridHeight) / 200) * Math.max(1 / stageScale, 1),
|
||||
|
@ -46,7 +46,7 @@ function TokenSettings({ token, onSettingsChange }) {
|
||||
name="tokenSize"
|
||||
value={`${(token && token.defaultSize) || 0}`}
|
||||
onChange={(e) =>
|
||||
onSettingsChange("defaultSize", parseInt(e.target.value))
|
||||
onSettingsChange("defaultSize", parseFloat(e.target.value))
|
||||
}
|
||||
disabled={tokenEmpty || token.type === "default"}
|
||||
min={1}
|
||||
|
Loading…
Reference in New Issue
Block a user