Skip to content

Commit

Permalink
Merge pull request #2143 from CartoDB/support1566-fix-legends-margins
Browse files Browse the repository at this point in the history
Fix margins on legends
  • Loading branch information
jesusbotella committed Jun 19, 2018
2 parents e8f38bf + f4fb03b commit b7f27e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/geo/ui/legends/base/legend-view-base.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ var ImageLoaderView = require('./img-loader-view');

var LegendViewBase = Backbone.View.extend({

className: 'CDB-Legend-item',
className: 'CDB-Legend-item u-tSpace-xl',

initialize: function (opts) {
this._placeholderTemplate = opts.placeholderTemplate;
Expand Down
2 changes: 2 additions & 0 deletions src/geo/ui/legends/bubble/legend-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ var formatter = require('../../../../util/formatter');

var BubbleLegendView = LegendViewBase.extend({

className: 'CDB-Legend-item u-tSpace-xl u-clearfix',

_getCompiledTemplate: function () {
return template({
hasCustomLabels: this._hasCustomLabels(),
Expand Down
4 changes: 2 additions & 2 deletions src/geo/ui/legends/layer-legends-template.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
</h2>

<% if (showLegends) { %>
<div class="Legends js-legends u-tSpace-xl"></div>
<% } %>
<div class="Legends js-legends"></div>
<% } %>
6 changes: 3 additions & 3 deletions themes/scss/map/_overlays.scss
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ $maxLegendContainerHeight: 300px;
.CDB-LayerLegends {
margin-top: 0;

+ .CDB-LayerLegends {
&:not(:empty) + &:not(:empty) {
margin-top: 12px;
}
}
Expand Down Expand Up @@ -318,11 +318,11 @@ $maxLegendContainerHeight: 300px;

.Bubble-container {
position: relative;
top: 7px;
top: 0;
right: 0;
width: 100%;
height: 100px;
margin: 10px 0;
margin: 16px 0 10px;
}

.Bubble-circle {
Expand Down

0 comments on commit b7f27e6

Please sign in to comment.