Comparing version 0.1.18 to 0.1.24
@@ -1,1 +0,1 @@ | ||
"use strict";function e(e,n,t){var r;return E(e)?r=e:e=C(e),t?r?'<a href="'+r+'">点击查看</a><br>':"<div>"+e+"</div><br>":r?'<div style="'+L+'"> <div style="'+L+'">'+n+': </div> <a target="_Blank" style="'+P+'" href="'+r+'">『点击查看』</a> </div><br>':'<div style="'+L+'"> <div style="'+L+'">'+n+': </div> <a style="'+P+'">'+e+"</a> </div><br>"}function n(e,n,t){n=n||"#0cc",t=t||"#bbb";var r,i,o="",a="display:inline-block;white-space:nowrap;",u=a+"color:"+t+";margin-right:5px;",f=a+"color:"+n+";font-weight:normal";if(Array.isArray(e))e.forEach(function(e){"string"==typeof e&&(i='<a style="'+f+'">'+e+"</a><br>",o+=i)});else if("object"===("undefined"==typeof e?"undefined":g(e)))for(var l in e){var r=e[l];"string"==typeof r&&(i='<a style="'+u+'">'+l+': </a><a style="'+f+'">'+r+"</a><br>",o+=i)}return o}function t(n,t){var r="array"==typeof n,i=void 0,o="";for(var a in n)i=n[a],"object"!==("undefined"==typeof i?"undefined":g(i))&&("number"==typeof i&&(i=q(i,2)),o+=e(i,a,r,t));return o}function r(e,n){return function(r){var i={};for(var o in e){var a=e[o];a in r&&(i[a]=r[a])}return t(i,n)}}function i(e){return function(n,r){var i=void 0,o=void 0,a=void 0;n&&r&&n.properties?(i=n,a=i.properties,o=r):o=n;var u={},f=void 0;return M.forEach(e,function(e,n){a&&(f=a[e]),o&&(f=o[e]||f),u[n]=f}),t(j(u))}}function o(e){return"object"===g(e[0])?!1:!0}function a(e){return void 0===e}function u(e,n){n=n||{};return e.forEach(function(e){if(o(e)){var t=e[0],r=e[1];n.latMax=Math.max(n.latMax||r,r),n.lngMax=Math.max(n.lngMax||t,t),n.latMin=Math.min(n.latMin||r,r),n.lngMin=Math.min(n.lngMin||t,t)}else u(e,n)}),n}function f(e){var n={};return e.forEach(function(e){var t=e.geometry.coordinates,r=u(t);n.latMax=Math.max(n.latMax||r.latMax,r.latMax),n.lngMax=Math.max(n.lngMax||r.lngMax,r.lngMax),n.latMin=Math.min(n.latMin||r.latMin,r.latMin),n.lngMin=Math.min(n.lngMin||r.lngMin,r.lngMin)}),n}function l(e){if(e.features)return f(e.features);if(e.type&&"feature"===e.type.toLowerCase()){var n=e.geometry;if(!n)return;var t=n.coordinates;if(!t)return;return u(t)}}function p(e,n){n=n||[];return e.forEach(function(e){if(o(e)){var t=(e[0],e[1]);(void 0===n[0]||null===n[0])&&(n=e),t>n[1]&&(n[0]=e[0],n[1]=e[1])}else n=p(e,n)}),n}function c(e){var n=p(e.map(function(e){return p(e.geometry.coordinates)}));return n}function s(e){if(e.features)return c(e.features);if(e.type&&"feature"===e.type.toLowerCase()){var n=e.geometry;if(!n)return;var t=n.coordinates;if(!t)return;return p(t)}return p(e)}function d(e,n,t,r){var i="undefined"==typeof e?"undefined":g(e);if("function"===i){var o=e(t,r);return"string"==typeof o||"number"==typeof o?n.innerHTML=o:o}if("string"===i||"number"===i)return n.innerHTML=e;if("object"===i){var a=new m(n,e);return a.render(t),a}}function y(e){if(e){var n=e.parent,t=e.child,r=e.map,i=e.datas,o=e.popup;if(!r)return console.log("map 缺少...");if(!i)return console.log("datas 缺少...");if(o){var a=o.eventType||"click",u=i[0],f=i[1];t.off(a).on(a,function(e){var i=t.popupPosition||e.latlng;r.openPopup(l,i);var l=r._popup;if(o){var p=l._container.getElementsByClassName("leaflet-popup-content")[0],c=t.popupGroup=d(o,p,u,f);if(setTimeout(function(){l._updateLayout(),l._updatePosition()}),"object"!==("undefined"==typeof c?"undefined":g(c)))return;c.on(a,function(e){(t.emit||t.fire).bind(t)("popup-"+a,e),(n.emit||n.fire).bind(n)("child-popup-"+a,e)})}})}}}function v(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{position:"absolute",left:"0%",top:"0%"},e=b.getContainer(e),t=document.createElement("div");return Object.assign(t.style,{width:"100%",height:"100%"}),Object.assign(e.style,n),e.appendChild(t),t}var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m=require("./../plugins/popup"),b=require("bcore/utils"),M=require("lodash"),h=require("./../leaflet"),x=require("./eventTypes"),w=require("./basic"),j=w.cleanObjectNull,E=w.isURL,C=w.pretty,q=w.numberFormater,L="margin-right:5px; color:#999;white-space:nowrap; display:inline-block;",P="white-space:nowrap;color:#fff;display:inline-block;font-weight:bold;text-decoration:none;";module.exports={getTopPoint:s,getBBox:l,parseContent:n,initEventsPopup:y,createContainer:v,genPopupObject:i,popupFromObject:t}; | ||
"use strict";function e(e,n,t){var r;return E(e)?r=e:e=C(e),t?r?'<a href="'+r+'">点击查看</a><br>':"<div>"+e+"</div><br>":r?'<div style="'+q+'"> <div style="'+q+'">'+n+': </div> <a target="_Blank" style="'+L+'" href="'+r+'">『点击查看』</a> </div><br>':'<div style="'+q+'"> <div style="'+q+'">'+n+': </div> <a style="'+L+'">'+e+"</a> </div><br>"}function n(e,n,t){n=n||"#0cc",t=t||"#bbb";var r,i,o="",a="display:inline-block;white-space:nowrap;",u=a+"color:"+t+";margin-right:5px;",f=a+"color:"+n+";font-weight:normal";if(Array.isArray(e))e.forEach(function(e){"string"==typeof e&&(i='<a style="'+f+'">'+e+"</a><br>",o+=i)});else if("object"===("undefined"==typeof e?"undefined":g(e)))for(var l in e){var r=e[l];"string"==typeof r&&(i='<a style="'+u+'">'+l+': </a><a style="'+f+'">'+r+"</a><br>",o+=i)}return o}function t(n,t){var r="array"==typeof n,i=void 0,o="";for(var a in n)i=n[a],"object"!==("undefined"==typeof i?"undefined":g(i))&&("number"==typeof i&&(i=w.numberFormater(i,2)),o+=e(i,a,r,t));return o}function r(e,n){return function(r){var i={};for(var o in e){var a=e[o];a in r&&(i[a]=r[a])}return t(i,n)}}function i(e){return function(n,r){var i=void 0,o=void 0,a=void 0;n&&r&&n.properties?(i=n,a=i.properties,o=r):o=n;var u={},f=void 0;return M.forEach(e,function(e,n){a&&(f=a[e]),o&&(f=o[e]||f),u[n]=f}),t(j(u))}}function o(e){return"object"===g(e[0])?!1:!0}function a(e){return void 0===e}function u(e,n){n=n||{};return e.forEach(function(e){if(o(e)){var t=e[0],r=e[1];n.latMax=Math.max(n.latMax||r,r),n.lngMax=Math.max(n.lngMax||t,t),n.latMin=Math.min(n.latMin||r,r),n.lngMin=Math.min(n.lngMin||t,t)}else u(e,n)}),n}function f(e){var n={};return e.forEach(function(e){var t=e.geometry.coordinates,r=u(t);n.latMax=Math.max(n.latMax||r.latMax,r.latMax),n.lngMax=Math.max(n.lngMax||r.lngMax,r.lngMax),n.latMin=Math.min(n.latMin||r.latMin,r.latMin),n.lngMin=Math.min(n.lngMin||r.lngMin,r.lngMin)}),n}function l(e){if(e.features)return f(e.features);if(e.type&&"feature"===e.type.toLowerCase()){var n=e.geometry;if(!n)return;var t=n.coordinates;if(!t)return;return u(t)}}function p(e,n){n=n||[];return e.forEach(function(e){if(o(e)){var t=(e[0],e[1]);(void 0===n[0]||null===n[0])&&(n=e),t>n[1]&&(n[0]=e[0],n[1]=e[1])}else n=p(e,n)}),n}function c(e){var n=p(e.map(function(e){return p(e.geometry.coordinates)}));return n}function s(e){if(e.features)return c(e.features);if(e.type&&"feature"===e.type.toLowerCase()){var n=e.geometry;if(!n)return;var t=n.coordinates;if(!t)return;return p(t)}return p(e)}function d(e,n,t,r){var i="undefined"==typeof e?"undefined":g(e);if("function"===i){var o=e(t,r);return"string"==typeof o||"number"==typeof o?n.innerHTML=o:o}if("string"===i||"number"===i)return n.innerHTML=e;if("object"===i){var a=new m(n,e);return a.render(t),a}}function y(e){if(e){var n=e.parent,t=e.child,r=e.map,i=e.datas,o=e.popup;if(!r)return console.log("map 缺少...");if(!i)return console.log("datas 缺少...");if(o){var a=o.eventType||"click",u=i[0],f=i[1];t.off(a).on(a,function(e){var i=t.popupPosition||e.latlng;r.openPopup(l,i);var l=r._popup;if(o){var p=l._container.getElementsByClassName("leaflet-popup-content")[0],c=t.popupGroup=d(o,p,u,f);if(setTimeout(function(){l._updateLayout(),l._updatePosition()}),"object"!==("undefined"==typeof c?"undefined":g(c)))return;c.on(a,function(e){(t.emit||t.fire).bind(t)("popup-"+a,e),(n.emit||n.fire).bind(n)("child-popup-"+a,e)})}})}}}function v(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{position:"absolute",left:"0%",top:"0%"},e=b.getContainer(e),t=document.createElement("div");return Object.assign(t.style,{width:"100%",height:"100%"}),Object.assign(e.style,n),e.appendChild(t),t}var g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m=require("./../plugins/popup"),b=require("bcore/utils"),M=require("lodash"),h=require("./../leaflet"),x=require("./eventTypes"),w=require("./basic"),j=w.cleanObjectNull,E=w.isURL,C=w.pretty,q="margin-right:5px; color:#999;white-space:nowrap; display:inline-block;",L="white-space:nowrap;color:#fff;display:inline-block;font-weight:bold;text-decoration:none;";module.exports={getTopPoint:s,getBBox:l,parseContent:n,initEventsPopup:y,createContainer:v,genPopupObject:i,popupFromObject:t}; |
@@ -1,1 +0,1 @@ | ||
"use strict";var e=require("jquery"),r=require("./leaflet.js"),a=require("./core/utils");require("leaflet/dist/leaflet.css"),require("./index.css"),r.Utils=Object.assign({},r.Util,a);var i=r.dmap=r.dmap||{};r.dmap.Utils=a,require("./layer/areas"),require("./render/canvas"),require("./layer/tilelayer"),require("./layer/scatter_canvas"),require("./layer/scatter_markers"),require("./layer/scatter_marker"),require("./layer/flyingLineGradient"),require("./layer/flyingLineDash"),require("./layer/heatmap_grid_new"),require("./layer/trails_canvas"),require("./layer/scatter_konva"),require("./plugins/geo_coding_popup"),require("./plugins/filter/tilelayer"),require("./plugins/url_hash"),require("./map/map"),require("./layer/geojson_canvas"),module.exports=r; | ||
"use strict";var e=require("jquery"),r=require("./leaflet.js"),a=require("./core/utils");require("leaflet/dist/leaflet.css"),require("./index.css"),r.Utils=Object.assign({},r.Util,a);var i=r.dmap=r.dmap||{};r.dmap.Utils=a,require("./layer/areas"),require("./render/canvas"),require("./layer/tilelayer"),require("./layer/scatter_canvas"),require("./layer/scatter_markers"),require("./layer/scatter_marker"),require("./layer/flyingLineGradient"),require("./layer/flyingLineDash"),require("./layer/markercluster"),require("./layer/heatmap_grid_new"),require("./layer/trails_canvas"),require("./layer/scatter_konva"),require("./plugins/geo_coding_popup"),require("./plugins/filter/tilelayer"),require("./plugins/url_hash"),require("./map/map");var l=require("./layer/geojson_canvas");module.exports=r; |
@@ -1,1 +0,1 @@ | ||
"use strict";var t=require("lodash"),e=require("./../leaflet"),i=require("./../core/utils"),n=i.isNone,o=require("./../core/utils").getColorFunc,s=o({from:"#002170",to:"#c5f2e7",easing:"Quadratic.Out.1.1",space:"rgb"}),a=i.switchValue,r=e.Layer.extend({addTo:function(t){return this._map=t,this.isable=!0,this.geojson&&this.initGeojson(),this},geoJson:function(e){if(e){this.geojson=t.cloneDeep(e);var i=this._map;i&&(this.removeGeojson(),this.initGeojson())}},removeGeojson:function(t){t=t||this.geojsonLayer,t&&this._map.removeLayer(t)},initGeojson:function(){var t=this,i=this.options,n=this.genStyle(i.style),o=this.geojson,s=i.geoid.bind(i),a=this.layers=[],r=0,u=this.geojsonLayer=e.geoJson(o,{style:n,draggable:!1,onEachFeature:function(e,i){var n=s(e)||r++;a[n]=i,i.__feature=e,t.initEventChild(i,e)}});u.addTo(this._map),u.bringToBack(),this.initEventsPopup()},initEventChild:function(e,n){var o=this,s={feature:n,layer:e},a=(this.options.popup,this._map),r=t.filter(i.EVENTSBasic,function(t){return"mouse1down"!==t});r.forEach(function(t){e.on(t,function(){return e.__data&&(s.data=e.__data),o.fire("child-"+t,s),!0})});var u=this.options,h=u.style.hover;h&&e.on("mouseover",function(){a.closePopup(),e.setStyle&&e.setStyle(h)}).on("mouseout",function(){e.setStyle&&e.setStyle(e.__style)})},initEventsPopup:function(){var t=this._map,e=this.options.popup;this.each(function(n){n&&(this.updatePopupPostion(n),i.initEventsPopup({parent:this,child:n,map:t,datas:[n.__feature,n.__data],popup:e}))}.bind(this))},updatePopupPostion:function(t){var n=(this._map,i.getTopPoint(t.__feature));t.popupPosition=e.latLng(n[1],n[0])},initialize:function(t){this.options=i.deepMerge(r.options,t)},getLayer:function(t){return t&&this.layers?this.layers[t]:void 0},genStyle:function(t,e,i,n,o){var s={};for(var r in t)s[r]=a(t[r],e,i,n,o);return s},each:function(t){if(t){var e=this.layers;for(var i in e)t(e[i],i)}},data:function(t){this._data=t,this.updateRange()},updateRange:function(){this.range=i.getRangePercentTile(this._data,this.options.value)},render:function(t){t&&this.data(t),this.draw()},updateOptions:function(t){this.options=i.deepMerge(this.options,t),this.updateRange(),this.draw()},draw:function(){var t=this;if(this.isable){var e,i,n,o=this._data,s={},a=this.options,r=a.filter,u=a.style,h=a.id.bind(a),p=a.value.bind(a);for(var d in o)e=o[d],i=h(e),s[i]=e;var l,c=(this.layers,this.range||{});this.each(function(i,o){e=s[o]||{},(!r||r(e))&&(n=p(e),l=t.genStyle(u,n,c.min,c.max),i.setStyle&&i.setStyle(l),i.__style=l,i.__data=e)}),this.initEventsPopup()}},hide:function(){var t=this;this.geojsonLayer&&this.geojsonLayer.setStyle({opacity:0,fillOpacity:0}),setTimeout(function(){t.isable=!1})},show:function(){var t=this;this.geojsonLayer&&this.geojsonLayer.setStyle({opacity:1,fillOpacity:1}),setTimeout(function(){t.isable=!0,t.draw()})},getBounds:function(){return this._map?this.geojsonLayer.getBounds():void 0},destroy:function(){this.geojsonLayer&&this._map.removeLayer(this.geojsonLayer),this._data=null}});r.options={geoid:function(t){var e=t.id||t.adcode;if(e)return e;var i=t.properties;return i?i.id||i.adcode:void 0},id:function(t,e){return t?t.id||t.adcode:e},value:function(t){return t.value},style:{fillColor:function(t,e,i){if(!t)return"rgba(0,150,200,1)";var n=(t-e)/(i-e);return s(n)},color:"transparent",weight:2,dashArray:null},filter:function(){return!0}};var u=e.dmap=e.dmap||{};u.Area=r,u.area=function(t){return new r(t)},module.exports=r; | ||
"use strict";var t=require("lodash"),e=require("./../leaflet"),i=require("./../core/utils"),n=i.isNone,o=require("./../core/utils").getColorFunc,s=o({from:"#002170",to:"#c5f2e7",easing:"Quadratic.Out.1.1",space:"rgb"}),a=i.switchValue,r=e.Layer.extend({addTo:function(t){return this._map=t,this.isable=!0,this.geojson&&this.initGeojson(),this},geoJson:function(e){if(e&&!t.isEqual(e,this.geojson)){this.geojson=t.cloneDeep(e);var i=this._map;i&&(this.removeGeojson(),this.initGeojson())}},removeGeojson:function(t){t=t||this.geojsonLayer,t&&this._map.removeLayer(t)},initGeojson:function(){var t=this,i=this.options,n=this.genStyle(i.style),o=this.geojson,s=i.geoid.bind(i),a=this.layers=[],r=0,u=this.geojsonLayer=e.geoJson(o,{style:n,draggable:!1,onEachFeature:function(e,i){var n=s(e)||r++;a[n]=i,i.__feature=e,t.initEventChild(i,e)}});u.addTo(this._map),u.bringToBack(),this.initEventsPopup()},initEventChild:function(e,n){var o=this,s={feature:n,layer:e},a=this._map,r=t.filter(i.EVENTSBasic,function(t){return"mousedown1"!==t});r.forEach(function(t){e.on(t,function(){return e.__data&&(s.data=e.__data),o.fire("child-"+t,s),!0})});var u=this.options,h=u.style.hover;h&&e.on("mouseover",function(){a.closePopup(),e.setStyle&&e.setStyle(h)}).on("mouseout",function(){e.setStyle&&e.setStyle(e.__style)})},initEventsPopup:function(){var t=this,e=this._map,n=this.options.popup;this.each(function(o){o&&(t.updatePopupPostion(o),i.initEventsPopup({parent:t,child:o,map:e,datas:[o.__feature,o.__data],popup:n}))})},updatePopupPostion:function(t){var n=(this._map,i.getTopPoint(t.__feature));t.popupPosition=e.latLng(n[1],n[0])},initialize:function(e){var n=this;this.options=i.deepMerge(r.options,e),this.draw=t.debounce(function(){return n._draw()},10)},getLayer:function(t){return t&&this.layers?this.layers[t]:void 0},genStyle:function(t,e,i,n,o){var s={};for(var r in t)s[r]=a(t[r],e,i,n,o);return s},each:function(t){if(t){var e=this.layers;for(var i in e)t(e[i],i)}},data:function(t){this._data=t,this.updateRange()},updateRange:function(){this.range=i.getRangePercentTile(this._data,this.options.value)},render:function(t){t&&this.data(t),this.draw()},updateOptions:function(t){this.options=i.deepMerge(this.options,t),this.updateRange(),this.draw()},_draw:function(){var e=this;if(this.isable&&this._map){var i=void 0,n=void 0,o=this._data,s=this.options,a=s.filter,r=s.style,u=s.id.bind(s),h=s.value.bind(s),l=t.keyBy(o,u),d=void 0,c=this.range||{};this.each(function(t,o){i=l[o]||{},(!a||a(i))&&(n=h(i),d=e.genStyle(r,n,c.min,c.max),s.selectId&&o===s.selectId&&Object.assign(d,s.selectStyle),t.setStyle&&t.setStyle(d),t.__style=d,t.__data=i)}),this.initEventsPopup()}},hide:function(){var t=this;this.geojsonLayer&&this.geojsonLayer.setStyle({opacity:0,fillOpacity:0}),setTimeout(function(){t.isable=!1})},show:function(){var t=this;this.geojsonLayer&&this.geojsonLayer.setStyle({opacity:1,fillOpacity:1}),setTimeout(function(){t.isable=!0,t.draw()})},getBounds:function(){return this._map?this.geojsonLayer.getBounds():void 0},destroy:function(){this.geojsonLayer&&this._map.removeLayer(this.geojsonLayer),this._data=null}});r.options={geoid:function(t){var e=t.id||t.adcode;if(e)return e;var i=t.properties;return i?i.id||i.adcode:void 0},id:function(t,e){return t?t.id||t.adcode:e},value:function(t){return t.value},selectId:null,selectStyle:{color:"rgba(255,255,255,0.5)",zIndex:1e3},style:{zIndex:1,bubblingMouseEvents:!1,fillColor:function(t,e,i){if(!t)return"rgba(0,150,200,1)";var n=(t-e)/(i-e);return s(n)},fillOpacity:1,color:"transparent",weight:2,dashArray:null},filter:function(){return!0}};var u=e.dmap=e.dmap||{};u.Area=r,u.area=function(t){return new r(t)},module.exports=r; |
@@ -1,1 +0,1 @@ | ||
"use strict";var t=require("./../leaflet"),i=require("./../core/utils"),e=t.dmap=t.dmap||{},n=t.Path.extend({options:{weight:10,opacity:1,color:"blue",kHeight:.5},initialize:function(e){e=this.options=i.deepMerge(this.options,e),t.Util.setOptions(this,e),this.isInit=!1},initSvg:function(){if(!this.isInit){var t=this.options,e=i.getId("flyingPath2d"),n=(t.color,this.linearGradientId=e+"grad"),a=document.getElementsByTagName("svg")[0];if(!a)return console.log("svg节点尚未建立");var s=document.getElementsByTagName("defs")[0];s||(s=document.createElementNS("http://www.w3.org/2000/svg","defs"),a.appendChild(s));var r=this._path;if(!r)return console.log("path不存在");var h=this.linearGradient=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");"left"===this.direction&&(h.setAttribute("x1","100%"),h.setAttribute("y1","0%"),h.setAttribute("x2","0%"),h.setAttribute("y2","0%")),h.setAttribute("id",n),s.appendChild(h),this._init&&this._init(r,h),this.isInit=!0}},_project:function(){},_update:function(){},updateOptions:function(t){t=this.options=i.deepMerge(this.options,t),this._path.setAttribute("stroke-width",t.weight),this.updatePath(),this.redraw()},data:function(i){if(i&&i.from&&i.to){this._data=i;var e=this.from=t.latLng(i.from.lat,i.from.lng),n=this.to=t.latLng(i.to.lat,i.to.lng);this._latlngs=[e,n];var a=this.linearGradient;n.lng>e.lng?(this.direction="right",a.setAttribute("x1","0%"),a.setAttribute("x2","100%")):(this.direction="left",a.setAttribute("x1","100%"),a.setAttribute("x2","0%")),this.wake(),this.updatePath(),this.redraw(),this.addEventsMap()}},addTo:function(t){return t?(this._map=t,t.addLayer(this),this.initSvg(),this.updatePath(),this.redraw(),this):void 0},addEventsMap:function(){this._map.on("viewreset",this.updatePath.bind(this)),this.updatePath()},updatePath:function(){var t=this.from,e=this.to,n=this.options;if(t&&e){var a=this._map,s=n.kHeight,r=this.fromPt=a.latLngToLayerPoint([t.lat,t.lng]),h=this.toPt=a.latLngToLayerPoint([e.lat,e.lng]),o=(h.x+r.x)/2,d=(h.y+r.y)/2,u=h.x-r.x,l=u*s;d+=-Math.abs(l);var g=i.switchValue(n.weight,this._data);this._path.setAttribute("stroke-width",g),this._customData="M"+r.x+" "+r.y+" Q "+o+" "+d+" "+h.x+" "+h.y,this.getPathString()}},getPathString:function(){var t=this._customData;return t instanceof Array?t.join(" "):t},hide:function(){this._path.setAttribute("display","none")},wake:function(){this._path.setAttribute("display","block")},destroy:function(){var t=document.getElementsByTagName("defs")[0],i=document.getElementById(this.linearGradientId);i&&t&&t.removeChild(i);var e=this._path,n=e.parentNode,a=document.getElementsByTagName("svg")[0];if(n&&a)try{a.removeChild(n)}catch(s){}}});e.FlyingLinePath=n,e.flyingLinePath=function(t){return new e.FlyingLinePath(t)},module.exports=n; | ||
"use strict";var t=require("./../leaflet"),i=require("./../core/utils"),e=t.dmap=t.dmap||{},a=t.Path.extend({options:{weight:10,opacity:1,color:"blue",kHeight:.5},initialize:function(e){e=this.options=i.deepMerge(this.options,e),t.Util.setOptions(this,e),this.isInit=!1},initSvg:function(){if(!this.isInit){var t=this.options,e=i.getId("flyingPath2d"),a=(t.color,this.linearGradientId=e+"grad"),n=document.getElementsByTagName("svg")[0];if(!n)return console.log("svg节点尚未建立");var s=document.getElementsByTagName("defs")[0];s||(s=document.createElementNS("http://www.w3.org/2000/svg","defs"),n.appendChild(s));var h=this._path;if(!h)return console.log("path不存在");var r=this.linearGradient=document.createElementNS("http://www.w3.org/2000/svg","linearGradient");"left"===this.direction&&(r.setAttribute("x1","100%"),r.setAttribute("y1","0%"),r.setAttribute("x2","0%"),r.setAttribute("y2","0%")),r.setAttribute("id",a),s.appendChild(r),this._init&&this._init(h,r),this.isInit=!0}},_project:function(){},_update:function(){},updateOptions:function(t){t=this.options=i.deepMerge(this.options,t),this._path.setAttribute("stroke-width",t.weight),this.updatePath(),this.redraw()},data:function(i){if(i&&i.from&&i.to){this._data=i;var e=this.from=t.latLng(i.from.lat,i.from.lng),a=this.to=t.latLng(i.to.lat,i.to.lng);this._latlngs=[e,a];var n=this.linearGradient;a.lng>e.lng?(this.direction="right",n.setAttribute("x1","0%"),n.setAttribute("x2","100%")):(this.direction="left",n.setAttribute("x1","100%"),n.setAttribute("x2","0%")),this.wake(),this.updatePath(),this.redraw(),this.addEventsMap()}},addTo:function(t){return t?(this._map=t,t.addLayer(this),this.initSvg(),this.updatePath=this.updatePath.bind(this),this.updatePath(),this.redraw(),this):void 0},addEventsMap:function(){this._map.on("zoomend",this.updatePath),this.updatePath()},updatePath:function(){var t=this.from,e=this.to,a=this.options;if(t&&e){var n=this._map,s=a.kHeight,h=this.fromPt=n.latLngToLayerPoint([t.lat,t.lng]),r=this.toPt=n.latLngToLayerPoint([e.lat,e.lng]),o=(r.x+h.x)/2,d=(r.y+h.y)/2,u=r.x-h.x,l=u*s;d+=-Math.abs(l);var p=i.switchValue(a.weight,this._data);this._path.setAttribute("stroke-width",p),this._path.setAttribute("d","M"+h.x+" "+h.y+" Q "+o+" "+d+" "+r.x+" "+r.y),this._customData="M"+h.x+" "+h.y+" Q "+o+" "+d+" "+r.x+" "+r.y,this.getPathString()}},getPathString:function(){var t=this._customData;return t instanceof Array?t.join(" "):t},hide:function(){this._path.setAttribute("display","none")},wake:function(){this._path.setAttribute("display","block")},destroy:function(){this._map.off("zoomend",this.updatePath);var t=document.getElementsByTagName("defs")[0],i=document.getElementById(this.linearGradientId);i&&t&&t.removeChild(i);var e=this._path,a=e.parentNode,n=document.getElementsByTagName("svg")[0];if(a&&n)try{n.removeChild(e)}catch(s){}}});e.FlyingLinePath=a,e.flyingLinePath=function(t){return new e.FlyingLinePath(t)},module.exports=a; |
@@ -1,1 +0,1 @@ | ||
"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),i=require("konva"),o=require("lodash"),r=require("./../leaflet"),s=require("bcore/event"),u=require("./../core/utils"),h=require("./../render/leaflet_layer_konva"),c=require("ngeohash"),l=function(s){function l(n){e(this,l);var a=t(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return a.options=u.deepMerge(l.options,n),a.isable=n.isable===!1?!1:!0,a}return n(l,s),a(l,[{key:"enable",value:function(){this.isable=!0,this.kLeafLayer&&this.kLeafLayer.enable()}},{key:"disable",value:function(){this.isable=!1,this.kLeafLayer&&this.kLeafLayer.disable()}},{key:"addTo",value:function(e){this._map=e,this.initKonva(),this.initEventsMap()}},{key:"render",value:function(e){e&&(this.data(e),this.clean()),this.draw()}},{key:"initKonva",value:function(){var e=this._map;if(e){var t=this.options,n=e.getSize(),a=this.konvaContainer=u.createContainer(t.container),o=new i.Stage({container:a,width:n.x,height:n.y}),r=this.kLeafLayer=new h(o,{transition:t.lazyFresh.transition,shapeNPerLayer:t.shapeNPerLayer});r.addTo(e),this.initEventsShapes()}}},{key:"draw",value:function(){var e=this,t=this._data;if(t&&this.isable){var n=(this.options,this.kLeafLayer),a=void 0;o.forEach(t,function(t,i){a=e.createShapeAttr(t,i),n.addOrSetShape(a)}),n.stopLazyFresh(),n.lazyFresh()}}},{key:"createShapeAttr",value:function(e,t){var n=this;if(this.isable){var a=this.options,o=[];return e.__latlngs.forEach(function(e){var t=n._map.latLngToContainerPoint(r.latLng(e[1],e[0]));o.push(t.x,t.y)}),{data:e,Constructor:i.Line,index:t,id:u.switchValue(a.id,e),attrs:{points:o,fill:u.switchValue(a.fill,e),stroke:u.switchValue(a.stroke,e),strokeWidth:u.switchValue(a.weight,e),closed:!0}}}}},{key:"initEventsMap",value:function(){var e=this;this._map.on("moveend",function(){return e.draw()}).on("zoomend",function(){return e.draw()})}},{key:"initEventsShapes",value:function(){var e=this,t=this.options,n=void 0,a=this.kLeafLayer.onKonva("dragstart",function(){}).onKonva("mouseover touchstart",function(e){n=e.target,n.setAttrs({fill:u.switchValue(t.hoverColor||"transparent","")}),n.parent.draw()}).onKonva("mouseout",function(e){n=e.target,n.setAttrs(n.__attr),n.parent.draw()}).onKonva("mouseout mouseup touchend",function(){return setTimeout(function(){return a.enableMapEvents()})}).onKonva("mousedown touchstart",this.onMouseDown.bind(this));u.EVENTS.forEach(function(t){a.onKonva(t,function(n){var a=n.target.__id,i=n.target.__data;e.emit("child-"+t,{id:a,data:i})})})}},{key:"onMouseDown",value:function(e){var t=this.options,n=this._map,a=t.popup,i=e.target;if(a&&(a=a.bind(t)),!a){if(!t.child)return;a=t.child.popup,a&&(a=a.bind(t.child))}if(a){var o=a(i.__data);setTimeout(function(){if(i){var e=i.getClientRect(),t=n.containerPointToLatLng(r.point(e.x+e.width/2,e.y));n.openPopup(o,r.latLng(t.lat,t.lng))}},100),this.kLeafLayer.disableMapEvents()}}},{key:"data",value:function(e){this._data=e,this.processing()}},{key:"updateOptions",value:function(e){this.options=u.deepMerge(this.options,e),this.draw()}},{key:"processing",value:function(){var e=this.options,t=e.geohash,n=void 0,a=void 0,i=void 0,r=void 0,s=void 0,u=void 0,h=void 0,l=void 0,f=void 0,p=void 0,d=void 0;o.forEach(this._data,function(e,o){n=t(e,o),a=c.decode_bbox(n),r=a[0],s=a[1],u=a[2],h=a[3],l=[s,r],f=[s,u],p=[h,u],d=[h,r],i=[l,f,p,d,l],e.__latlngs=i}),this.updateRange()}},{key:"updateRange",value:function(){this.range=u.getRangePercentTile(this._data,this.options.value)}},{key:"clean",value:function(){this.kLeafLayer.clean()}},{key:"destroy",value:function(){this.kLeafLayer.destroy(),this.konvaContainer.remove()}}]),l}(s);l.options={container:".leaflet-overlay-pane",fill:"#099",weight:1,value:function(e){return e.count},stroke:"rgba(255,255,255,0.2)",hoverColor:"#0ff",geohash:function(e){return e.geohash},id:function(e){return e.geohash},isable:!0,shapeNPerLayer:1e3,popup:function(e){return e.geohash},lazyFresh:{transition:"opacity 0.4s"}};var f=r.dmap=r.dmap||{};f.HeatmapGeohashGrid=l,f.heatmapGeohashGrid=function(e){return l(e)},module.exports=l; | ||
"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),i=require("konva"),o=require("lodash"),r=require("./../leaflet"),s=require("bcore/event"),u=require("./../core/utils"),h=require("./../render/leaflet_layer_konva"),c=require("ngeohash"),l=function(s){function l(n){e(this,l);var a=t(this,(l.__proto__||Object.getPrototypeOf(l)).call(this));return a.draw=o.debounce(a._draw.bind(a),1),a.options=u.deepMerge(l.options,n),a.isable=n.isable!==!1,a}return n(l,s),a(l,[{key:"enable",value:function(){this.isable=!0,this.kLeafLayer&&this.kLeafLayer.enable()}},{key:"disable",value:function(){this.isable=!1,this.kLeafLayer&&this.kLeafLayer.disable()}},{key:"addTo",value:function(e){this._map=e,this.initKonva(),this.initEventsMap()}},{key:"render",value:function(e){e&&(this.data(e),this.clean()),this.draw()}},{key:"initKonva",value:function(){var e=this._map;if(e){var t=this.options,n=e.getSize(),a=this.konvaContainer=u.createContainer(t.container),o=new i.Stage({container:a,width:n.x,height:n.y}),r=this.kLeafLayer=new h(o,{transition:t.lazyFresh.transition,shapeNPerLayer:t.shapeNPerLayer});r.addTo(e),this.initEventsShapes()}}},{key:"_draw",value:function(){var e=this,t=this._data;if(t&&this.isable){var n=this.kLeafLayer,a=void 0;o.forEach(t,function(t,i){a=e.createShapeAttr(t,i),n.addOrSetShape(a)}),n.stopLazyFresh(),n.lazyFresh()}}},{key:"createShapeAttr",value:function(e,t){var n=this;if(this.isable){var a=this.options,o=[];return e.__latlngs.forEach(function(e){var t=n._map.latLngToContainerPoint(r.latLng(e[1],e[0]));o.push(t.x,t.y)}),{data:e,Constructor:i.Line,index:t,id:u.switchValue(a.id,e),attrs:{points:o,fill:u.switchValue(a.fill,e),stroke:u.switchValue(a.stroke,e),strokeWidth:u.switchValue(a.weight,e),closed:!0}}}}},{key:"initEventsMap",value:function(){this._map.on("moveend",o.debounce(this.draw.bind(this),120)).on("zoomend",o.debounce(this.draw.bind(this),120))}},{key:"initEventsShapes",value:function(){var e=this,t=this.options,n=void 0,a=this.kLeafLayer.onKonva("dragstart",function(){}).onKonva("mouseover touchstart",function(e){n=e.target,n.setAttrs({fill:u.switchValue(t.hoverColor||"transparent","")}),n.parent.draw()}).onKonva("mouseout",function(e){n=e.target,n.setAttrs(n.__attr),n.parent.draw()}).onKonva("mouseout mouseup touchend",function(){return setTimeout(function(){return a.enableMapEvents()})}).onKonva("mousedown touchstart",this.onMouseDown.bind(this));u.EVENTS.forEach(function(t){a.onKonva(t,function(n){var a=n.target.__id,i=n.target.__data;e.emit("child-"+t,{id:a,data:i}),r.DomEvent.stopPropagation(n)})})}},{key:"onMouseDown",value:function(e){var t=this.options,n=this._map,a=t.popup,i=e.target;if(a&&(a=a.bind(t)),!a){if(!t.child)return;a=t.child.popup,a&&(a=a.bind(t.child))}if(a){var o=a(i.__data);setTimeout(function(){if(i){var e=i.getClientRect(),t=n.containerPointToLatLng(r.point(e.x+e.width/2,e.y));n.openPopup(o,r.latLng(t.lat,t.lng))}},100),this.kLeafLayer.disableMapEvents()}}},{key:"data",value:function(e){this._data=e,this.processing()}},{key:"updateOptions",value:function(e){this.options=u.deepMerge(this.options,e),this.draw()}},{key:"processing",value:function(){var e=this.options,t=e.geohash,n=void 0,a=void 0,i=void 0,r=void 0,s=void 0,u=void 0,h=void 0,l=void 0,f=void 0,d=void 0,p=void 0;o.forEach(this._data,function(e,o){n=t(e,o),a=c.decode_bbox(n),r=a[0],s=a[1],u=a[2],h=a[3],l=[s,r],f=[s,u],d=[h,u],p=[h,r],i=[l,f,d,p,l],e.__latlngs=i}),this.updateRange()}},{key:"updateRange",value:function(){this.range=u.getRangePercentTile(this._data,this.options.value)}},{key:"clean",value:function(){this.kLeafLayer.clean()}},{key:"destroy",value:function(){this.kLeafLayer.destroy(),this.konvaContainer.remove()}}]),l}(s);l.options={container:".leaflet-overlay-pane",fill:"#099",weight:1,value:function(e){return e.count},stroke:"rgba(255,255,255,0.2)",hoverColor:"#0ff",geohash:function(e){return e.geohash},id:function(e){return e.geohash},isable:!0,shapeNPerLayer:1e3,popup:function(e){return e.geohash},lazyFresh:{transition:"opacity 0.4s"}};var f=r.dmap=r.dmap||{};f.HeatmapGeohashGrid=l,f.heatmapGeohashGrid=function(e){return l(e)},module.exports=l; |
@@ -1,1 +0,1 @@ | ||
"use strict";function t(t,e,i){var n,o=a.deepMerge(t.options,i),r=t.variants;if(!r)return o;if(e&&2===e.length){var l=e[1];return n=r[l],o[l]=n.value,o}if(o.variant&&r){var u=o.variant;if(n=r[u],!n)return o;o.variant="string"==typeof n?n:n.value,n.options&&(o=a.deepMerge(o,n.options))}return o}function e(t){var i=t.attribution;return i?-1===i.indexOf("{attribution.")?t:(t.attribution=i.replace(/\{attribution.(\w*)\}/,function(t,i){return e(r[i].options)}),t):t}function i(t){return void 0===t||null===t}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=require("./../leaflet"),r=require("./tilelayer_data");delete r.__filename;var a=require("./../core/utils"),l=a.switchValue,u=o.Browser,s=o.DomUtil,f=o.Util,p=o.Bounds,y=o.Point,c={pane:"tilePane",tileSize:256,bounds:null,subdomains:"abc",zoomOffset:0},d=o.TileLayer.extend({initialize:function(t,e){var i=a.deepMerge(c,e),e=f.setOptions(this,i);this.update(t,e,!0)},update:function(i,a,l){if(a=void 0,"object"===("undefined"==typeof i?"undefined":n(i))&&(a=i,i=a.url),-1===i.indexOf("{")&&(this.tileName=i),this.tData=r,"string"!=typeof i)return console.log("输入必须为字符形式");if(-1!==i.indexOf("{")){if(o.TileLayer.prototype.initialize.call(this,i,a),l)return;return o.TileLayer.prototype.setUrl.call(this,i,a)}var u=i.split("."),s=u[0],f=r[s]||r.GeoQBlue,p=this.options.isCache?null:"ldmap="+Math.floor(1e7*Math.random()),y=f.url;if(y&&"string"==typeof y&&p){var c=-1===y.indexOf("?")?"?":"&";y+=c+p}a=t(f,u,a),a=e(a),o.TileLayer.prototype.initialize.call(this,y),l||(this.setUrl(y,a),this.redraw())},updateOptions:function(){},help:function(){console.log("L.dmap.tileLayer(name, options)\n---name可以是:\n\n\n");for(var t in r){var e=r[t].options,i=e.name;console.log(t+" | "+i)}},getTileUrl:function(t){var e=t.x,n=t.y,r=t.z;if(!(i(t.x)||i(t.y)||i(t.z)))return"function"==typeof this._url?this._url(e,n,r):o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},setVariables:function(){}});d.options={isCache:!1,pane:"tilePane",tileSize:256,bounds:null,subdomains:"abc",zoomOffset:0};var m=o.dmap=o.dmap||{};m.TileLayer=d,m.tileLayer=function(t,e){return new m.TileLayer(t,e)},module.exports=d; | ||
"use strict";function t(t,e,i){var n=a.deepMerge(t.options,i),o=t.variants,r=void 0;if(!o)return n;if(e&&2===e.length){var l=e[1];return r=o[l],n[l]=r.value,n}if(n.variant&&o){var u=n.variant;if(r=o[u],!r)return n;n.variant="string"==typeof r?r:r.value,r.options&&(n=a.deepMerge(n,r.options))}return n}function e(t){var i=t.attribution;return i?-1===i.indexOf("{attribution.")?t:(t.attribution=i.replace(/\{attribution.(\w*)\}/,function(t,i){return e(r[i].options)}),t):t}function i(t){return void 0===t||null===t}var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o=require("./../leaflet"),r=require("./tilelayer_data");delete r.__filename;var a=require("./../core/utils"),l=a.switchValue,u=o.Browser,s=o.DomUtil,f=o.Util,p=o.Bounds,d=o.Point,y={pane:"tilePane",tileSize:256,bounds:null,subdomains:"abc",zoomOffset:0},c=o.TileLayer.extend({initialize:function(t,e){var i=a.deepMerge(y,e),e=f.setOptions(this,i);this.update(t,e,!0)},update:function(i,a,l){if(a=void 0,"object"===("undefined"==typeof i?"undefined":n(i))&&(a=i,i=a.url),-1===i.indexOf("{")&&(this.tileName=i),this.tData=r,"string"!=typeof i)return console.log("输入必须为字符形式");if(-1!==i.indexOf("{")){if(o.TileLayer.prototype.initialize.call(this,i,a),l)return;return o.TileLayer.prototype.setUrl.call(this,i,a)}var u=i.split("."),s=u[0],f=r[s]||r.GeoQBlue,p=this.options.isCache?null:"ldmap="+Math.floor(1e7*Math.random()),d=f.url;if(d&&"string"==typeof d&&p){var y=-1===d.indexOf("?")?"?":"&";d+=y+p}a=t(f,u,a),a=e(a),o.TileLayer.prototype.initialize.call(this,d),l||(this.setUrl(d,a),this.redraw())},updateOptions:function(){},help:function(){console.log("L.dmap.tileLayer(name, options)\n---name可以是:\n\n\n");for(var t in r){var e=r[t].options,i=e.name;console.log(t+" | "+i)}},getTileUrl:function(t){var e=t.x,n=t.y,r=t.z;if(!(i(t.x)||i(t.y)||i(t.z)))return"function"==typeof this._url?this._url(e,n,r):o.Util.template(this._url,o.extend({s:this._getSubdomain(t),z:t.z,x:t.x,y:t.y},this.options))},setVariables:function(){}});c.options={isCache:!1,pane:"tilePane",tileSize:256,bounds:null,subdomains:"abc",zoomOffset:0};var m=o.dmap=o.dmap||{};m.TileLayer=c,m.tileLayer=function(t,e){return new m.TileLayer(t,e)},module.exports=c; |
@@ -1,1 +0,1 @@ | ||
"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=require("jquery"),i=require("./../leaflet"),n=require("./ripple"),o=require("./../core/utils"),a=i.Map.extend({options:{isRotateZ:!1,isDoubleClickRipple:!0,background:null,crs:i.CRS.EPSG3857,fadeAnimation:i.DomUtil.TRANSITION&&!i.Browser.android23,trackResize:!0,markerZoomAnimation:i.DomUtil.TRANSITION&&i.Browser.any3d,preferCanvas:!0,zoomSnap:.01,view3dOptions:{x:50,y:0,z:0}},initOverlay:function(){this.overlayNode=e('<div style="position:absolute;width:100%;height:100%;top:0;left:0;pointer-events:none;"></div>').appendTo(this._container)},initUIContainer:function(){return this.uiNode=e('<div style="position:absolute;width:100%;height:100%;top:0;left:0;pointer-events:none;z-index:1000;"></div>').appendTo(this._container)},getUIContainer:function(){var t=this.uiNode;return t||(t=this.uiNode=this.initUIContainer()),t},getOverlay:function(){return this.overlayNode},initialize:function(t,e){if(t=this.domContainer=o.getContainer(t),!t)return console.log("map container错误");var n=t.getAttribute("id");n||(n="map-"+Math.floor(1e9*Math.random()),t.setAttribute("id",n)),e=i.setOptions(this,e),i.Map.prototype.initialize.call(this,n,e),this.initOverlay(),this.updateDragging(),this.updateBgColor(),this.initEvent(),setTimeout(this.initRippe.bind(this))},initRippe:function(){var t=new n;t.addTo(this)},getPixelBounds:function(){var t=this._getTopLeftPoint(),e=new i.Bounds(t,t.add(this.getSize())),n=this.offsetBoundX||0,o=this.offsetBoundY||0;return e.min.x=e.min.x-n,e.min.y=e.min.y-n,e.max.x=e.max.x+o,e.max.y=e.max.y+o,e},updateOptions:function(t){t&&(t=this.options=o.deepMerge(this.options,t),t.zoom&&this.setZoom(t.zoom),t.center&&this.panTo(t.center),this.updateDragging(),this.updateBgColor(),i.setOptions(this,this.options))},updateDragging:function(){var t=this.options.draggable;t===!1?this.dragging.disable():this.dragging.enable()},init3d:function(){if(!this.isInit3d){this.offsetBoundX=1e3,this.offsetBoundY=1e3;var t=this._container;e(t).css({overflow:"visible"}),this.addHooks3dLayer(),this.initEvents3d(),this.isInit3d=!0}},addHooks3dLayer:function(){this.on("move",this._update3dLayers,this)},removeHooks3dLayer:function(){this.off("move",this._update3dLayers,this)},_getTransformOrigin:function(t){var e=this._size,i=this._getMapPanePos();return-i.x+e.x/2+"px "+(-i.y+e.y/2+1*t)+"px"},_update3dLayer:function(t,i){var n=this._getTransformOrigin(i),o="rotateX("+this.options.view3dOptions.x+"deg)";t.css({transformOrigin:n,transform:o,zIndex:0}),e(".leaflet-marker-pane").show()},_update2dLayer:function(t,e){var i=this._getTransformOrigin(e),n="rotateX(0deg)";t.css({transformOrigin:i,transform:n+"translateZ(10px)",zIndex:0})},_update3dLayers:function(){this.init3d();var t=1200,i=this.panes=e(this._container).find(".leaflet-map-pane");i.css({webkitPerspective:t,perspective:t,perspectiveOrigin:this._getTransformOrigin(0)}),this._update3dLayer(i.find(".leaflet-objects-pane"),1),this._update3dLayer(i.find(".leaflet-tile-pane"),1)},_update2dLayers:function(){var t=this.panes=e(this._container).find(".leaflet-map-pane"),i=1200;t.css({webkitPerspective:i,perspective:i,perspectiveOrigin:this._getTransformOrigin(0)}),this._update2dLayer(t.find(".leaflet-objects-pane"),1),this._update2dLayer(t.find(".leaflet-tile-pane"),1)},view3d:function(t){var t=i.Util.extend(this.options.view3dOptions,t);this._update3dLayers()},view2d:function(){this._update2dLayers(),this.cancel3d(),this.hideMarkerPane(),this.disableRotate()},cancel3d:function(){this.offsetBoundX=0,this.offsetBoundY=0,this.removeHooks3dLayer()},hideMarkerPane:function(){e(".leaflet-marker-pane").hide(),e(".leaflet-marker-pane").css("transform","rotateZ(0deg)")},setDomStyle:function(i){i&&"object"===("undefined"==typeof i?"undefined":t(i))&&e(this._container).css(i)},updateBgColor:function(){var t=this.options.background;t&&this.setBgColor(t)},setBgColor:function(t){this.setDomStyle({"background-color":t})},detect:function(){this.on("moveend",function(){console.log(this.getCenter(),this.getZoom())})},disableRotate:function(){this.isRotateZ=!1,this.dragging.enable(),e(".leaflet-layer").attr("style","transform:rotateZ(0deg)"),e(".leaflet-marker-pane").css("transform","rotateZ(0deg)"),this.fire("rotate",{rotation:0})},enableRotate:function(){this.isRotateZ=!0,this.dragging.disable()},initEvent:function(){setTimeout(this.initEvent.bind(this),1e3),this.invalidateSize()},initEvents3d:function(){this.angle=0,this.xdrag=0;var t=this,i=!1,n=0,o=e("#map-container");o.on("mousedown",function(e){t.isRotateZ&&(n=e.pageX,i=!0,t.fire("rotatestart"))}).on("mousemove",function(o){if(t.isRotateZ&&i){t.xdrag=(n-o.pageX)/4;var a="rotateZ("+(t.angle+t.xdrag)%360+"deg)",s=t._getTransformOrigin(0),r={"-webkit-transform":a,transform:a,"transform-origin":s,"-webkit-transform-origin":s};e(".leaflet-layer").css(r),e(".leaflet-marker-pane").css(r),e(".leaflet-objects-pane").css("transform-origin",s),e(".leaflet-tile-pane").css("transform-origin",s),t.fire("rotate",{rotation:t.angle+t.xdrag})}}).on("mouseup",function(){t.isRotateZ&&(i=!1,t.fire("rotateend"),t.angle=t.angle+t.xdrag)})}}),s=i.dmap=i.dmap||{};s.Map=a,s.map=function(t,e){return new a(t,e)},module.exports=a; | ||
"use strict";var t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e=require("jquery"),i=require("./../leaflet"),n=require("./ripple"),o=require("./../core/utils"),a=i.Map.extend({options:{isRotateZ:!1,isDoubleClickRipple:!0,background:null,crs:i.CRS.EPSG3857,fadeAnimation:i.DomUtil.TRANSITION&&!i.Browser.android23,trackResize:!0,markerZoomAnimation:i.DomUtil.TRANSITION&&i.Browser.any3d,preferCanvas:!0,zoomSnap:.01,view3dOptions:{x:50,y:0,z:0}},initOverlay:function(){this.overlayNode=e('<div style="position:absolute;width:100%;height:100%;top:0;left:0;pointer-events:none;"></div>').appendTo(this._container)},initUIContainer:function(){return this.uiNode=e('<div style="position:absolute;width:100%;height:100%;top:0;left:0;pointer-events:none;z-index:1000;"></div>').appendTo(this._container)},getUIContainer:function(){var t=this.uiNode;return t||(t=this.uiNode=this.initUIContainer()),t},getOverlay:function(){return this.overlayNode},initialize:function(t,e){if(t=this.domContainer=o.getContainer(t),!t)return console.log("map container错误");var n=t.getAttribute("id");n||(n="map-"+Math.floor(1e9*Math.random()),t.setAttribute("id",n)),e=i.setOptions(this,e),i.Map.prototype.initialize.call(this,n,e),this.initOverlay(),this.updateDragging(),this.updateBgColor(),this.initEvent(),setTimeout(this.initRippe.bind(this))},initRippe:function(){var t=new n;t.addTo(this)},getPixelBounds:function(){var t=this._getTopLeftPoint(),e=new i.Bounds(t,t.add(this.getSize())),n=this.offsetBoundX||0,o=this.offsetBoundY||0;return e.min.x=e.min.x-n,e.min.y=e.min.y-n,e.max.x=e.max.x+o,e.max.y=e.max.y+o,e},updateOptions:function(t){t&&(t=this.options=o.deepMerge(this.options,t),t.zoom&&this.setZoom(t.zoom),t.center&&this.panTo(t.center),this.updateDragging(),this.updateBgColor(),i.setOptions(this,this.options))},updateDragging:function(){var t=this.options.draggable;t===!1?this.dragging.disable():this.dragging.enable()},init3d:function(){if(!this.isInit3d){this.offsetBoundX=1e3,this.offsetBoundY=1e3;var t=this._container;e(t).css({overflow:"visible"}),this.addHooks3dLayer(),this.initEvents3d(),this.isInit3d=!0}},addHooks3dLayer:function(){this.on("move",this._update3dLayers,this)},removeHooks3dLayer:function(){this.off("move",this._update3dLayers,this)},_getTransformOrigin:function(t){var e=this._size,i=this._getMapPanePos();return-i.x+e.x/2+"px "+(-i.y+e.y/2+1*t)+"px"},_update3dLayer:function(t,i){var n=this._getTransformOrigin(i),o="rotateX("+this.options.view3dOptions.x+"deg)";t.css({transformOrigin:n,transform:o,zIndex:0}),e(".leaflet-marker-pane").show()},_update2dLayer:function(t,e){var i=this._getTransformOrigin(e),n="rotateX(0deg)";t.css({transformOrigin:i,transform:n+"translateZ(10px)",zIndex:0})},_update3dLayers:function(){this.init3d();var t=1200,i=this.panes=e(this._container).find(".leaflet-map-pane");i.css({webkitPerspective:t,perspective:t,perspectiveOrigin:this._getTransformOrigin(0)}),this._update3dLayer(i.find(".leaflet-objects-pane"),1),this._update3dLayer(i.find(".leaflet-tile-pane"),1)},_update2dLayers:function(){var t=this.panes=e(this._container).find(".leaflet-map-pane"),i=1200;t.css({webkitPerspective:i,perspective:i,perspectiveOrigin:this._getTransformOrigin(0)}),this._update2dLayer(t.find(".leaflet-objects-pane"),1),this._update2dLayer(t.find(".leaflet-tile-pane"),1)},view3d:function(t){var t=i.Util.extend(this.options.view3dOptions,t);this._update3dLayers()},view2d:function(){this._update2dLayers(),this.cancel3d(),this.hideMarkerPane(),this.disableRotate()},cancel3d:function(){this.offsetBoundX=0,this.offsetBoundY=0,this.removeHooks3dLayer()},hideMarkerPane:function(){e(".leaflet-marker-pane").hide(),e(".leaflet-marker-pane").css("transform","rotateZ(0deg)")},setDomStyle:function(i){i&&"object"===("undefined"==typeof i?"undefined":t(i))&&e(this._container).css(i)},updateBgColor:function(){var t=this.options.background;t&&this.setBgColor(t)},setBgColor:function(t){this.setDomStyle({"background-color":t})},detect:function(){this.on("moveend",function(){console.log(this.getCenter(),this.getZoom())})},disableRotate:function(){this.isRotateZ=!1,this.dragging.enable(),e(".leaflet-layer").attr("style","transform:rotateZ(0deg)"),e(".leaflet-marker-pane").css("transform","rotateZ(0deg)"),this.fire("rotate",{rotation:0})},enableRotate:function(){this.isRotateZ=!0,this.dragging.disable()},initEvent:function(){setTimeout(this.initEvent.bind(this),1e3),this.invalidateSize()},initEvents3d:function(){this.angle=0,this.xdrag=0;var t=this,i=!1,n=0,o=e("#map-container");o.on("mousedown",function(e){t.isRotateZ&&(n=e.pageX,i=!0,t.fire("rotatestart"))}).on("mousemove",function(o){if(t.isRotateZ&&i){t.xdrag=(n-o.pageX)/4;var a="rotateZ("+(t.angle+t.xdrag)%360+"deg)",s=t._getTransformOrigin(0),r={"-webkit-transform":a,transform:a,"transform-origin":s,"-webkit-transform-origin":s};e(".leaflet-layer").css(r),e(".leaflet-marker-pane").css(r),e(".leaflet-objects-pane").css("transform-origin",s),e(".leaflet-tile-pane").css("transform-origin",s),t.fire("rotate",{rotation:t.angle+t.xdrag})}}).on("mouseup",function(){t.isRotateZ&&(i=!1,t.fire("rotateend"),t.angle+=t.xdrag)})}}),s=i.dmap=i.dmap||{};s.Map=a,s.map=function(t,e){return new a(t,e)},module.exports=a; |
@@ -8,3 +8,3 @@ { | ||
}, | ||
"version": "0.1.18", | ||
"version": "0.1.24", | ||
"scripts": { | ||
@@ -25,7 +25,7 @@ "test": "mocha -r jscoverage test", | ||
"bcore": "0.0.20", | ||
"convex-hull": "^1.0.3", | ||
"d3-scale": "^1.0.4", | ||
"jquery": "^3.2.1", | ||
"konva": "^0.13.0", | ||
"leaflet": "^1.0.3", | ||
"leaflet.markercluster": "^1.0.6", | ||
"leaflet-editable": "^1.1.0", | ||
"lodash": "^4.17.4", | ||
@@ -35,3 +35,2 @@ "ngeohash": "^0.6.0", | ||
"turf-concave": "^3.0.5", | ||
"turf-convex": "^3.0.12", | ||
"turf-distance": "^3.0.5", | ||
@@ -44,5 +43,5 @@ "turf-line-distance": "^3.0.5", | ||
"async": "", | ||
"babel": "^6.5.2", | ||
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.14.0", | ||
"babel-generator": "^6.26.0", | ||
"babel-loader": "^6.2.5", | ||
@@ -55,2 +54,7 @@ "babel-polyfill": "^6.13.0", | ||
"babel-preset-stage-2": "^6.13.0", | ||
"babel-runtime": "^6.26.0", | ||
"babel-template": "^6.26.0", | ||
"babel-traverse": "^6.26.0", | ||
"babel-types": "^6.26.0", | ||
"core-js": "^2.5.1", | ||
"css-loader": "^0.25.0", | ||
@@ -64,2 +68,3 @@ "dat-gui": "^0.5.0", | ||
"request": "", | ||
"simple-assign": "^0.1.0", | ||
"style-loader": "^0.13.1", | ||
@@ -66,0 +71,0 @@ "supertest": "*", |
@@ -1,1 +0,1 @@ | ||
"use strict";require("./../index.css");var e=require("leaflet");module.exports=e; | ||
"use strict";require("./../index.css");var e=require("leaflet");e.Icon.Default.imagePath="http://7i7ifh.com1.z0.glb.clouddn.com/",require("leaflet-editable"),module.exports=e; |
@@ -1,1 +0,1 @@ | ||
"use strict";function t(e,n){var o=e.content,a={position:"absolute",left:"0%",top:"0%",zIndex:1e3};i.forEach(a,function(t,e){o.style[e]=t}),this.options=s.deepMerge(t.options,n),this.stage=e,this.initEvents()}var e=require("bcore/event"),s=require("bcore/utils"),n=require("./../leaflet"),i=require("lodash");t.options={transition:"opacity 0.4s",blending:"lighter",lazyFresh:!0,ptNPerLayer:1e3},t=e.extend(t,{initEvents:function(){},beginDraw:function(){this.versionID=Math.random()},endDraw:function(){var t=this.shapes;for(var e in t){var s=t[e];s.__versionID!==this.versionID&&(s.destroy(),delete t[e])}this.lazyFresh()},cleanOld:function(){var t,e,s,n=this.versionID,i=this.cache;if(n&&i)for(var o in i)t=i[o],s=t.versionID,s!==n&&(e=t.visual,e&&(e.off&&e.off(),e.destroy&&e.destroy()),delete i[o])},addTo:function(t){this._map=t,this.resetVariables(),this.initEventsMap()},resetOffset:function(){this.pOffset=this.offset},disable:function(){this.isable=!1,this.stage.content.style.display="none"},enable:function(){this.isable=!0,this.stage.content.style.display="block"},resetVariables:function(){this.isable=!0,this.shapes={},this.layers=[],this.offset={x:0,y:0},this.pOffset={x:0,y:0}},add:function(t){this.stage.add(t)},addOrSetShape:function(t){var e,s=t.Constructor,n=t.index,i=t.attrs,o=t.data,a=t.id,r=this.shapes;if(r[a])return e=r[a],e.__options=t,e.__versionID=this.versionID,e.__data=o,e.__attr=i,r[a].setAttrs(i);var e=new s(i),h=this.getOrAddLayer(n);h.getCanvas().getContext("2d").globalCompositeOperation=this.options.blending,h.add(e),r[a]=e,e.scale={x:1.2,y:1.2},e.__options=t,e.__versionID=this.versionID,e.__data=o,e.__id=a,e.__attr=i},getOrAddLayer:function(t){if(this.isable){t=Math.floor(t/(this.options.shapeNPerLayer||this.options.ptNPerLayer));var e=this.layers,s=e[t];return s?s:(s=new Konva.Layer,e[t]=s,this.stage.add(s),s.canvas._canvas.style.zIndex=1e3-t,s)}},fresh:function(){this.layers.forEach(function(t){t.draw()})},lazyFresh:function(){this.isable&&this.lazyFreshDraw(0)},lazyFreshDraw:function(t){var e=this;t=t||0;var s=this.layers[t];return s?(s.draw(),this.resetPos(s.canvas._canvas,{x:e.offset.x-e.pOffset.x,y:e.offset.y-e.pOffset.y}),s.canvas._canvas.style.opacity=1,s.canvas._canvas.style.transition=this.options.lazyFresh.transition,t++,void(this.lazyFreshId=window.requestAnimationFrame(function(){this.lazyFreshDraw(t)}.bind(this)))):window.requestAnimationFrame(this.lazyFreshDone.bind(this))},lazyFreshDone:function(){this.resetPos(this.stage.content),this.layers.forEach(function(t){n.DomUtil.setPosition(t.canvas._canvas,{x:0,y:0})})},resetPos:function(t,e){e=e||n.DomUtil.getPosition(this._map.getPanes().mapPane),e&&n.DomUtil.setPosition(t,{x:-e.x,y:-e.y})},stopLazyFresh:function(){this.lazyFreshId&&(window.cancelAnimationFrame(this.lazyFreshId),this.lazyFreshId=null)},hideLayers:function(){this.layers.forEach(function(t){t.canvas._canvas.style.opacity=0})},updateOptions:function(t){this.options=s.deepMerge(this.options,t),this.updateBlending()},updateBlending:function(){var t=this.options;this.layers.forEach(function(e){e.getCanvas().getContext("2d").globalCompositeOperation=t.blending})},initEventsMap:function(){var t=this,e=this._map;e.on("zoomstart",function(){t.hideLayers(),t.stopLazyFresh()}).on("movestart",function(){t.stopLazyFresh()}).on("moveend",function(){t.pOffset=t.offset,t.offset=n.DomUtil.getPosition(e.getPanes().mapPane)}).on("resize",function(){})},onKonva:function(t,e){return this.stage.on(t,e),this},enableMapEvents:function(){var t=this.stage.content;n.DomEvent.off(t,"mousedown",n.DomEvent.stopPropagation),n.DomEvent.off(t,"mousemove",n.DomEvent.stopPropagation),this._map.options.draggable!==!1&&this._map.dragging.enable()},disableMapEvents:function(t){var e=this.stage.content;n.DomEvent.on(e,"mousedown",n.DomEvent.stopPropagation),n.DomEvent.on(e,"mousemove",n.DomEvent.stopPropagation),this._map.dragging.disable(),t&&t.evt.preventDefault()},clean:function(){var t=this.shapes;for(var e in t){var s=t[e];s.destroy(),delete t[e]}},destroy:function(){this.stage.clearCache(),this.stage.clear(),this.clean(),this.stage.destroy()}}),t.prototype=s.merge(t.prototype,require("./leaflet_layer_konva.editor")),module.exports=t; | ||
"use strict";function t(e,n){var o=e.content,a={position:"absolute",left:"0%",top:"0%",zIndex:1e3};i.forEach(a,function(t,e){o.style[e]=t}),this.options=s.deepMerge(t.options,n),this.stage=e,this.initEvents()}var e=require("bcore/event"),s=require("bcore/utils"),n=require("./../leaflet"),i=require("lodash");t.options={transition:"opacity 0.4s",blending:"lighter",lazyFresh:!0,ptNPerLayer:1e3},t=e.extend(t,{initEvents:function(){},beginDraw:function(){this.versionID=Math.random()},endDraw:function(){var t=this.shapes;for(var e in t){var s=t[e];s.__versionID!==this.versionID&&(s.destroy(),delete t[e])}this.lazyFresh()},cleanOld:function(){var t=this.versionID,e=this.cache,s=void 0,n=void 0,i=void 0;if(t&&e)for(var o in e)s=e[o],i=s.versionID,i!==t&&(n=s.visual,n&&(n.off&&n.off(),n.destroy&&n.destroy()),delete e[o])},addTo:function(t){this._map=t,this.resetVariables(),this.initEventsMap()},resetOffset:function(){this.pOffset=this.offset},disable:function(){this.isable=!1,this.stage.content.style.display="none"},enable:function(){this.isable=!0,this.stage.content.style.display="block"},resetVariables:function(){this.isable=!0,this.shapes={},this.layers=[],this.offset={x:0,y:0},this.pOffset={x:0,y:0}},add:function(t){this.stage.add(t)},addOrSetShape:function(t){var e,s=t.Constructor,n=t.index,i=t.attrs,o=t.data,a=t.id,r=this.shapes;if(r[a])return e=r[a],e.__options=t,e.__versionID=this.versionID,e.__data=o,e.__attr=i,r[a].setAttrs(i);var e=new s(i),h=this.getOrAddLayer(n);h.getCanvas().getContext("2d").globalCompositeOperation=this.options.blending,h.add(e),r[a]=e,e.scale={x:1.2,y:1.2},e.__options=t,e.__versionID=this.versionID,e.__data=o,e.__id=a,e.__attr=i},getOrAddLayer:function(t){if(this.isable){t=Math.floor(t/(this.options.shapeNPerLayer||this.options.ptNPerLayer));var e=this.layers,s=e[t];return s?s:(s=new Konva.Layer,e[t]=s,this.stage.add(s),s.canvas._canvas.style.zIndex=1e3-t,s)}},fresh:function(){this.layers.forEach(function(t){t.draw()})},lazyFresh:function(){this.isable&&this.lazyFreshDraw(0)},lazyFreshDraw:function(t){var e=this,s=this;t=t||0;var n=this.layers[t];return n?(n.draw(),this.resetPos(n.canvas._canvas,{x:s.offset.x-s.pOffset.x,y:s.offset.y-s.pOffset.y}),n.canvas._canvas.style.opacity=1,n.canvas._canvas.style.transition=this.options.lazyFresh.transition,t++,void(this.lazyFreshId=window.requestAnimationFrame(function(){e.lazyFreshDraw(t)}))):window.requestAnimationFrame(this.lazyFreshDone.bind(this))},lazyFreshDone:function(){this.resetPos(this.stage.content),this.layers.forEach(function(t){n.DomUtil.setPosition(t.canvas._canvas,{x:0,y:0})})},resetPos:function(t,e){e=e||n.DomUtil.getPosition(this._map.getPanes().mapPane),e&&n.DomUtil.setPosition(t,{x:-e.x,y:-e.y})},stopLazyFresh:function(){this.lazyFreshId&&(window.cancelAnimationFrame(this.lazyFreshId),this.lazyFreshId=null)},hideLayers:function(){this.layers.forEach(function(t){t.canvas._canvas.style.opacity=0})},updateOptions:function(t){this.options=s.deepMerge(this.options,t),this.updateBlending()},updateBlending:function(){var t=this.options;this.layers.forEach(function(e){e.getCanvas().getContext("2d").globalCompositeOperation=t.blending})},initEventsMap:function(){var t=this,e=this._map;e.on("zoomstart",function(){t.hideLayers(),t.stopLazyFresh()}).on("movestart",function(){t.stopLazyFresh()}).on("moveend",function(){t.pOffset=t.offset,t.offset=n.DomUtil.getPosition(e.getPanes().mapPane)}).on("resize",function(){})},onKonva:function(t,e){return this.stage.on(t,e),this},enableMapEvents:function(){var t=this.stage.content;n.DomEvent.off(t,"mousedown",n.DomEvent.stopPropagation),n.DomEvent.off(t,"mousemove",n.DomEvent.stopPropagation),n.DomEvent.off(t,"click",n.DomEvent.stopPropagation),this._map.options.draggable!==!1&&this._map.dragging.enable()},disableMapEvents:function(t){var e=this.stage.content;n.DomEvent.on(e,"mousedown",n.DomEvent.stopPropagation),n.DomEvent.on(e,"mousemove",n.DomEvent.stopPropagation),n.DomEvent.on(e,"click",n.DomEvent.stopPropagation),this._map.dragging.disable(),t&&t.evt.preventDefault()},clean:function(){var t=this.shapes;for(var e in t){var s=t[e];s.destroy(),delete t[e]}},destroy:function(){this.stage.clearCache(),this.stage.clear(),this.clean(),this.stage.destroy()}}),t.prototype=s.merge(t.prototype,require("./leaflet_layer_konva.editor")),module.exports=t; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
247458
16
30
66
1
+ Addedjquery@^3.2.1
+ Addedleaflet-editable@^1.1.0
+ Addedjquery@3.7.1(transitive)
+ Addedleaflet-editable@1.3.0(transitive)
- Removedconvex-hull@^1.0.3
- Removedleaflet.markercluster@^1.0.6
- Removedturf-convex@^3.0.12
- Removedleaflet.markercluster@1.5.3(transitive)