summaryrefslogtreecommitdiff
path: root/frontend/app
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-04-06 13:55:15 +0200
committerJules Laplace <julescarbon@gmail.com>2021-04-06 13:55:15 +0200
commit194ead8894b77638de5db7626b7c35cd754c11c7 (patch)
treeb9e396cb508ccd8a46d6c7cbe668d60d72be07ee /frontend/app
parent4aa39d8cdce7a7e6837a4dda3878a9d6b98179c7 (diff)
bios
Diffstat (limited to 'frontend/app')
-rw-r--r--frontend/app/views/tile/tile.utils.js6
1 files changed, 1 insertions, 5 deletions
diff --git a/frontend/app/views/tile/tile.utils.js b/frontend/app/views/tile/tile.utils.js
index f172545..dc19540 100644
--- a/frontend/app/views/tile/tile.utils.js
+++ b/frontend/app/views/tile/tile.utils.js
@@ -49,7 +49,6 @@ export const generateVideoStyle = (tile, bounds) => {
style.height = "auto"
break
case 'cover':
- style.backgroundSize = tile.settings.video_style
if (tile.settings.width && (tile.settings.width / tile.settings.height) > (bounds.width / bounds.height)) {
style.width = Math.round((tile.settings.width / tile.settings.height) * bounds.height)
style.height = bounds.height
@@ -59,7 +58,6 @@ export const generateVideoStyle = (tile, bounds) => {
}
break
case 'contain':
- style.backgroundSize = tile.settings.video_style
if (tile.settings.width && (tile.settings.width / tile.settings.height) > (bounds.width / bounds.height)) {
style.width = bounds.width
style.height = Math.round((tile.settings.height / tile.settings.width) * bounds.width)
@@ -85,9 +83,7 @@ export const unitsDimension = (tile, dimension, bounds, videoBounds) => {
}
export const videoUnits = (value, bounds, videoBounds) => (
- (videoBounds.backgroundSize === "contain")
- ? Math.round(value / videoBounds.height * bounds.height) + 'px'
- : Math.round(value / videoBounds.width * bounds.width) + 'px'
+ Math.round(value * bounds.width / videoBounds.width) + 'px'
)
export const hexToRgb = (hex) => {