explore: show width/opacity sliders in lines mode too
This commit is contained in:
@@ -153,7 +153,7 @@
|
||||
function _updateHeatPaint(width: number, opacityPct: number) {
|
||||
if (!map) return;
|
||||
const p = _heatPaint(width, opacityPct);
|
||||
for (const id of ['explore-heat-global', ...HEAT_TYPES.map(t => `explore-heat-${t}`)]) {
|
||||
for (const id of ['explore-lines', 'explore-heat-global', ...HEAT_TYPES.map(t => `explore-heat-${t}`)]) {
|
||||
if (!map.getLayer(id)) continue;
|
||||
map.setPaintProperty(id, 'line-width', p['line-width']);
|
||||
map.setPaintProperty(id, 'line-opacity', p['line-opacity']);
|
||||
@@ -324,6 +324,7 @@
|
||||
<button class="pill small" class:active={heatmapMode === 'global'} onclick={() => heatmapMode = 'global'}>Global</button>
|
||||
<button class="pill small" class:active={heatmapMode === 'bytype'} onclick={() => heatmapMode = 'bytype'}>By type</button>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="slider-row">
|
||||
<span class="slider-label">Width</span>
|
||||
<input type="range" min="2" max="12" step="1" class="slider" bind:value={heatWidth} />
|
||||
@@ -334,7 +335,6 @@
|
||||
<input type="range" min="3" max="30" step="1" class="slider" bind:value={heatOpacityPct} />
|
||||
<span class="slider-val">{heatOpacityPct}%</span>
|
||||
</div>
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
<!-- Stats -->
|
||||
|
||||
Reference in New Issue
Block a user