Open gete76 opened 9 years ago
When did we change this?
My apologies, I read the diff history wrong. I did pull down changes today. Though I'm still trying to understand what broke. The _process_request function in dist/leaflet.utfgrid.js throws a window.setTimeout is not a function. I found that 'this' passed as the parameter in the loading function is not the window object or global context as expected according to the code. Though this worked fine before when loaded in a browserify module. Any ideas? My own solution was to just change 'this' to 'window' .
Might have been #28
Is it okay if I submit a pull request for this?
Yeah please do
Not sure if this is really a bug but more to do with intention. I noticed the new changes now load the Utfgrid with 'this' as the parameter to be passed for the window parameter. Passing 'this' assumes that in the context of loading this file that 'this' is the window object or some other object with global functions. I now get a window.setTimeout is not function because I load Utfgrid into a browserify module and 'this' is definitely not the window object in its context. What's the purpose of passing 'this' and not 'window' in the wrapper function?