eckhchri / pcars-ds-liveview

Provides a html page for project cars dedicated server and display a map of the current race.
14 stars 1 forks source link

RacePosition and CSS Class not equal #55

Closed eckhchri closed 8 years ago

eckhchri commented 8 years ago

20160309_pcars_raceposclassidnotequaltolabel3

Maybe a side effect off disbaling this.draw() calls within this.update() function.

eckhchri commented 8 years ago

https://github.com/mbostock/d3/wiki/Selections#data

When data is assigned to an element, it is stored in the property data (defined by D3), thus making the data "sticky" so that it is available on re-selection. und A key function key([ d [, i ]]) may be specified to control how data is joined to elements (this replaces the default by-index behavior).

eckhchri commented 8 years ago

Solved by commit https://github.com/eckhchri/pcars-ds-liveview/commit/cd39bddb1389c6d34732fb349a637fa9693fc098

root cause: mixed up of variable RacePos(now named GridPosition) and RacePosition.