mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-10-22 11:05:45 +02:00
IMPROVEMENT: ui.carousel variables
This commit is contained in:
parent
afbb62a35c
commit
826bd0c75b
@ -4,7 +4,7 @@ import $ from 'jquery';
|
|||||||
import Events from '../../_events';
|
import Events from '../../_events';
|
||||||
import MarkerUI from './_map.google.marker';
|
import MarkerUI from './_map.google.marker';
|
||||||
|
|
||||||
const GoogleMapsDriver = (($) => {
|
const GoogleMapsDriver = ($ => {
|
||||||
class GoogleMapsDriver {
|
class GoogleMapsDriver {
|
||||||
getName() {
|
getName() {
|
||||||
return 'GoogleMapsDriver';
|
return 'GoogleMapsDriver';
|
||||||
@ -39,13 +39,13 @@ const GoogleMapsDriver = (($) => {
|
|||||||
const zoom = config['mapZoom'] ? config['mapZoom'] : 10;
|
const zoom = config['mapZoom'] ? config['mapZoom'] : 10;
|
||||||
const center = config['center']
|
const center = config['center']
|
||||||
? {
|
? {
|
||||||
lat: config['center'][1],
|
lat: config['center'][1],
|
||||||
lng: config['center'][0],
|
lng: config['center'][0],
|
||||||
}
|
}
|
||||||
: {
|
: {
|
||||||
lat: 0,
|
lat: 0,
|
||||||
lng: 0,
|
lng: 0,
|
||||||
};
|
};
|
||||||
const style = config['style'] ? config['style'] : null;
|
const style = config['style'] ? config['style'] : null;
|
||||||
|
|
||||||
console.log(`${ui.getName()}: API is loaded`);
|
console.log(`${ui.getName()}: API is loaded`);
|
||||||
@ -122,7 +122,7 @@ const GoogleMapsDriver = (($) => {
|
|||||||
|
|
||||||
$popup.find('.mapboxgl-popup-content .html').html(content);
|
$popup.find('.mapboxgl-popup-content .html').html(content);
|
||||||
|
|
||||||
$popup.find('.mapboxgl-popup-close-button').on('click', (e) => {
|
$popup.find('.mapboxgl-popup-close-button').on('click', e => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
ui.hidePopup();
|
ui.hidePopup();
|
||||||
});
|
});
|
||||||
@ -142,7 +142,9 @@ const GoogleMapsDriver = (($) => {
|
|||||||
const $popup = $(ui.popup.getDiv());
|
const $popup = $(ui.popup.getDiv());
|
||||||
|
|
||||||
$popup.addClass('d-none');
|
$popup.addClass('d-none');
|
||||||
ui.restoreBounds();
|
if (!ui.config['noRestoreBounds']) {
|
||||||
|
ui.restoreBounds();
|
||||||
|
}
|
||||||
|
|
||||||
ui.$el.trigger(Events.MAPPOPUPCLOSE);
|
ui.$el.trigger(Events.MAPPOPUPCLOSE);
|
||||||
}
|
}
|
||||||
@ -205,7 +207,7 @@ const GoogleMapsDriver = (($) => {
|
|||||||
const bounds = new google.maps.LatLngBounds();
|
const bounds = new google.maps.LatLngBounds();
|
||||||
|
|
||||||
// add markers to map
|
// add markers to map
|
||||||
config['geojson'].features.forEach((marker) => {
|
config['geojson'].features.forEach(marker => {
|
||||||
const id = marker.id;
|
const id = marker.id;
|
||||||
const crds = marker.geometry.coordinates;
|
const crds = marker.geometry.coordinates;
|
||||||
const content = marker.properties.content;
|
const content = marker.properties.content;
|
||||||
|
@ -10,7 +10,16 @@
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
$carousel-title-color: $white !default;
|
||||||
|
$carousel-slide-min-height: 4rem !default;
|
||||||
|
$carousel-text-shadow: 1px 1px $black !default;
|
||||||
|
$carousel-controls-font-size: 3rem;
|
||||||
|
$carousel-controls-zindex: 11 !default;
|
||||||
|
$carousel-controls-shadow: 1px 1px $black !default;
|
||||||
|
$carousel-controls-hover-bg: transparentize($black, 0.4) !default;
|
||||||
|
|
||||||
.carousel-slide {
|
.carousel-slide {
|
||||||
|
min-height: $carousel-slide-min-height;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
@ -32,27 +41,25 @@
|
|||||||
|
|
||||||
.carousel-control-prev,
|
.carousel-control-prev,
|
||||||
.carousel-control-next {
|
.carousel-control-next {
|
||||||
z-index: 2;
|
z-index: $carousel-controls-zindex;
|
||||||
font-size: 3rem;
|
font-size: $carousel-controls-font-size;
|
||||||
text-shadow: 1px 1px #000;
|
text-shadow: $carousel-controls-shadow;
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus {
|
&:focus {
|
||||||
background: rgba(0, 0, 0, 0.6);
|
background: $carousel-controls-hover-bg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel-indicators li {
|
.carousel-indicators li {
|
||||||
box-shadow: none;
|
box-shadow: none;
|
||||||
|
|
||||||
// 1px 1px #000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel-title {
|
.carousel-title {
|
||||||
color: #fff;
|
color: $carousel-title-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
.carousel-title,
|
.carousel-title,
|
||||||
.carousel-content {
|
.carousel-content {
|
||||||
text-shadow: 1px 1px #000;
|
text-shadow: $carousel-text-shadow;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user