[Frontend] Fixed cursor: grab on Time Conductor

Fixes #933
Fixes #1193
Moved cursor: grab into mixin; sass cleanups
This commit is contained in:
Charles Hacskaylo 2016-10-14 11:33:35 -07:00
parent 07a4e26317
commit 8f67cbd717
4 changed files with 11 additions and 20 deletions

View File

@ -363,14 +363,13 @@
} }
} }
@mixin webkitProp($name, $val) { @mixin cursorGrab() {
#{$name}: #{$val}; cursor: grab;
-webkit-#{$name}: #{$val}; cursor: -webkit-grab;
} &:active {
cursor: grabbing;
@mixin webkitVal($name, $val) { cursor: -webkit-grabbing;
#{$name}: #{$val}; }
#{$name}: -webkit-#{$val};
} }
@mixin verticalCenter { @mixin verticalCenter {

View File

@ -345,6 +345,9 @@
.mode-selector .s-menu-button:before { .mode-selector .s-menu-button:before {
content: $i; content: $i;
} }
.l-axis-holder {
@include cursorGrab();
}
} }
// Realtime mode // Realtime mode

View File

@ -1,15 +1,4 @@
<!-- Parent holder for time conductor. follow-mode | fixed-mode --> <!-- Parent holder for time conductor. follow-mode | fixed-mode -->
<style>
.fixed-mode .l-axis-holder {
cursor: grab;
cursor: -webkit-grab;
}
.fixed-mode .l-axis-holder:active {
cursor: grabbing;
cursor: -webkit-grabbing;
}
</style>
<div ng-controller="TimeConductorController as tcController" <div ng-controller="TimeConductorController as tcController"
class="holder grows flex-elem l-flex-row l-time-conductor {{modeModel.selectedKey}}-mode {{timeSystemModel.selected.metadata.key}}-time-system" class="holder grows flex-elem l-flex-row l-time-conductor {{modeModel.selectedKey}}-mode {{timeSystemModel.selected.metadata.key}}-time-system"
ng-class="{'status-panning': panning}"> ng-class="{'status-panning': panning}">

View File

@ -164,7 +164,7 @@ $ueTimeConductorH: (33px, 18px, 20px);
margin-left: 0; margin-left: 0;
} }
.l-time-range-tick-label { .l-time-range-tick-label {
@include webkitProp(transform, translateX(-50%)); @include transform(translateX(-50%));
color: $colorPlotLabelFg; color: $colorPlotLabelFg;
display: inline-block; display: inline-block;
font-size: 0.7rem; font-size: 0.7rem;