Skip to content

Commit

Permalink
Merge pull request #787 from CartoDB/jinja-workaround
Browse files Browse the repository at this point in the history
Workaround to fix jinja revindex
  • Loading branch information
Jesus89 authored Jun 17, 2019
2 parents c0d18c9 + bf51b7f commit 9713ff7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cartoframes/assets/templates/viz/legends.html.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
heading="{{layer.legend.title}}"
description="{{layer.legend.description}}"
>
{{ createLegend(layer.legend, 'layer%d_legend' % loop.revindex0) }}
{{ createLegend(layer.legend, 'layer%d_legend' % loop.index0) }}
{% if layer.legend.footer %}
<span slot="footer">{{layer.legend.footer}}</span>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion cartoframes/assets/templates/viz/map.js.j2
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function onReady() {
}

if (layer.legend) {
createLegend(mapLayer, layer.legend, index);
createLegend(mapLayer, layer.legend, layers.length - index - 1);
}

function setPopupsClick(tempPopup, interactivity, attrs) {
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-e git+https://github.com/CartoDB/carto-python.git#egg=carto
-e git+https://github.com/aayushuppal/jinja@loop_fix#egg=jinja2
.

0 comments on commit 9713ff7

Please sign in to comment.