aboutsummaryrefslogtreecommitdiffstats
path: root/main.js
Commit message (Collapse)AuthorAgeFiles
* Measurement panel: Improve style.HEADmasterGuilhem Moulin29 hours1
| | | | | In particular, use `border-radius: var(--bs-border-radius-lg)` for consistency with the radio buttons above.
* Minor refactoring.Guilhem Moulin29 hours1
| | | | Scope some variables tighter.
* Add a closing button to the measurement panel.Guilhem Moulin30 hours1
| | | | | It can be confusing that one had to click on the ruler icon to go back to the normal mode where one can select features.
* wordingGuilhem Moulin30 hours1
|
* Increase font size for measurement results.Guilhem Moulin43 hours1
| | | | | | | And ensure it overflows on the left. (It's right-aligned and there is room for 10⁶ km² with one decimal which is way more than likely needed, but we don't want any overflow to push the unit to the right side of the box.)
* import fontsource's CSS from style.css not main.js.Guilhem Moulin45 hours1
|
* Don't make assumptions about Object.values() ordering.Guilhem Moulin47 hours1
|
* Add panel to measure lengths and areas.Guilhem Moulin2 days1
| | | | | | | | Inspired from https://openlayers.org/en/latest/examples/measure.html and https://openlayers.org/en/latest/examples/draw-features.html . We use the Inter font https://rsms.me/inter/ for the measurement value as it has good support for tabular-nums.
* wibbleGuilhem Moulin2 days1
|
* Popover: Refactor area/length formatting.Guilhem Moulin2 days1
|
* Use a regular no-break space U+00A0 as unit separator.Guilhem Moulin2 days1
| | | | | Instead of the narrow no-break space U+202F. It appears the former is typographically correct.
* Factor out locale.Guilhem Moulin2 days1
|
* VBK: Rename layers station_* to turbine_*.Guilhem Moulin4 days1
| | | | Cf. 00aad33fcbe8e76700282fae2f8057ccd01904b1 in tools.
* Add comment.Guilhem Moulin4 days1
|
* Make LAYERS object hierarchical.Guilhem Moulin4 days1
| | | | | | | | (First the MVT basename, then feature layernames.) More refactoring (such as consolidation of LAYERS/STYLES/mapLayers) would be nice, but not worth doing at the moment since we're planing to switch to WebGL rendering once https://github.com/openlayers/openlayers/issues/15807 and https://github.com/openlayers/openlayers/issues/16246 are fixed.
* Enable strict mode on main.js.Guilhem Moulin4 days1
|
* Add comments.Guilhem Moulin5 days1
|
* Setup a timeout to adjust the time filter at midnight.Guilhem Moulin6 days1
| | | | | | | We use usual integer comparison against the feature's timestamp internally, so for relative filters we need to adjust boundaries at midnight. The help text needs updating too if the modal is open and the relative dialog checked.
* Seal popover fields.Guilhem Moulin6 days1
|
* Undo splitting out to multiple files.Guilhem Moulin6 days1
| | | | | | | | | | | | The reason is that we want the different modules to produce side-effects (to avoid creating functions and keeping references to it) and we therefore need to control the order in which they are inlined during `vite build`. Unfortunately this doesn't seem to be possible right now, cf. https://github.com/storybookjs/storybook/issues/30768 . This reverts commits 670bba058d83620abdb3e8db5fd4ea89dba08142, 05a018f27aba3a20fd581cb88daa8afbbd3407de and 0fc7bdd8bf374c36fa0ba27702d1fafed09277ac.
* Factor out map setup into separate file.Guilhem Moulin6 days1
| | | | | | This allows importing `map` in other modules, thereby eliminating the need for creating and exporting functions that would be called only once.
* Minor refactoring.Guilhem Moulin6 days1
|
* Dispose popover/overlay when opening the age filter dialog.Guilhem Moulin6 days1
| | | | | We might filter away the feature currently selected so it makes sense to clear the feature list first.
* Shuffle VBK vindkraftverk layers around.Guilhem Moulin7 days1
| | | | To match the ordering from https://vbk.lansstyrelsen.se/ .
* Refactor popover handling.Guilhem Moulin7 days1
| | | | | In particular, make the definition object hierarchical and rename its fields.
* Factor out Popover handling into separate module.Guilhem Moulin9 days1
|
* ESLint: Fix no-loss-of-precision error.Guilhem Moulin9 days1
| | | | Fixes: https://eslint.org/docs/latest/rules/no-loss-of-precision
* ESLint: Remove unused variables.Guilhem Moulin9 days1
| | | | And also fix `isVisible()` along the way.
* ESLint: Remove useless escapes.Guilhem Moulin9 days1
|
* Move *.css files to ./src.Guilhem Moulin9 days1
|
* ESLint: Remove unused imports.Guilhem Moulin9 days1
|
* Split `layers` object into separate file.Guilhem Moulin9 days1
| | | | | | This rather large commit merely moves the object declaration into the new file and adjusts the import declarations accordingly. This will serve as basis for a future refactoring commit.
* Add comment/warning.Guilhem Moulin9 days1
|
* Ensure age filter only applies to layers which expose the feature.Guilhem Moulin10 days1
|
* Improve wording in layer list.Guilhem Moulin10 days1
|
* Age filter dialog: Improve wording.Guilhem Moulin10 days1
|
* Rename “age” to “ts”.Guilhem Moulin10 days1
| | | | Cf. 231d64cbd14c2d1ccb6468dc9666d4433e39834c in tools.
* Add ability to filter over feature “age”.Guilhem Moulin10 days1
| | | | | Right now this is only implemented for avverk, mrr and vbk as other layers don't export the property.
* Use optional chaining operator (?.).Guilhem Moulin11 days1
| | | | | https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining That simplifies the logic slightly.
* Rename #modal-info to #info-modal for consistency.Guilhem Moulin12 days1
|
* Refactor button selection logic.Guilhem Moulin12 days1
| | | | Thereby making it easier to extend if needs be.
* Popover Consolidate building of <a> tags for links.Guilhem Moulin12 days1
|
* Consolidate comparison with undefined/null.Guilhem Moulin12 days1
| | | | | | | | | | Replace `a === undefined || a === null` resp. `a !== undefined && a !== null` with `a == null` resp. `a != null`. See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality . Relax also some `=== undefined` and `=== null` into `== null` when that makes sense.
* Feature fetch: Never pass “fid:undefined” when querying the CGI.Guilhem Moulin12 days1
|
* JS: Minor refactorining of the OL layer creation logic.Guilhem Moulin12 days1
| | | | | Also, don't define a projection for raster layers and let OL get it from the source's metadata instead.
* info-modal: Don't crash for layers with unknown sources or URLs.Guilhem Moulin12 days1
|
* Add a dynamic legend.Guilhem Moulin13 days1
| | | | (Long overdue…)
* typofixGuilhem Moulin13 days1
|
* Fix layer names.Guilhem Moulin14 days1
| | | | Regression from 8d03e7794dae3696b0a975477542a4db03136ab7.
* Add two more nature value layers.Guilhem Moulin14 days1
|