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

InfoBox div size and position undefined #314

Open
GoogleCodeExporter opened this issue Jun 3, 2015 · 0 comments
Open

InfoBox div size and position undefined #314

GoogleCodeExporter opened this issue Jun 3, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

I'm trying to calculate the size and position of the div that gets created by 
InfoBox when infobox.open() is called, but it's seemingly undefined for the 
first 50-100ms after open is called. I've tried listening for the various 
InfoBox events (position_changed, content_changed, domready, etc.) and none of 
them have helped.

I'm not sure if this is a bug or a feature request, but it would be great if 
there was a way to know when we can safely check the div position and size, 
perhaps via a new InfoBox event like "opened"?

The only hack workaround I've been able to come up with is this:

    setTimeout(function ()
    {
        // Hopefully this is defined after waiting 100ms
        var infoBoxOffset = $(".infoBox").offset();
    },
    100);

Any ideas or recommendations?

Original issue reported on code.google.com by mtf...@gmail.com on 12 Aug 2014 at 2:22

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

1 participant