Skip to content

Commit

Permalink
Merge pull request #394 from NASA-AMMOS/jr-maxwidth-legend
Browse files Browse the repository at this point in the history
Added max-width to legend to prevent long text from filling screen
  • Loading branch information
jtroberts authored Jul 13, 2023
2 parents 9ca8c11 + 9d5d3a9 commit eb10fc4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/essence/Tools/Legend/LegendTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,11 @@ function drawLegends(tools, _legend, layerUUID, display_name, opacity) {
.style('height', '100%')
.style('line-height', '19px')
.style('font-size', '14px')
.style('overflow', 'auto')
.style('overflow', 'hidden')
.style('white-space', 'nowrap')
.style('max-width', '270px')
.style('text-overflow', 'ellipsis')
.attr('title', _legend[d].value)
.text(_legend[d].value)
} else if (shape == 'continuous' || shape == 'discreet') {
if (lastShape != shape) {
Expand Down

0 comments on commit eb10fc4

Please sign in to comment.