Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use same swipe symbol everywhere, fix swipe div color #5249

Merged
merged 2 commits into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
24 changes: 16 additions & 8 deletions contribs/gmf/src/sass/swipe.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,30 @@ 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 {
height: 100%;
display: block;
margin: auto;
fredj marked this conversation as resolved.
Show resolved Hide resolved
}
}
}
}
66 changes: 66 additions & 0 deletions src/icons/swipe.svg
Loading
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>