GNimrodG / simrail-map-optimized

A feature rich and optimized online map for Simrail.
https://smo.data-unknown.com
GNU Affero General Public License v3.0
2 stars 1 forks source link

[Dark Mode] Map color segmentation for showing full gray scale map on background but keeping the colored layers #22

Closed EMREOYUN closed 2 weeks ago

EMREOYUN commented 2 weeks ago

Inspired by the simrail.app map. However, the major change is speed and infrastructure layers keep their colors. This code only works on dark mode.

Before: opera_1Mo1WDksVi

How it looks on simrail.app: image

After: opera_FC4aKhu4TS

GNimrodG commented 2 weeks ago

Hi, It was intentional design on my part to use the current color scheme and not just a grayscale map. It's a good idea, but I would like to keep the current design too, so maybe we can implement it as a setting? So users can chose which style they prefer.

EMREOYUN commented 2 weeks ago

I managed to add something like this because I couldn't manage how to reload CSS classes dynamically: image If that is fine, I can commit these changes.

GNimrodG commented 2 weeks ago

I think should be possible without the reload, just create an other class and toggle them based on the setting. I will look into it.

EMREOYUN commented 2 weeks ago

I forgot to add note. This is whay I could done. Can you check the code from here?

GNimrodG commented 2 weeks ago

Also you don't need to commit each file separately, you can include them in one commit ;)

EMREOYUN commented 2 weeks ago

Also you don't need to commit each file separately, you can include them in one commit ;)

Since the other branch of mine has pending commits(personal changes), I do change files in Github Web Editor which does edit one file at the time.

GNimrodG commented 2 weeks ago

Since the other branch of mine has pending commits(personal changes), I do change files in Github Web Editor which does edit one file at the time.

You can use GitHub's web based VSCode (press . on the keyboard while the branch is open) then, there you can make and commit your changes.

EMREOYUN commented 2 weeks ago

I wrote a custom TileLayer to refresh layers dynamically. Simple but effective.