Closed mabahj closed 4 years ago
This is a helpful addition, but it seems like only top, bottom, or center work. Would it be possible to add support for left and right as well? This would be especially useful for those who are displaying 4:3 photos on a 16:9 monitor.
That is strange. I just send the value to the "background-position" CSS property and I'd assume the other keywords would work. Have you used the keywords from this (https://www.w3schools.com/cssref/pr_background-position.asp) list?
Hmm... it didn't seem to be working when I tried it a few days ago, but I just tried it again and it worked.
Anyway, glad to have confirmation of exactly what is happening. I'll submit an update to the readme with more details to help others in the future.
This PR makes it possible to select whether to zoom towards the top or bottom, instead of simply center, if backgroundSize is set to contain. Default is not changed.