Skip to content

Commit

Permalink
fix(marker): remove line-height as it can incorrectly change the heig…
Browse files Browse the repository at this point in the history
…ht (thus the position) of a marker
  • Loading branch information
Wykks committed May 1, 2018
1 parent 8562e43 commit 550f665
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/app/lib/marker/marker.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { LngLatLike, Marker, PointLike } from 'mapbox-gl';
import { MapService } from '../map/map.service';
import {
Component,
ElementRef,
Expand All @@ -11,11 +9,20 @@ import {
AfterViewInit,
OnInit,
ChangeDetectionStrategy,
ViewEncapsulation
} from '@angular/core';
import { LngLatLike, Marker, PointLike } from 'mapbox-gl';
import { MapService } from '../map/map.service';

@Component({
selector: 'mgl-marker',
template: '<div #content><ng-content></ng-content></div>',
styles: [`
.mapboxgl-marker {
line-height: 0;
}
`],
encapsulation: ViewEncapsulation.None,
changeDetection: ChangeDetectionStrategy.OnPush
})
export class MarkerComponent implements OnChanges, OnDestroy, AfterViewInit, OnInit {
Expand Down

0 comments on commit 550f665

Please sign in to comment.