Skip to content

Commit d70246c

Browse files
committed
【fix】修复leaflet graphics remove所有要素后不会刷新的问题 优化代码质量
1 parent 2c2bc8f commit d70246c

28 files changed

+478
-353
lines changed

dist/leaflet/iclient9-leaflet-es6.js

Lines changed: 114 additions & 74 deletions
Large diffs are not rendered by default.

dist/leaflet/iclient9-leaflet-es6.min.js

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/leaflet/iclient9-leaflet.js

Lines changed: 111 additions & 73 deletions
Large diffs are not rendered by default.

dist/leaflet/iclient9-leaflet.min.js

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/common/commontypes/geometry/LineString.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ export class LineString extends Curve {
265265
static createLineEPS(points) {
266266
var list = [],
267267
len = points.length;
268-
if (points == null || len < 2) {
268+
if (len < 2) {
269269
return points;
270270
}
271271
for (var i = 0; i < len;) {

src/common/iServer/ChartQueryService.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,9 @@ export class ChartQueryService extends CommonServiceBase {
6868
*/
6969
this.format = DataFormat.GEOJSON;
7070

71-
if (options) {
72-
Util.extend(this, options);
73-
}
71+
Util.extend(this, options);
7472
var me = this, end;
75-
if (options && options.format) {
73+
if (options.format) {
7674
me.format = options.format.toUpperCase();
7775
}
7876

src/common/iServer/CommonServiceBase.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,7 @@ export class CommonServiceBase {
101101

102102
options = options || {};
103103

104-
if (options) {
105-
Util.extend(this, options);
106-
}
104+
Util.extend(this, options);
107105

108106
me.isInTheSameDomain = Util.isInTheSameDomain(me.url);
109107

src/common/iServer/DataFlowService.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ export class DataFlowService extends CommonServiceBase {
5454
if (end !== '/') {
5555
me.url += "/";
5656
}
57-
if (options) {
58-
Util.extend(me, options);
59-
}
57+
Util.extend(me, options);
6058

6159
this.CLASS_NAME = "SuperMap.DataFlowService";
6260
}
@@ -202,7 +200,7 @@ export class DataFlowService extends CommonServiceBase {
202200

203201

204202
_onMessage(e) {
205-
if (e.data && e.data.indexOf("filterParam") > 0) {
203+
if (e.data && e.data.indexOf("filterParam") >= 0) {
206204
var filterParam = JSON.parse(e.data);
207205
e.filterParam = filterParam;
208206
e.eventType = 'setFilterParamSuccessed';

src/common/iServer/GetFeaturesServiceBase.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,9 @@ export class GetFeaturesServiceBase extends CommonServiceBase {
6767
*/
6868
this.format = DataFormat.GEOJSON;
6969

70-
if (options) {
71-
Util.extend(this, options);
72-
}
70+
Util.extend(this, options);
7371
var me = this, end;
74-
if (options && options.format) {
72+
if (options.format) {
7573
me.format = options.format.toUpperCase();
7674
}
7775

src/common/overlay/levelRenderer/Easing.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export class Easing {
302302
if (k === 1) {
303303
return 1;
304304
}
305-
if (!a || a < 1) {
305+
if (a < 1) {
306306
a = 1;
307307
s = p / 4;
308308
} else {
@@ -328,7 +328,7 @@ export class Easing {
328328
if (k === 1) {
329329
return 1;
330330
}
331-
if (!a || a < 1) {
331+
if (a < 1) {
332332
a = 1;
333333
s = p / 4;
334334
} else {
@@ -354,7 +354,7 @@ export class Easing {
354354
if (k === 1) {
355355
return 1;
356356
}
357-
if (!a || a < 1) {
357+
if (a < 1) {
358358
a = 1;
359359
s = p / 4;
360360
} else {

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