-
-
Save hatched/118a91ba19be71bde4f2 to your computer and use it in GitHub Desktop.
This will throttle add unit's replace the lines 196 to 198 in inspector.js with this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// XXX REMOVE ME - I'm only here to throttle unit creation to test UX | |
var self = this; | |
for(var j = 0; j < delta; j+=1) { | |
setTimeout(function() { | |
console.log('settimeout'); | |
// Keep me but swap self for this and 1 to delta | |
env.add_unit( | |
service.get('id'), 1, | |
Y.bind(self._addUnitCallback, self)); | |
}, j * 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment