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

If you select a driver in the table, change his marker circle color on map. #129

Open viper4gh opened 6 years ago

viper4gh commented 6 years ago

If you select a driver you want to follow him, which means you have to identify the map marker by drivername+vehiclename. The top 3 for example are identified by the Race Position, which means taht the implementation in this case maust be a bit different.

A marker looks like this in the HTML code:

`

9 - James Wall

`

For the reselect row feature after the automatic table reload, the row in the table is also identified by drivername+vehiclename. if (rowdata.drivername == cellDataDrivername && rowdata.vehiclename == cellDataVehiclename){jQuery(this).jqGrid('setSelection',rowid);}

In Result it should be possible to use this for the CSSClassChanger.

viper4gh commented 6 years ago

Changing the map marker color in selecting a row is now working.

Next step is reset the color on deselecting. This happens in 2 ways:

For the second way we maybe need an event for deselection of a row: https://stackoverflow.com/questions/26631903/jqgrid-deselect-event