diff options
Diffstat (limited to 'frontend/app/views')
| -rw-r--r-- | frontend/app/views/tile/tile.utils.js | 6 |
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) => { |
