From b513749484278b7a5f7187f28a472fb92c667287 Mon Sep 17 00:00:00 2001 From: Alicia Date: Tue, 24 Nov 2015 12:09:15 +0100 Subject: [PATCH] added canopy change functionality --- .../map/templates/legend/biomass_loss.handlebars | 5 +++++ app/assets/javascripts/map/templates/legend/loss.handlebars | 6 ------ app/assets/javascripts/map/views/LegendView.js | 6 +++--- 3 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 app/assets/javascripts/map/templates/legend/biomass_loss.handlebars delete mode 100644 app/assets/javascripts/map/templates/legend/loss.handlebars diff --git a/app/assets/javascripts/map/templates/legend/biomass_loss.handlebars b/app/assets/javascripts/map/templates/legend/biomass_loss.handlebars new file mode 100644 index 00000000..37f667ee --- /dev/null +++ b/app/assets/javascripts/map/templates/legend/biomass_loss.handlebars @@ -0,0 +1,5 @@ +{{#if threshold}} +
+

Displaying tree biomass loss with > {{threshold}} % canopy density.

+
+{{/if}} diff --git a/app/assets/javascripts/map/templates/legend/loss.handlebars b/app/assets/javascripts/map/templates/legend/loss.handlebars deleted file mode 100644 index dd1a8db9..00000000 --- a/app/assets/javascripts/map/templates/legend/loss.handlebars +++ /dev/null @@ -1,6 +0,0 @@ -{{#if threshold}} -
-

Displaying loss with > {{threshold}} % canopy density.

-

Tree cover loss is not always deforestation. ?

-
-{{/if}} diff --git a/app/assets/javascripts/map/views/LegendView.js b/app/assets/javascripts/map/views/LegendView.js index 35cbb870..f854235b 100644 --- a/app/assets/javascripts/map/views/LegendView.js +++ b/app/assets/javascripts/map/views/LegendView.js @@ -8,7 +8,7 @@ define([ 'handlebars', 'map/presenters/LegendPresenter', 'text!map/templates/legend/legend.handlebars', - 'text!map/templates/legend/loss.handlebars', + 'text!map/templates/legend/biomass_loss.handlebars', 'text!map/templates/legend/imazon.handlebars', 'text!map/templates/legend/fires.handlebars', 'text!map/templates/legend/forest2000.handlebars', @@ -31,7 +31,7 @@ define([ 'text!map/templates/legend/idn_peat.handlebars', 'text!map/templates/legend/hsdw.handlebars', -], function(_, Handlebars, Presenter, tpl, lossTpl, imazonTpl, firesTpl, +], function(_, Handlebars, Presenter, tpl, biomass_lossTpl, imazonTpl, firesTpl, forest2000Tpl, pantropicalTpl, idnPrimaryTpl, intact2013Tpl, grumpTpl, storiesTpl, terra_iTpl, concesionesTpl, concesionesTypeTpl, hondurasForestTPL,colombiaForestChangeTPL, tigersTPL, dam_hotspotsTPL, us_land_coverTPL, global_land_coverTPL, formaTPL,bra_biomesTPL, idn_peatTPL,hsdwTPL) { 'use strict'; @@ -55,7 +55,7 @@ define([ * Optional layers detail templates. */ detailsTemplates: { - loss: Handlebars.compile(lossTpl), + biomass_loss: Handlebars.compile(biomass_lossTpl), imazon: Handlebars.compile(imazonTpl), fires: Handlebars.compile(firesTpl), forest2000: Handlebars.compile(forest2000Tpl),