Skip to content

Commit

Permalink
Merge pull request #5249 from camptocamp/GSGMF-1121
Browse files Browse the repository at this point in the history
Use same swipe symbol everywhere, fix swipe div color
  • Loading branch information
fredj committed Oct 25, 2019
2 parents a6ac2b5 + 5650216 commit bbd295e
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 17 deletions.
3 changes: 0 additions & 3 deletions contribs/gmf/src/layertree/common.scss
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,4 @@
margin-bottom: 0.62rem;
}
}
.gmf-layer-being-swipe {
margin-left: 0.25rem;
}
}
9 changes: 4 additions & 5 deletions contribs/gmf/src/layertree/component.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,9 @@

{{layertreeCtrl.node.name | translate}}

<span
ng-if="gmfLayertreeCtrl.gmfLayerBeingSwipe.layer && gmfLayertreeCtrl.gmfLayerBeingSwipe.layer === layertreeCtrl.layer"
class="fas fa-arrows-alt-h gmf-layer-being-swipe"
></span>
<i ng-if="gmfLayertreeCtrl.gmfLayerBeingSwipe.layer && gmfLayertreeCtrl.gmfLayerBeingSwipe.layer === layertreeCtrl.layer">
<%=require('ngeo/icons/swipe.svg?viewbox&width=1em')%>
</i>

<i
class="gmf-layertree-zoom"
Expand Down Expand Up @@ -181,7 +180,7 @@
</a>
</li>
<li ng-if="::gmfLayertreeCtrl.supportsOpacityChange(layertreeCtrl)">
<i class="fa fal fa-sort fa-fw fa-rotate-90"></i>
<i><%=require('ngeo/icons/swipe.svg?viewbox&height=1em')%></i>
<a
ng-click="::gmfLayertreeCtrl.toggleSwipeLayer(layertreeCtrl); popoverCtrl.dismissPopover()"
href=""
Expand Down
25 changes: 17 additions & 8 deletions contribs/gmf/src/sass/swipe.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,31 @@ ngeo-mapswipe {
.ngeo-swipe-line {
position: absolute;
left: 50%;
width: 4px;
width: 6px;
margin-left: -2px;
height: 100%;
background-color: #f00;
background-color: darken($brand-secondary, $standard-variation);
border: {
left: $border;
right: $border;
}
}

.ngeo-swipe-arrow {
position: absolute;
width: 32px;
height: 32px;
width: 100%;
height: 2.5rem;
left: 0;
top: 50%;
margin-top: -16px;
padding: 5px 4px;
background-color: #f00;
top: calc(50% - 1.25rem);
background-color: $brand-primary;
color: #fff;
border: $border;
svg {
font-size: 1rem;
height: 100%;
display: block;
margin: auto;
}
}
}
}
66 changes: 66 additions & 0 deletions src/icons/swipe.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/map/swipe.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="ngeo-swipe-line-draggable">
<div class="ngeo-swipe-line"></div>
<div class="ngeo-swipe-arrow"><i class="fas fa-arrows-alt-h fa-2x"></i></div>
<div class="ngeo-swipe-arrow"><%=require('ngeo/icons/swipe.svg?viewbox&height=1em')%></div>
</div>

0 comments on commit bbd295e

Please sign in to comment.