leaguevine / leaguevine-ultistats

MIT License
18 stars 4 forks source link

substituting players broken when game is reloaded #81

Closed cboulay closed 12 years ago

cboulay commented 12 years ago

Start tracking a game from the game screen. Works as normal. Then either go back to the game screen, or refresh the browser, and now substitutions are broken.

I guess there is a disconnect between trackedgame.get("onfield_1") (for example) and what is actually displayed. This disconnect only happens when the offfield and onfield rosters have been persisted to the database. I still haven't found the exact cause for this, but it will probably be fixed in the router. Around lines 486 or 515.

cboulay commented 12 years ago

Apparently all that was needed was to bind to a different event: "reset" instead of "change:team_1". It took me a while to find it, and I ended up refactoring some code along the way, and found another bug: the game over button should not have worked.

Anyway, all fixed now.

mliu7 commented 12 years ago

This fix is working well for me. I merged it into master and am deploying it to the live site today.

You can jump back to working on the master branch, since Chadapache is fully integrated into it and master is working well.