Closed fregante closed 8 years ago
Thanks for the PR. If it is really better to poll the image header, I will probably refactor your code into the plugin and give you credit, as I'm not really a fan of having loose function
declarations floating around the code (I prefer the var
based function declaration).
I'll test it out a little and get back to you.
Here, this way you can just pull the PR and you can just leave the credit in the commits :)
Thanks for the PR. The code will be refactored into the v1.3 release :)
naturalWidth
andnaturalHeight
are available as soon as the header of the image is loaded, which for panoramas could be available several seconds before the image is fully loaded.To verify this I used a lightweight polling function and still kept a listener on the full
load
just in case that happens between each poll, which could save up to 50ms (!!!)