Add invert filter for background imagery#12340
Open
kalucky0 wants to merge 4 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an “Invert” display option for background imagery so users can invert light imagery (e.g., white geodetic plans) to reduce eye strain and improve editing visibility.
Changes:
- Adds an
invertslider to the Background “Display Options” UI alongside brightness/contrast/saturation/sharpness. - Extends the background renderer’s CSS
filterchain to includeinvert(...)and exposes abackground.invert()setter/getter. - Adds an English localization string for the new option.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| modules/ui/sections/background_display_options.js | Adds an invert slider and refactors slider config to per-option {def,val,min,max} objects. |
| modules/renderer/background.js | Adds _invert state, includes it in the computed CSS filter string, and exposes background.invert(). |
| data/core.yaml | Adds en.background.invert localization key. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've been doing some mapping lately in areas where the aerial imagery is pretty outdated, so I've had to rely on geodetic plans. The problem is those plans are mostly white, which makes it super hard to see what I'm drawing and just starts to hurt my eyes after a while.
I started adding
filter: invert(1);through the browser dev tools and I figured I'd just build it in as a feature instead of doing it every time. I know the contributing guide says to open an issue for discussion first, but this felt like such a small, specific addition that I just went for it.I tried to keep the changes as minimal as possible and stuck to the existing coding style in the files I was editing so I didn't mess up the formatting.