Skip to content

Commit f74d8e4

Browse files
committed
【fix】 leaflet graphic点击偏移的问题
1 parent e94aebf commit f74d8e4

21 files changed

+1360
-2267
lines changed

dist/classic/iclient-classic-es6.js

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,34 @@
4444
/******/ // define getter function for harmony exports
4545
/******/ __webpack_require__.d = function(exports, name, getter) {
4646
/******/ if(!__webpack_require__.o(exports, name)) {
47-
/******/ Object.defineProperty(exports, name, {
48-
/******/ configurable: false,
49-
/******/ enumerable: true,
50-
/******/ get: getter
51-
/******/ });
47+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
5248
/******/ }
5349
/******/ };
5450
/******/
5551
/******/ // define __esModule on exports
5652
/******/ __webpack_require__.r = function(exports) {
53+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
54+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
55+
/******/ }
5756
/******/ Object.defineProperty(exports, '__esModule', { value: true });
5857
/******/ };
5958
/******/
59+
/******/ // create a fake namespace object
60+
/******/ // mode & 1: value is a module id, require it
61+
/******/ // mode & 2: merge all properties of value into the ns
62+
/******/ // mode & 4: return value when already ns object
63+
/******/ // mode & 8|1: behave like require
64+
/******/ __webpack_require__.t = function(value, mode) {
65+
/******/ if(mode & 1) value = __webpack_require__(value);
66+
/******/ if(mode & 8) return value;
67+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
68+
/******/ var ns = Object.create(null);
69+
/******/ __webpack_require__.r(ns);
70+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
71+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
72+
/******/ return ns;
73+
/******/ };
74+
/******/
6075
/******/ // getDefaultExport function for compatibility with non-harmony modules
6176
/******/ __webpack_require__.n = function(module) {
6277
/******/ var getter = module && module.__esModule ?

dist/classic/iclient-classic-es6.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/classic/iclient-classic.js

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,34 @@
4444
/******/ // define getter function for harmony exports
4545
/******/ __webpack_require__.d = function(exports, name, getter) {
4646
/******/ if(!__webpack_require__.o(exports, name)) {
47-
/******/ Object.defineProperty(exports, name, {
48-
/******/ configurable: false,
49-
/******/ enumerable: true,
50-
/******/ get: getter
51-
/******/ });
47+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
5248
/******/ }
5349
/******/ };
5450
/******/
5551
/******/ // define __esModule on exports
5652
/******/ __webpack_require__.r = function(exports) {
53+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
54+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
55+
/******/ }
5756
/******/ Object.defineProperty(exports, '__esModule', { value: true });
5857
/******/ };
5958
/******/
59+
/******/ // create a fake namespace object
60+
/******/ // mode & 1: value is a module id, require it
61+
/******/ // mode & 2: merge all properties of value into the ns
62+
/******/ // mode & 4: return value when already ns object
63+
/******/ // mode & 8|1: behave like require
64+
/******/ __webpack_require__.t = function(value, mode) {
65+
/******/ if(mode & 1) value = __webpack_require__(value);
66+
/******/ if(mode & 8) return value;
67+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
68+
/******/ var ns = Object.create(null);
69+
/******/ __webpack_require__.r(ns);
70+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
71+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
72+
/******/ return ns;
73+
/******/ };
74+
/******/
6075
/******/ // getDefaultExport function for compatibility with non-harmony modules
6176
/******/ __webpack_require__.n = function(module) {
6277
/******/ var getter = module && module.__esModule ?

dist/classic/iclient-classic.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/leaflet/iclient9-leaflet-es6.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75291,15 +75291,16 @@ var GraphicCanvasRenderer = external_L_default.a.Class.extend({
7529175291
style = this.defaultStyle;
7529275292
}
7529375293
if (style.img) {
75294-
p1 = external_L_default.a.point(center.x - style.img.width / 2, center.y - style.img.height / 2);
75295-
p2 = external_L_default.a.point(center.x + style.img.width / 2, center.y + style.img.height / 2);
75294+
let anchor = style.anchor || [style.img.width / 2, style.img.height / 2];
75295+
p1 = external_L_default.a.point(center.x - anchor[0], center.y - anchor[1]);
75296+
p2 = external_L_default.a.point(p1.x + style.img.width, p1.y + style.img.height);
7529675297
} else {
7529775298
p1 = external_L_default.a.point(center.x - style.width / 2, center.y - style.height / 2);
7529875299
p2 = external_L_default.a.point(center.x + style.width / 2, center.y + style.height / 2);
7529975300
}
7530075301
bounds = external_L_default.a.bounds(p1, p2);
7530175302
if (bounds.contains(map.latLngToLayerPoint(evt.latlng))) {
75302-
return layer.options.onClick.call(layer, graphics[i]);
75303+
return layer.options.onClick.call(layer, graphics[i],evt);
7530375304
}
7530475305
}
7530575306
},
@@ -75356,7 +75357,7 @@ external_L_default.a.Canvas.include({
7535675357
var point = this._coordinateToPoint(latLng);
7535775358

7535875359
var pt = external_L_default.a.point(point),
75359-
ac = external_L_default.a.point(style.anchor);
75360+
ac = external_L_default.a.point(style.anchor || [width / 2, height / 2]);
7536075361
point = [pt.x - ac.x, pt.y - ac.y];
7536175362

7536275363
//参数分别为:图片,图片裁剪下x,y位置,裁剪长宽,放置在画布的位置x,y, 占取画布长宽
@@ -89584,7 +89585,7 @@ module.exports = function(proj4){
8958489585
/* 74 */
8958589586
/***/ (function(module) {
8958689587

89587-
module.exports = {"_args":[["proj4@2.3.15","D:\\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":"http://registry.npm.taobao.org/proj4/download/proj4-2.3.15.tgz","_spec":"2.3.15","_where":"D:\\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"};
89588+
module.exports = {"_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://localhost:4873/proj4/-/proj4-2.3.15.tgz","_shasum":"5ad06e8bca30be0ffa389a49e4565f51f06d089e","_spec":"proj4@2.3.15","_where":"E:\\2018\\git\\iClient-JavaScript","author":"","bugs":{"url":"https://github.com/proj4js/proj4js/issues"},"bundleDependencies":false,"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"},"deprecated":false,"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"};
8958889589

8958989590
/***/ }),
8959089591
/* 75 */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy