diff --git a/src/components/token/TokenPreview.js b/src/components/token/TokenPreview.js index 752a814..ef1d165 100644 --- a/src/components/token/TokenPreview.js +++ b/src/components/token/TokenPreview.js @@ -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), diff --git a/src/components/token/TokenSettings.js b/src/components/token/TokenSettings.js index a09310e..2d5147d 100644 --- a/src/components/token/TokenSettings.js +++ b/src/components/token/TokenSettings.js @@ -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}