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

Horizontal position error #7

Open
euvl opened this issue Sep 27, 2017 · 2 comments
Open

Horizontal position error #7

euvl opened this issue Sep 27, 2017 · 2 comments
Labels

Comments

@euvl
Copy link
Owner

euvl commented Sep 27, 2017

Horizontal position does not work correctly when body's padding is not 0

@euvl euvl changed the title Horizontal position does not work correctly when body's padding is not 0 Horizontal position error Sep 27, 2017
@euvl euvl added the bug label Sep 27, 2017
@bitcoinmaniac
Copy link

This happens because euvl look for window size (tale a look at mixins)

@WebKenth
Copy link

@bitcoinmaniac An update to the documentation with be greatly appreciated rather than a fragile "take a look at x" message ;)

Incase anyone stumbles upon this and can't for their life figure out how to resize the entire container because it is for some odd reason assuming that you always use the window size rather than the container's size?

Just add this thingy thing to your Wrapper Vue Component

    mounted() {
        window.innerWidth = this.$el.getWidth();
        window.dispatchEvent(new Event('resize'));
    }

Now your grid is perfectly aligned to your vue component's wrapper, as it should be

Only downside is that we have now changed the window's innerWidth so god, knows what other issues will come from this

I got no idea why or how mixins work, but i digged into the window_size.js mixin and noticed the window.innerHeight and window.innerWidth was used, these are global variables and can be fiddled with, lucky.

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

No branches or pull requests

3 participants