Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/js/components/assets/Editor/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@

<div class="flex w-full items-center justify-end rounded-b border-t dark:border-gray-700 bg-gray-100 dark:bg-gray-900 px-4 py-3">
<div class="hidden h-full flex-1 gap-2 sm:gap-3 py-1 sm:flex">
<ui-badge pill v-if="asset.width && asset.height" icon="assets" :text="__('messages.width_x_height', { width: asset.width, height: asset.height })" />
<ui-badge pill v-if="asset.width && asset.height" icon="assets" :text="__('messages.width_x_height', { width: Math.round(asset.width), height: Math.round(asset.height) })" />
<ui-badge pill icon="memory" :text="asset.size" />
<ui-badge pill icon="fingerprint">
<time
Expand Down
2 changes: 1 addition & 1 deletion src/Imaging/Attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private function svgAttributes(string $path)
} elseif ($svg['viewBox']) {
[,,$width, $height] = preg_split('/[\s,]+/', $svg['viewBox'] ?: '');

return compact('width', 'height');
return ['width' => (float) $width, 'height' => (float) $height];
}

return $this->defaultSvgAttributes();
Expand Down