fix(maps): fix maps height

This commit is contained in:
Alexander Zhukov 2017-07-25 18:09:11 +03:00
parent 2f3684b3fc
commit 782bd3b9aa
4 changed files with 8 additions and 15 deletions

View file

@ -1,21 +1,13 @@
@import '../../../@theme/styles/variables';
@include nga-install-component() {
nga-card-header {
border: none;
}
nga-card-body {
padding: 0;
}
agm-map {
/deep/ agm-map {
width: 100%;
height: 100%;
/deep/ .agm-map-container-inner {
border-bottom-left-radius: nga-theme(card-border-radius);
border-bottom-right-radius: nga-theme(card-border-radius);
}
}
}

View file

@ -4,7 +4,7 @@ import { Component } from '@angular/core';
selector: 'ngx-gmaps',
styleUrls: ['./gmaps.component.scss'],
template: `
<nga-card size="large">
<nga-card size="xlarge">
<nga-card-header>Gmaps</nga-card-header>
<nga-card-body>
<agm-map [latitude]="lat" [longitude]="lng">
@ -15,6 +15,7 @@ import { Component } from '@angular/core';
`,
})
export class GmapsComponent {
lat: number = 51.678418;
lng: number = 7.809007;
}

View file

@ -1,9 +1,8 @@
@import '../../../@theme/styles/variables';
@include nga-install-component() {
nga-card-header {
border: none;
}
$card-header-border: 1px;
nga-card-body {
padding: 0;
@ -11,6 +10,7 @@
/deep/ .leaflet-container {
width: 100%;
height: 500px;
height: calc(#{nga-theme(card-height-xlarge)} - (#{nga-theme(card-padding) * 2}) -
(#{nga-theme(card-header-font-size)} * #{nga-theme(card-line-height)}) - #{$card-header-border});
}
}

View file

@ -7,7 +7,7 @@ import 'style-loader!leaflet/dist/leaflet.css';
selector: 'ngx-leaflet',
styleUrls: ['./leaflet.component.scss'],
template: `
<nga-card>
<nga-card size="xlarge">
<nga-card-header>Leaflet</nga-card-header>
<nga-card-body>
<div leaflet [leafletOptions]="options"></div>