Skip to content

Commit 2b56cd6

Browse files
committed
修复升级echarts导致一些示例拖动漂移的问题。review by songyumeng.
1 parent da4691f commit 2b56cd6

File tree

9 files changed

+23
-12
lines changed

9 files changed

+23
-12
lines changed

dist/iclient9-leaflet.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63161,6 +63161,7 @@ var EchartsLayer = exports.EchartsLayer = _leaflet2["default"].Layer.extend({
6316163161
echartsOptions.LeafletMap = {
6316263162
roam: true
6316363163
};
63164+
echartsOptions.animation = false;
6316463165
}
6316563166
this._echartsOptions = echartsOptions;
6316663167
_leaflet2["default"].Util.setOptions(this, options);
@@ -94370,7 +94371,7 @@ module.exports = function (proj4) {
9437094371
/* 490 */
9437194372
/***/ (function(module) {
9437294373

94373-
module.exports = {"_args":[["proj4@2.3.15","F:\\map_study\\iClient-JavaScript"]],"_from":"proj4@2.3.15","_id":"proj4@2.3.15","_inBundle":false,"_integrity":"sha1-WtBui8owvg/6OJpJ5FZfUfBtCJ4=","_location":"/proj4","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"proj4@2.3.15","name":"proj4","escapedName":"proj4","rawSpec":"2.3.15","saveSpec":null,"fetchSpec":"2.3.15"},"_requiredBy":["/"],"_resolved":"https://registry.npmjs.org/proj4/-/proj4-2.3.15.tgz","_spec":"2.3.15","_where":"F:\\map_study\\iClient-JavaScript","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"contributors":[{"name":"Mike Adair","email":"madair@dmsolutions.ca"},{"name":"Richard Greenwood","email":"rich@greenwoodmap.com"},{"name":"Calvin Metcalf","email":"calvin.metcalf@gmail.com"},{"name":"Richard Marsden","url":"http://www.winwaed.com"},{"name":"T. Mittan"},{"name":"D. Steinwand"},{"name":"S. Nelson"}],"dependencies":{"mgrs":"~0.0.2"},"description":"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.","devDependencies":{"browserify":"~12.0.1","chai":"~1.8.1","curl":"git://github.com/cujojs/curl.git","grunt":"~0.4.2","grunt-browserify":"~4.0.1","grunt-cli":"~0.1.13","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~0.8.0","grunt-contrib-uglify":"~0.11.1","grunt-mocha-phantomjs":"~0.4.0","istanbul":"~0.2.4","mocha":"~1.17.1","tin":"~0.4.0"},"directories":{"test":"test","doc":"docs"},"homepage":"https://github.com/proj4js/proj4js#readme","jam":{"main":"dist/proj4.js","include":["dist/proj4.js","README.md","AUTHORS","LICENSE.md"]},"license":"MIT","main":"lib/index.js","name":"proj4","repository":{"type":"git","url":"git://github.com/proj4js/proj4js.git"},"scripts":{"test":"./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"},"version":"2.3.15"};
94374+
module.exports = {"_args":[["proj4@2.3.15","G:\\iClient9"]],"_from":"proj4@2.3.15","_id":"proj4@2.3.15","_inBundle":false,"_integrity":"sha1-WtBui8owvg/6OJpJ5FZfUfBtCJ4=","_location":"/proj4","_phantomChildren":{},"_requested":{"type":"version","registry":true,"raw":"proj4@2.3.15","name":"proj4","escapedName":"proj4","rawSpec":"2.3.15","saveSpec":null,"fetchSpec":"2.3.15"},"_requiredBy":["/"],"_resolved":"http://registry.npm.taobao.org/proj4/download/proj4-2.3.15.tgz","_spec":"2.3.15","_where":"G:\\iClient9","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"contributors":[{"name":"Mike Adair","email":"madair@dmsolutions.ca"},{"name":"Richard Greenwood","email":"rich@greenwoodmap.com"},{"name":"Calvin Metcalf","email":"calvin.metcalf@gmail.com"},{"name":"Richard Marsden","url":"http://www.winwaed.com"},{"name":"T. Mittan"},{"name":"D. Steinwand"},{"name":"S. Nelson"}],"dependencies":{"mgrs":"~0.0.2"},"description":"Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.","devDependencies":{"browserify":"~12.0.1","chai":"~1.8.1","curl":"git://github.com/cujojs/curl.git","grunt":"~0.4.2","grunt-browserify":"~4.0.1","grunt-cli":"~0.1.13","grunt-contrib-connect":"~0.6.0","grunt-contrib-jshint":"~0.8.0","grunt-contrib-uglify":"~0.11.1","grunt-mocha-phantomjs":"~0.4.0","istanbul":"~0.2.4","mocha":"~1.17.1","tin":"~0.4.0"},"directories":{"test":"test","doc":"docs"},"homepage":"https://github.com/proj4js/proj4js#readme","jam":{"main":"dist/proj4.js","include":["dist/proj4.js","README.md","AUTHORS","LICENSE.md"]},"license":"MIT","main":"lib/index.js","name":"proj4","repository":{"type":"git","url":"git://github.com/proj4js/proj4js.git"},"scripts":{"test":"./node_modules/istanbul/lib/cli.js test ./node_modules/mocha/bin/_mocha test/test.js"},"version":"2.3.15"};
9437494375

9437594376
/***/ }),
9437694377
/* 491 */

dist/iclient9-leaflet.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/iclient9-openlayers.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59874,11 +59874,15 @@ var MapExtend = exports.MapExtend = function () {
5987459874

5987559875
this.forEachFeatureAtPixelDefault(pixel, callback, opt_options);
5987659876

59877+
var layerFilter = opt_options.layerFilter ? opt_options.layerFilter : function () {
59878+
return true;
59879+
};
59880+
5987759881
var layers = this.getLayers().getArray();
5987859882
var resolution = this.getView().getResolution();
5987959883
var coordinate = this.getCoordinateFromPixel(pixel);
5988059884
for (var i = 0; i < layers.length; i++) {
59881-
if (layers[i].getSource()._forEachFeatureAtCoordinate) {
59885+
if (layerFilter.call(null, layers[i]) && layers[i].getSource()._forEachFeatureAtCoordinate) {
5988259886
layers[i].getSource()._forEachFeatureAtCoordinate(coordinate, resolution, callback, pixel);
5988359887
}
5988459888
}

dist/iclient9-openlayers.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/mapboxgl/echarts_effectScatter.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -833,7 +833,7 @@
833833
};
834834

835835
option = {
836-
836+
animation: false,
837837
title: {
838838
text: resources.text_effectScatter,
839839
subtext: 'data from PM25.in',

examples/mapboxgl/echarts_geoline.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
});
463463

464464
option = {
465-
465+
animation: false,
466466
GLMap: {
467467
roam: true
468468
},

examples/openlayers/turf_classificationAnalysis.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,15 @@ <h5 class='panel-title text-center' data-i18n="resources.text_classificationAnal
8686
<div class='panel-body content' id='classificationBody'>
8787
<div class='panel'>
8888
<div class='input-group'>
89-
<span class='input-group-addon'><span data-i18n="resources.text_classificationAnalysisType"></span><span data-i18n="[title]resources.text_requiredField" style='color: red;'> * </span></span>
89+
<span class='input-group-addon'><span data-i18n="resources.text_classificationAnalysisType"></span><span
90+
data-i18n="[title]resources.text_requiredField" style='color: red;'> * </span></span>
9091
<select class='form-control' id='classificationAnalyzeType' name='interpolationAnalyzeType'>
9192
<option value='nearestOption' selected>nearestAnalyze</option>
9293
</select>
9394
</div>
9495
</div>
9596
</div>
9697
</div>
97-
</body>
9898
<script type="text/javascript" include="bootstrap,widgets.alert" src="../js/include-web.js"></script>
9999
<script>
100100
var host = window.isLocal ? window.server : "http://support.supermap.com.cn:8090",
@@ -353,4 +353,5 @@ <h5 class='panel-title text-center' data-i18n="resources.text_classificationAnal
353353
}
354354

355355
</script>
356+
</body>
356357
</html>

src/leaflet/overlay/EChartsLayer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export var EchartsLayer = L.Layer.extend({
3030
echartsOptions.LeafletMap = {
3131
roam: true
3232
}
33+
echartsOptions.animation = false;
3334
}
3435
this._echartsOptions = echartsOptions;
3536
L.Util.setOptions(this, options);

src/openlayers/core/MapExtend.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,15 @@ export var MapExtend = function () {
1212

1313
this.forEachFeatureAtPixelDefault(pixel, callback, opt_options);
1414

15-
let layers = this.getLayers().getArray();
16-
let resolution = this.getView().getResolution();
17-
let coordinate = this.getCoordinateFromPixel(pixel);
15+
const layerFilter = opt_options.layerFilter ? opt_options.layerFilter : () => {
16+
return true;
17+
};
18+
19+
const layers = this.getLayers().getArray();
20+
const resolution = this.getView().getResolution();
21+
const coordinate = this.getCoordinateFromPixel(pixel);
1822
for (let i = 0; i < layers.length; i++) {
19-
if (layers[i].getSource()._forEachFeatureAtCoordinate) {
23+
if (layerFilter.call(null, layers[i]) && layers[i].getSource()._forEachFeatureAtCoordinate) {
2024
layers[i].getSource()._forEachFeatureAtCoordinate(coordinate, resolution, callback, pixel);
2125
}
2226
}

0 commit comments

Comments
 (0)