Remove the setTimeout
chelm opened this issue · 3 comments
chelm commented
there's a setTimeout call in d3Layer.js - totally absurd and annoying work around for a race condition. https://github.com/chelm/esri-d3/blob/master/d3Layer.js#L36
I think we can override the _setMap function and call the render method once the map is ready. I recently did that elsewhere and will add it here.
benheb commented
Is this for on layer loaded firing before the graphics exist? Or something else. If so, try "onUpdateEnd" rather than "onLoad"
chelm commented
Oh cool, I'll look right now. I do actually like using _setMap so its very much tied to the actual adding of the map itself. But even the fact that I know that _setMap exists is cheating since I've seen the actually JS API source code, non-minified.