Esri / wind-js

An demo animation of wind on a Canvas layer in the JSAPI
MIT License
735 stars 214 forks source link

Bug in code in IE9 #7

Closed ghost closed 10 years ago

ghost commented 10 years ago

In IE9, you get an error in the console:

SCRIPT5009: 'requestAnimationFrame' is undefined
windy.js, line 440 character 15

Sure enough, the actual function appears to be named 'requestAnimFrame' and not 'requestAnimationFrame'

If you change line 494 of windy.js from

window.requestAnimFrame = (function(){

to

window.requestAnimationFrame = (function(){

it then works in IE9 as well.

To support other browsers as well, you might consider adding other vendors, e.g. insert following after line 497

window.oRequestAnimationFrame || 
window.msRequestAnimationFrame || 
chelm commented 10 years ago

Thanks for finding this. I'm guilty of rarely testing in IE*. Seeing that I don't have access to a windows box or a VM would you mind submitting a PR for this? @iwatkins

chelm commented 10 years ago

This is closed by PR #10