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

Right positioning is required #275

Open
andreszs opened this issue Jan 22, 2015 · 3 comments
Open

Right positioning is required #275

andreszs opened this issue Jan 22, 2015 · 3 comments

Comments

@andreszs
Copy link

Since only the ´top´ and ´left´ attributes are provided, it's impossible to properly align the spinner to the right of the page. Providing a ´right´ parameter would solve this.

@TimothyGu
Copy link
Collaborator

This would complicate positioning (i.e. if both left and right are specified which one would you use?), and it's easy enough on your side, so closing.

right = '60%'
left = (100 - (+(right.slice(0, -1)))) + '%'
// '40%'

right = 60
left = (100 - right) + '%'
// '40%'

@dorian-marchal
Copy link

This fix doesn't work if I want to position the spinner 30px from the right without knowing the element width (on a button, for example).

@fgnass fgnass reopened this Jun 5, 2015
@theodorejb
Copy link
Collaborator

If we were to specifically support right positioning, to be consistent we would also need to support bottom positioning.

@dorian-marchal Is there anything preventing you from using CSS to accomplish this? For example:

var spinner = new Spinner({className: 'right-spinner', left: 'auto'});

And your CSS could contain something like this:

.right-spinner {
    right: 30px;
}

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

No branches or pull requests

5 participants