Skip to content

Feature/ec 102 better legend

Christopher Johnson requested to merge feature/EC-102-better-legend into master

Locked Legend

The following change adjusts the legend so that specific values can be entered in using the keyboard. The legend now has two additional controls, a 🔒 and a reset icon. The reset icon will snap the legends values back to the default for the currently viewed image selection. The lock icon toggles the legend in to keeping its values when moving to a different map image.

image Legend in locked mode

The slide operation continues to work as it previously did. However, now you can manually enter min/max values by clicking (but not dragging) on the relevant handle.

image Single click data entry

Internal changes

I have abstracted out the logic of the legend from the climate change model to a new model Legend. The ColourPalettemodel can optionally take a legend which it will listen to. The legend now only deals with 1% increments/decrements, this fixes unwanted updates triggered by jquery ui and avoids a double representation of 0% (seen as 0% and -0%)

for review

Merge request reports

Loading