Finished aspect ratio setting
This commit is contained in:
@ -19,7 +19,7 @@ const vimeo = {
|
||||
// Set aspect ratio
|
||||
const ratio = this.config.ratio.split(':');
|
||||
const padding = 100 / ratio[0] * ratio[1];
|
||||
const offset = (100 - padding) / 2;
|
||||
const offset = (400 - padding) / 8;
|
||||
this.elements.wrapper.style.paddingBottom = `${padding}%`;
|
||||
this.media.style.transform = `translateY(-${offset}%)`;
|
||||
|
||||
|
Reference in New Issue
Block a user