Skip to content

Commit f948f54

Browse files
committed
fix: now rerenders properly when layer control dropdown values change
1 parent 3c3efa4 commit f948f54

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"@eox/layout": "^0.3.0",
1515
"@eox/map": "^1.19.3",
1616
"@tailwindcss/vite": "^4.0.3",
17+
"color-legend-element": "^1.3.0",
1718
"flatgeobuf": "^3.36.0",
1819
"geotiff.js": "^1.0.1",
1920
"json-stringify-pretty-compact": "^4.0.0",

src/eodash-style-editor.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import "@eox/map"
88
import "@eox/layercontrol"
99
import "@eox/map/dist/eox-map-advanced-layers-and-sources.js"
1010
import "@eox/jsonform"
11+
import "color-legend-element"
1112

1213
import "./components/toolbar/toolbar"
1314
import { getGeotiffExtent } from "./helpers/geotiff"
@@ -301,10 +302,10 @@ export class EodashStyleEditor extends LitElement {
301302
if (layer.type == "WebGLTile") {
302303
layer.style = this._style
303304
} else if (layer.type == "Vector") {
304-
layer.style = updateVectorLayerStyle(this._style)
305305
layer.properties.layerConfig = {
306306
schema: this._style.jsonform,
307-
style: updateVectorLayerStyle(this._style),
307+
style: this._style,
308+
legend: this._style.legend,
308309
}
309310
}
310311

@@ -419,7 +420,7 @@ export class EodashStyleEditor extends LitElement {
419420
// Temporary function until I move the layer control box to a separate element.
420421
get layerControl() {
421422
return html`
422-
<div class="card" style="max-width: 300px">
423+
<div class="card scroll" style="max-width: 300px">
423424
<!--<div class="editor-toolbar">
424425
<span class="start">
425426
<div class="icon-container editor">

src/styles/app.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,12 @@ eox-map {
148148
background: #fffa;
149149
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.17);
150150
backdrop-filter: blur(10px);
151-
overflow: hidden;
151+
overflow-x: hidden;
152+
overflow-y: hidden;
153+
}
154+
155+
.card.scroll {
156+
overflow-y: auto;
152157
}
153158

154159
.card.layers {

0 commit comments

Comments
 (0)