Skip to content

Commit ca696d0

Browse files
committed
fix UT & 更改文档注释
1 parent 2b5209d commit ca696d0

File tree

5 files changed

+22
-23
lines changed

5 files changed

+22
-23
lines changed

dist/iclient9-leaflet.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55436,17 +55436,17 @@ var CanvasRenderer = exports.CanvasRenderer = _leaflet2["default"].Canvas.extend
5543655436

5543755437
/**
5543855438
* @function L.supermap.CanvasRenderer.prototype.addTo
55439-
* @description 添加到切片地图
55440-
* @param map - {L.map} 切片地图
55439+
* @description 添加到地图
55440+
* @param map - {L.map} map对象
5544155441
*/
5544255442
addTo: function addTo(map) {
5544355443
this._map = map;
5544455444
},
5544555445

5544655446
/**
5544755447
* @function L.supermap.CanvasRenderer.prototype.removeFrom
55448-
* @description 删除切片地图
55449-
* @param map - {L.map} 切片地图
55448+
* @description 从地图移除
55449+
* @param map - {L.map} map对象
5545055450
*/
5545155451
removeFrom: function removeFrom(map) {
5545255452
// eslint-disable-line no-unused-vars
@@ -55582,8 +55582,8 @@ var SVGRenderer = exports.SVGRenderer = _leaflet2["default"].SVG.extend({
5558255582

5558355583
/**
5558455584
* @function L.supermap.SVGRenderer.prototype.addTo
55585-
* @description 添加到切片地图
55586-
* @param map - {L.map} 切片地图
55585+
* @description 添加到地图
55586+
* @param map - {L.map} map对象
5558755587
*/
5558855588
addTo: function addTo(map) {
5558955589
this._map = map;
@@ -55598,8 +55598,8 @@ var SVGRenderer = exports.SVGRenderer = _leaflet2["default"].SVG.extend({
5559855598

5559955599
/**
5560055600
* @function L.supermap.SVGRenderer.prototype.removeFrom
55601-
* @description 删除切片地图
55602-
* @param map - {L.map} 切片地图
55601+
* @description 从地图移除
55602+
* @param map - {L.map} map对象
5560355603
*/
5560455604
removeFrom: function removeFrom(map) {
5560555605
var _map = map || this._map;
@@ -96143,7 +96143,7 @@ exports.names = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"];
9614396143
/* 545 */
9614496144
/***/ (function(module, exports) {
9614596145

96146-
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://registry.npm.taobao.org/proj4/download/proj4-2.3.15.tgz","_shasum":"5ad06e8bca30be0ffa389a49e4565f51f06d089e","_spec":"proj4@2.3.15","_where":"F:\\codes\\iClient9","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"}
96146+
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://registry.npm.taobao.org/proj4/download/proj4-2.3.15.tgz","_shasum":"5ad06e8bca30be0ffa389a49e4565f51f06d089e","_spec":"proj4@2.3.15","_where":"F:\\dev\\iClient","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"}
9614796147

9614896148
/***/ }),
9614996149
/* 546 */

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.

src/leaflet/overlay/vectortile/CanvasRenderer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,17 @@ export var CanvasRenderer = L.Canvas.extend({
5656

5757
/**
5858
* @function L.supermap.CanvasRenderer.prototype.addTo
59-
* @description 添加到切片地图
60-
* @param map - {L.map} 切片地图
59+
* @description 添加到地图
60+
* @param map - {L.map} map对象
6161
*/
6262
addTo: function (map) {
6363
this._map = map;
6464
},
6565

6666
/**
6767
* @function L.supermap.CanvasRenderer.prototype.removeFrom
68-
* @description 删除切片地图
69-
* @param map - {L.map} 切片地图
68+
* @description 从地图移除
69+
* @param map - {L.map} map对象
7070
*/
7171
removeFrom: function (map) { // eslint-disable-line no-unused-vars
7272
delete this._map;

src/leaflet/overlay/vectortile/SVGRenderer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export var SVGRenderer = L.SVG.extend({
4444

4545
/**
4646
* @function L.supermap.SVGRenderer.prototype.addTo
47-
* @description 添加到切片地图
48-
* @param map - {L.map} 切片地图
47+
* @description 添加到地图
48+
* @param map - {L.map} map对象
4949
*/
5050
addTo: function (map) {
5151
this._map = map;
@@ -60,8 +60,8 @@ export var SVGRenderer = L.SVG.extend({
6060

6161
/**
6262
* @function L.supermap.SVGRenderer.prototype.removeFrom
63-
* @description 删除切片地图
64-
* @param map - {L.map} 切片地图
63+
* @description 从地图移除
64+
* @param map - {L.map} map对象
6565
*/
6666
removeFrom: function (map) {
6767
var _map = map || this._map;

test/leaflet/overlay/vectortile/TextSymbolizerSpec.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ describe('leaflet_TextSymbolizer', function () {
171171
});
172172

173173
//CanvasRenderer
174-
xit('render, makeInteractive, updateStyle', function () {
174+
it('render, makeInteractive, updateStyle', function () {
175175
var canvasRenderer = new CanvasRenderer({x: 1686, y: 755, Z: 10}, {x: 256, y: 256}, {interactive: true});
176176
var feature = {
177177
geometry: [{x: 10, y: 10, type: "Point"}],
@@ -183,8 +183,10 @@ describe('leaflet_TextSymbolizer', function () {
183183
var style = {
184184
interactive: true,
185185
};
186-
var textSymbolizer1 = new TextSymbolizer(feature);
187186
canvasRenderer.addTo(map);
187+
188+
var textSymbolizer1 = new TextSymbolizer(feature);
189+
188190
spyOn(textSymbolizer1, '_updateBounds').and.callThrough();
189191
textSymbolizer1.render(canvasRenderer, style);
190192
textSymbolizer1.makeInteractive();
@@ -196,9 +198,6 @@ describe('leaflet_TextSymbolizer', function () {
196198
expect(tileCoord.x).toEqual(1686);
197199
expect(tileCoord.y).toEqual(755);
198200
expect(tileCoord.Z).toEqual(10);
199-
canvasRenderer.removeFrom(map);
200-
expect(canvasRenderer._map).toBeUndefined();
201201
});
202-
203202
});
204203

0 commit comments

Comments
 (0)