SHWotever / SimHub

Multi sim dashboard, bass shaker driver, ....
http://www.simhubdash.com/
770 stars 97 forks source link

[Feature request] DashStudio - layer repetitions by fx #1345

Closed kaaac closed 11 months ago

kaaac commented 1 year ago

Is your feature request related to a problem? Please describe. This feature will allow to create more flexible dashboards.

Describe the solution you'd like Make possible to set AutoRepeat->Repetitions value by "FX".

Describe alternatives you've considered Currently only static values are possible.

Additional context With this feature we could repeat items for example only by participants count.

SHWotever commented 1 year ago

Hi ! Unfortunately it's not possible, it's a limitation due to the HTML rendering engine, number of iterations must be known straight before the dashboard is started to be able to "connect" every components between the Simhub application and the web page.

kaaac commented 1 year ago

Thanks for info :(

kaaac commented 1 year ago

Maybe instead of this, it would be possible to add new option "RepetitionsVisible" to make add display:none for every row which have higher index than dynamic value from FX?

john-ezra commented 1 year ago

Not sure if it would work for your use case, but I have gotten around this by finding a property that returns some fixed value when there is no data, and used that in conjunction with the repeat index to control the visibility of the repeated item.

For example, if I only want a background rectangle to show up in a leaderboard if there is a driver in that row of the leaderboard, I would set the visibility function to something like this.

const driverIndex = (String(repeatindex()-1).padStart(2,0)) return $prop(`IRacingExtraProperties.iRacing_Leaderboard_Driver_${driverIndex}_IsConnected`)

SHWotever commented 11 months ago

Hi !

It gave me the biggest headache I ever had on dashstutio but FX or repetitions are now available in the betas available on discord and will be available for the next public version ;)

Have fun !

kaaac commented 11 months ago

Thank you!

You're amazing!