mirror of
https://github.com/netzmacht/contao-leaflet-libraries.git
synced 2025-11-28 11:04:07 +01:00
Add minified assets.
This commit is contained in:
1
assets/control-geocoder/Control.Geocoder.min.css
vendored
Normal file
1
assets/control-geocoder/Control.Geocoder.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.leaflet-control-geocoder{background:#fff;box-shadow:0 1px 7px rgba(0,0,0,.65);-webkit-border-radius:4px;border-radius:4px;line-height:26px;overflow:hidden}.leaflet-touch .leaflet-control-geocoder{box-shadow:none;border:2px solid rgba(0,0,0,.2);background-clip:padding-box;line-height:30px}.leaflet-control-geocoder-form{display:inline}.leaflet-control-geocoder-error,.leaflet-control-geocoder-form input,.leaflet-control-geocoder-form ul{border:0;color:transparent;background:#fff}.leaflet-control-geocoder-form input{font-size:16px;width:0;transition:width .125s ease-in}.leaflet-touch .leaflet-control-geocoder-form input{font-size:22px}.leaflet-control-geocoder-icon{width:26px;height:26px;background-image:url('images/geocoder.png');background-repeat:no-repeat;background-position:center;float:right;cursor:pointer}.leaflet-touch .leaflet-control-geocoder-icon{margin-top:2px;width:30px}.leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon{background-image:url('images/throbber.gif')}.leaflet-control-geocoder-error,.leaflet-control-geocoder-expanded input{width:226px;margin:0 0 0 4px;padding:0 0 0 4px;vertical-align:middle;color:#000}.leaflet-control-geocoder-form input:focus{outline:0}.leaflet-control-geocoder-form button,.leaflet-control-geocoder-form-no-error{display:none}.leaflet-control-geocoder-error{margin-top:8px;display:block;color:#444}ul.leaflet-control-geocoder-alternatives{width:260px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;list-style:none;padding:0;transition:height .125s ease-in}.leaflet-control-geocoder-alternatives-minimized{width:0!important;height:0;overflow:hidden;margin:0;padding:0}.leaflet-control-geocoder-alternatives li{width:100%;overflow:hidden;text-overflow:ellipsis;border-bottom:1px solid #eee;padding:0}.leaflet-control-geocoder-alternatives li:last-child{border-bottom:none}.leaflet-control-geocoder-alternatives a{display:block;text-decoration:none;color:#000;padding:6px 8px 16px 6px;font-size:14px;line-height:1;font-weight:700}.leaflet-touch .leaflet-control-geocoder-alternatives a{font-size:18px}.leaflet-control-geocoder-alternatives a:hover,.leaflet-control-geocoder-selected{background-color:#ddd}.leaflet-control-geocoder-address-detail{font-size:12px;font-weight:400}.leaflet-control-geocoder-address-context{color:#666;font-size:12px;font-weight:lighter}
|
||||
1
assets/control-geocoder/Control.Geocoder.min.js
vendored
Normal file
1
assets/control-geocoder/Control.Geocoder.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
assets/leaflet-loading/Control.Loading.min.css
vendored
Normal file
1
assets/leaflet-loading/Control.Loading.min.css
vendored
Normal file
@@ -0,0 +1 @@
|
||||
.leaflet-control-loading:empty{background-image:url('loading.gif')}.leaflet-control-loading,.leaflet-control-zoom a.leaflet-control-loading,.leaflet-control-zoomslider a.leaflet-control-loading{display:none}.leaflet-control-loading.is-loading,.leaflet-control-zoom a.leaflet-control-loading.is-loading,.leaflet-control-zoomslider a.leaflet-control-loading.is-loading{display:block}.leaflet-bar-part-bottom{border-bottom:medium none;border-bottom-left-radius:4px;border-bottom-right-radius:4px}
|
||||
1
assets/leaflet-loading/Control.Loading.min.js
vendored
Normal file
1
assets/leaflet-loading/Control.Loading.min.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
!function(){function o(o){o.Control.Loading=o.Control.extend({options:{position:"topleft",separate:!1,zoomControl:null,spinjs:!1,spin:{lines:7,length:3,width:3,radius:5,rotate:13,top:"83%"}},initialize:function(t){o.setOptions(this,t),this._dataLoaders={},null!==this.options.zoomControl&&(this.zoomControl=this.options.zoomControl)},onAdd:function(t){if(this.options.spinjs&&"function"!=typeof Spinner)return console.error("Leaflet.loading cannot load because you didn't load spin.js (http://fgnass.github.io/spin.js/), even though you set it in options.");this._addLayerListeners(t),this._addMapListeners(t),this.options.separate||this.zoomControl||(t.zoomControl?this.zoomControl=t.zoomControl:t.zoomsliderControl&&(this.zoomControl=t.zoomsliderControl));var n,i="leaflet-control-loading";return this.zoomControl&&!this.options.separate?(n=this.zoomControl._container,i+=" leaflet-bar-part-bottom leaflet-bar-part last"):n=o.DomUtil.create("div","leaflet-control-zoom leaflet-bar"),this._indicator=o.DomUtil.create("a",i,n),this.options.spinjs&&(this._spinner=new Spinner(this.options.spin).spin(),this._indicator.appendChild(this._spinner.el)),n},onRemove:function(o){this._removeLayerListeners(o),this._removeMapListeners(o)},removeFrom:function(t){return this.zoomControl&&!this.options.separate?(this._container.removeChild(this._indicator),this._map=null,this.onRemove(t),this):o.Control.prototype.removeFrom.call(this,t)},addLoader:function(o){this._dataLoaders[o]=!0,this.updateIndicator()},removeLoader:function(o){delete this._dataLoaders[o],this.updateIndicator()},updateIndicator:function(){this.isLoading()?this._showIndicator():this._hideIndicator()},isLoading:function(){return this._countLoaders()>0},_countLoaders:function(){var o,t=0;for(o in this._dataLoaders)this._dataLoaders.hasOwnProperty(o)&&t++;return t},_showIndicator:function(){o.DomUtil.addClass(this._indicator,"is-loading"),this.options.separate||(this.zoomControl instanceof o.Control.Zoom?o.DomUtil.removeClass(this.zoomControl._zoomOutButton,"leaflet-bar-part-bottom"):"function"==typeof o.Control.Zoomslider&&this.zoomControl instanceof o.Control.Zoomslider&&o.DomUtil.removeClass(this.zoomControl._ui.zoomOut,"leaflet-bar-part-bottom"))},_hideIndicator:function(){o.DomUtil.removeClass(this._indicator,"is-loading"),this.options.separate||(this.zoomControl instanceof o.Control.Zoom?o.DomUtil.addClass(this.zoomControl._zoomOutButton,"leaflet-bar-part-bottom"):"function"==typeof o.Control.Zoomslider&&this.zoomControl instanceof o.Control.Zoomslider&&o.DomUtil.addClass(this.zoomControl._ui.zoomOut,"leaflet-bar-part-bottom"))},_handleLoading:function(o){this.addLoader(this.getEventId(o))},_handleLoad:function(o){this.removeLoader(this.getEventId(o))},getEventId:function(o){return o.id?o.id:o.layer?o.layer._leaflet_id:o.target._leaflet_id},_layerAdd:function(o){if(o.layer&&o.layer.on)try{o.layer.on({loading:this._handleLoading,load:this._handleLoad},this)}catch(t){console.warn("L.Control.Loading: Tried and failed to add event handlers to layer",o.layer),console.warn("L.Control.Loading: Full details",t)}},_addLayerListeners:function(o){o.eachLayer(function(o){o.on&&o.on({loading:this._handleLoading,load:this._handleLoad},this)},this),o.on("layeradd",this._layerAdd,this)},_removeLayerListeners:function(o){o.eachLayer(function(o){o.off&&o.off({loading:this._handleLoading,load:this._handleLoad},this)},this),o.off("layeradd",this._layerAdd,this)},_addMapListeners:function(o){o.on({dataloading:this._handleLoading,dataload:this._handleLoad,layerremove:this._handleLoad},this)},_removeMapListeners:function(o){o.off({dataloading:this._handleLoading,dataload:this._handleLoad,layerremove:this._handleLoad},this)}}),o.Map.addInitHook(function(){this.options.loadingControl&&(this.loadingControl=new o.Control.Loading,this.addControl(this.loadingControl))}),o.Control.loading=function(t){return new o.Control.Loading(t)}}"function"==typeof define&&define.amd?define(["leaflet"],function(t){o(t)}):o(L)}();
|
||||
1
assets/leaflet-providers/leaflet-providers.min.js
vendored
Normal file
1
assets/leaflet-providers/leaflet-providers.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1
assets/leaflet/leaflet.min.css
vendored
Normal file
1
assets/leaflet/leaflet.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
93
gulpfile.js
Normal file
93
gulpfile.js
Normal file
@@ -0,0 +1,93 @@
|
||||
var gulp = require('gulp');
|
||||
var del = require('del');
|
||||
var rename = require('gulp-rename');
|
||||
var uglify = require('gulp-uglify');
|
||||
var merge = require('merge-stream');
|
||||
var minifyCss = require('gulp-minify-css');
|
||||
var replace = require('gulp-replace');
|
||||
|
||||
var paths = [
|
||||
{
|
||||
dest: 'assets/control-geocoder',
|
||||
js: 'Control.Geocoder.js',
|
||||
css: 'Control.Geocoder.css'
|
||||
},
|
||||
{
|
||||
dest: 'assets/leaflet-loading',
|
||||
js: 'Control.Loading.js',
|
||||
css: 'Control.Loading.css'
|
||||
},
|
||||
{
|
||||
dest: 'assets/leaflet-providers',
|
||||
js: 'leaflet-providers.js'
|
||||
},
|
||||
{
|
||||
dest: 'assets/leaflet',
|
||||
css: 'leaflet.css'
|
||||
}
|
||||
];
|
||||
|
||||
gulp.task('clear-styles', function(cb) {
|
||||
var i, clear = [];
|
||||
|
||||
for (i = 0; i < paths.length; i++) {
|
||||
if (paths[i].css) {
|
||||
clear.push(paths[i].dest + '/*.min.css');
|
||||
}
|
||||
}
|
||||
|
||||
del(clear, cb);
|
||||
});
|
||||
|
||||
gulp.task('clear-scripts', function(cb) {
|
||||
var i, clear = [];
|
||||
|
||||
for (i = 0; i < paths.length; i++) {
|
||||
if (paths[i].js) {
|
||||
clear.push(paths[i].dest + '/*.min.js');
|
||||
}
|
||||
}
|
||||
|
||||
del(clear, cb);
|
||||
});
|
||||
|
||||
gulp.task('scripts', ['clear-scripts'], function() {
|
||||
var i, stream, streams = [];
|
||||
|
||||
for (i = 0; i < paths.length; i++) {
|
||||
if (paths[i].js) {
|
||||
stream = gulp.src(paths[i].dest + '/' + paths[i].js)
|
||||
.pipe(rename(function (path) {
|
||||
path.basename += '.min';
|
||||
}))
|
||||
.pipe(uglify())
|
||||
.pipe(gulp.dest(paths[i].dest));
|
||||
|
||||
streams.push(stream);
|
||||
}
|
||||
}
|
||||
|
||||
return merge.call(null, streams);
|
||||
});
|
||||
|
||||
gulp.task('styles', ['clear-styles'], function() {
|
||||
var i, stream, streams = [];
|
||||
|
||||
for (i = 0; i < paths.length; i++) {
|
||||
if (paths[i].css) {
|
||||
stream = gulp.src(paths[i].dest + '/' + paths[i].css)
|
||||
.pipe(rename(function (path) {
|
||||
path.basename += '.min';
|
||||
}))
|
||||
.pipe(minifyCss())
|
||||
.pipe(replace(/url\(([^"][^\)]+)\)/g, 'url(\'$1\')'))
|
||||
.pipe(gulp.dest(paths[i].dest));
|
||||
|
||||
streams.push(stream);
|
||||
}
|
||||
}
|
||||
|
||||
return merge.call(null, streams);
|
||||
});
|
||||
|
||||
gulp.task('default', ['scripts', 'styles']);
|
||||
@@ -20,7 +20,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet'] = array
|
||||
'version' => '0.7.3',
|
||||
'license' => '<a href="https://github.com/Leaflet/Leaflet/blob/master/LICENSE" target="_blank">BSD-2-Clause</a>',
|
||||
'homepage' => 'http://leafletjs.com',
|
||||
'css' => 'assets/leaflet/libs/leaflet/leaflet.css',
|
||||
'css' => 'assets/leaflet/libs/leaflet/leaflet.min.css',
|
||||
'javascript' => 'assets/leaflet/libs/leaflet/leaflet.js',
|
||||
);
|
||||
|
||||
@@ -30,7 +30,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array
|
||||
'version' => '1.0.12',
|
||||
'license' => '<a href="https://github.com/leaflet-extras/leaflet-providers/blob/master/license.md" target="_blank">BSD-2-Clause</a>',
|
||||
'homepage' => 'http://leaflet-extras.github.io/leaflet-providers',
|
||||
'javascript' => 'assets/leaflet/libs/leaflet-providers/leaflet-providers.js'
|
||||
'javascript' => 'assets/leaflet/libs/leaflet-providers/leaflet-providers.min.js'
|
||||
);
|
||||
|
||||
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-omnivore'] = array
|
||||
@@ -48,8 +48,8 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-loading'] = array
|
||||
'version' => '0.1.13',
|
||||
'license' => '<a href="https://github.com/ebrelsford/Leaflet.loading/blob/master/LICENSE" target="_blank">MIT</a>',
|
||||
'homepage' => 'https://github.com/ebrelsford/Leaflet.loading',
|
||||
'css' => 'assets/leaflet/libs/leaflet-loading/Control.Loading.css',
|
||||
'javascript' => 'assets/leaflet/libs/leaflet-loading/Control.Loading.js'
|
||||
'css' => 'assets/leaflet/libs/leaflet-loading/Control.Loading.min.css',
|
||||
'javascript' => 'assets/leaflet/libs/leaflet-loading/Control.Loading.min.js'
|
||||
);
|
||||
|
||||
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-control-geocode'] = array
|
||||
@@ -58,8 +58,8 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-control-geocode'] = array
|
||||
'version' => '1.0.0',
|
||||
'license' => '<a href="https://github.com/perliedman/leaflet-control-geocoder/blob/master/LICENSE" target="_blank">BSD-2-Clause</a>',
|
||||
'homepage' => 'https://github.com/perliedman/leaflet-control-geocoder',
|
||||
'css' => 'assets/leaflet/libs/control-geocoder/Control.Geocoder.css',
|
||||
'javascript' => 'assets/leaflet/libs/control-geocoder/Control.Geocoder.js'
|
||||
'css' => 'assets/leaflet/libs/control-geocoder/Control.Geocoder.min.css',
|
||||
'javascript' => 'assets/leaflet/libs/control-geocoder/Control.Geocoder.min.js'
|
||||
);
|
||||
|
||||
$GLOBALS['LEAFLET_LIBRARIES']['spin.js'] = array
|
||||
|
||||
Reference in New Issue
Block a user