Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background image position options instead of center #297

Open
chris480 opened this issue Dec 8, 2020 · 2 comments
Open

Background image position options instead of center #297

chris480 opened this issue Dec 8, 2020 · 2 comments
Assignees

Comments

@chris480
Copy link

chris480 commented Dec 8, 2020

Explain your use case

There are many cases where 'center center' is not ideal for background positions as defined in the background image directive. https://github.com/cloudinary/cloudinary_angular/blob/master/projects/angular-cld/src/lib/cloudinary-background-image.directive.ts

Describe the problem you’re trying to solve

A way to provide an override without some css !important hack to control image position.

Do you have a proposed solution?

Input param for background position, defaults to center

@Input('clbackgroundposition') background_position = 'center center'; 
...
this.renderer.setStyle(nativeElement, 'background-position', `${background_position}`);

@michalkcloudinay
Copy link

Hi @chris480, I have submitted a request internally to our product team to see if this can be added.
We will update you with any new information on this.

@michalkcloudinay
Copy link

Hi @chris480, I just want to update you that we released a new SDK version, which includes an option to pass a position parameter to the background image directive. The default will be center.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants