Skip to content

Commit

Permalink
Resolves #1030 - Bring back route direction. changed default opacity,…
Browse files Browse the repository at this point in the history
… changed route direction icon size, changed route width range.
  • Loading branch information
HarelM committed Aug 12, 2019
1 parent 4a0bfea commit 57bc358
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div fxFlex="50" fxFlex.xs="100" *ngIf="isAdvanced | async">
<div fxLayout="column" fxFill>
<label class="text-center">{{resources.width}}</label>
<mat-slider [(ngModel)]="routeData.weight" min="2" max="10" step="1" color="primary"></mat-slider>
<mat-slider [(ngModel)]="routeData.weight" min="4" max="20" step="2" color="primary"></mat-slider>
<label class="text-center" [style.opacity]="routeData.opacity">{{resources.opacity}}</label>
<mat-slider [(ngModel)]="routeData.opacity" min="0.1" max="1.0" step="0.1" color="primary"></mat-slider>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
'symbol-placement': 'line',
'symbol-spacing': 40,
'icon-image': 'arrow',
'icon-size': 0.4,
'icon-size': ['get', 'iconsize'],
'icon-allow-overlap': true
}"
[paint]="{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,11 @@ export class RoutesComponent extends BaseMapComponent implements AfterViewInit {
width = 6;
}
let iconcolor = opacity > 0.5 ? invert(color, true) : color;
let iconsize = width < 10 ? 0.5 : 0.5 * width / 10.0;
return {
color,
iconcolor,
iconsize,
weight: width,
opacity,
name: route.name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { RouteData } from "../../../models/models";
@Injectable()
export class RoutesFactory {

private static readonly DEFAULT_OPACITY = 0.9;
private static readonly DEFAULT_OPACITY = 0.4;
private static readonly DEFAULT_WEIGHT = 9;

// default values - in case the response from server takes too long.
Expand Down

0 comments on commit 57bc358

Please sign in to comment.