Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/essence/Tools/Layers/LayersTool.css
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
#layersTool .tileCogColormap #titlerCogColormapCSS {
width: 254px;
height: 28px;
transform: rotateZ(90deg) translateX(125px) translateY(-177px);
transform: rotateZ(-90deg) translateX(-125px) translateY(177px);
border-left: 14px solid #222;
border-right: 14px solid #222;
}
Expand Down
79 changes: 40 additions & 39 deletions src/essence/Tools/Layers/LayersTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ var LayersTool = {
units = layer.cogUnits
}

const dynamicLegendConf = []
let dynamicLegendConf = []
const imgElement = document.getElementById(
`titlerCogColormapImage_${L_.asLayerUUID(layerName)}`
)
Expand Down Expand Up @@ -349,10 +349,11 @@ var LayersTool = {
value: label,
})
}
document.body.removeChild(canvasElement)

dynamicLegendConf = dynamicLegendConf.reverse()
L_.layers.data[layer.name]._legend = dynamicLegendConf

document.body.removeChild(canvasElement)

$('#tileCogColormapMapLines').empty()
for (let i = 0; i < 9; i++) {
$('#tileCogColormapMapLines').append(
Expand Down Expand Up @@ -670,27 +671,27 @@ function interfaceWithMMGIS(fromInit) {
'<i class="mdi mdi-restore mdi-18px"></i>',
'</div>',
'</div>',
`<li class="tileCogMin">`,
`<li class="tileCogMax">`,
'<div>',
'<div>Rescale Min Value</div>',
'<div>Rescale Max Value</div>',
'<div>',
`<input class='tilerescalecogmin' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="min" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMin : node[i].cogMin}" default="0">`,
`<input class='tilerescalecogmax' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="max" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMax : node[i].cogMax}" default="255">`,
node[i].cogUnits != null ? `<div class='tileCogUnits'>${node[i].cogUnits}</div>`: '',
'</div>',
'</div>',
'</li>',
'<li id="tileCogLegend_1" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_2" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_3" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_4" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_5" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_6" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_7" class="tileCogLegend">-</li>',
`<li class="tileCogMax">`,
'<li id="tileCogLegend_6" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_5" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_4" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_3" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_2" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_1" class="tileCogLegend">-</li>',
`<li class="tileCogMin">`,
'<div>',
'<div>Rescale Max Value</div>',
'<div>Rescale Min Value</div>',
'<div>',
`<input class='tilerescalecogmax' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="max" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMax : node[i].cogMax}" default="255">`,
`<input class='tilerescalecogmin' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="min" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMin : node[i].cogMin}" default="0">`,
node[i].cogUnits != null ? `<div class='tileCogUnits'>${node[i].cogUnits}</div>`: '',
'</div>',
'</div>',
Expand Down Expand Up @@ -873,27 +874,27 @@ function interfaceWithMMGIS(fromInit) {
'<i class="mdi mdi-restore mdi-18px"></i>',
'</div>',
'</div>',
`<li class="tileCogMin">`,
`<li class="tileCogMax">`,
'<div>',
'<div>Rescale Min Value</div>',
'<div>Rescale Max Value</div>',
'<div>',
`<input class='tilerescalecogmin' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="min" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMin : node[i].variables?.streamlines?.minVelocity}" default="0">`,
`<input class='tilerescalecogmax' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="max" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMax : node[i].variables?.streamlines?.maxVelocity}" default="255">`,
node[i].variables?.streamlines?.units != null ? `<div class='tileCogUnits'>${node[i].variables?.streamlines?.units}</div>`: '',
'</div>',
'</div>',
'</li>',
'<li id="tileCogLegend_1" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_2" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_3" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_4" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_5" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_6" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_7" class="tileCogLegend">-</li>',
`<li class="tileCogMax">`,
'<li id="tileCogLegend_6" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_5" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_4" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_3" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_2" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_1" class="tileCogLegend">-</li>',
`<li class="tileCogMin">`,
'<div>',
'<div>Rescale Max Value</div>',
'<div>Rescale Min Value</div>',
'<div>',
`<input class='tilerescalecogmax' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="max" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMax : node[i].variables?.streamlines?.maxVelocity}" default="255">`,
`<input class='tilerescalecogmin' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="min" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMin : node[i].variables?.streamlines?.minVelocity}" default="0">`,
node[i].variables?.streamlines?.units != null ? `<div class='tileCogUnits'>${node[i].variables?.streamlines?.units}</div>`: '',
'</div>',
'</div>',
Expand Down Expand Up @@ -978,27 +979,27 @@ function interfaceWithMMGIS(fromInit) {
'<i class="mdi mdi-restore mdi-18px"></i>',
'</div>',
'</div>',
`<li class="tileCogMin">`,
`<li class="tileCogMax">`,
'<div>',
'<div>Rescale Min Value</div>',
'<div>Rescale Max Value</div>',
'<div>',
`<input class='tilerescalecogmin' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="min" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMin : node[i].cogMin}" default="0">`,
`<input class='tilerescalecogmax' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="max" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMax : node[i].cogMax}" default="255">`,
node[i].cogUnits != null ? `<div class='tileCogUnits'>${node[i].cogUnits}</div>`: '',
'</div>',
'</div>',
'</li>',
'<li id="tileCogLegend_1" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_2" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_3" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_4" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_5" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_6" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_7" class="tileCogLegend">-</li>',
`<li class="tileCogMax">`,
'<li id="tileCogLegend_6" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_5" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_4" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_3" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_2" class="tileCogLegend">-</li>',
'<li id="tileCogLegend_1" class="tileCogLegend">-</li>',
`<li class="tileCogMin">`,
'<div>',
'<div>Rescale Max Value</div>',
'<div>Rescale Min Value</div>',
'<div>',
`<input class='tilerescalecogmax' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="max" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMax : node[i].cogMax}" default="255">`,
`<input class='tilerescalecogmin' style="width: 120px; border: none; height: 28px; margin: 1px 0px;" layername="${node[i].name}" parameter="min" type="number" value="${node[i].currentCogMin != null ? node[i].currentCogMin : node[i].cogMin}" default="0">`,
node[i].cogUnits != null ? `<div class='tileCogUnits'>${node[i].cogUnits}</div>`: '',
'</div>',
'</div>',
Expand Down