@syncfusion/ej2-maps 20.4.40 → 20.4.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/ej2-maps.min.js +2 -2
- package/dist/ej2-maps.umd.min.js +2 -2
- package/dist/ej2-maps.umd.min.js.map +1 -1
- package/dist/es6/ej2-maps.es2015.js +30 -43
- package/dist/es6/ej2-maps.es2015.js.map +1 -1
- package/dist/es6/ej2-maps.es5.js +30 -43
- package/dist/es6/ej2-maps.es5.js.map +1 -1
- package/dist/global/ej2-maps.min.js +2 -2
- package/dist/global/ej2-maps.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +12 -12
- package/src/maps/layers/legend.d.ts +1 -0
- package/src/maps/layers/legend.js +30 -43
|
@@ -12192,22 +12192,10 @@ class Legend {
|
|
|
12192
12192
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
12193
12193
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
12194
12194
|
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
12195
|
-
|
|
12196
|
-
legendShapeId.setAttribute('fill-opacity', (legendToggleOpacity).toString());
|
|
12197
|
-
legendShapeId.setAttribute('stroke', legendToggleBorderColor);
|
|
12198
|
-
legendShapeId.setAttribute('stroke-width', (legendToggleBorderWidth).toString());
|
|
12199
|
-
legendShapeId.setAttribute('stroke-opacity', (legendToggleBorderOpacity).toString());
|
|
12200
|
-
legendTextId.setAttribute('fill', legendToggleFill);
|
|
12195
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
12201
12196
|
}
|
|
12202
12197
|
else {
|
|
12203
|
-
legendTextId.
|
|
12204
|
-
legendShapeId.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
|
|
12205
|
-
legendShapeId.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
|
|
12206
|
-
legendShapeId.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
12207
|
-
legendShapeId.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
12208
|
-
legendShapeId.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
12209
|
-
this.maps.layers[k].shapeSettings.opacity :
|
|
12210
|
-
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
12198
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[k].shapeSettings.fill);
|
|
12211
12199
|
}
|
|
12212
12200
|
}
|
|
12213
12201
|
}
|
|
@@ -12220,16 +12208,11 @@ class Legend {
|
|
|
12220
12208
|
}
|
|
12221
12209
|
if (targetEle !== null) {
|
|
12222
12210
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
12223
|
-
|
|
12224
|
-
legendShapeId.
|
|
12225
|
-
legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['shapeBorder']['color']);
|
|
12226
|
-
legendShapeId.setAttribute('stroke-width', this.legendCollection[legendIndex]['shapeBorder']['width']);
|
|
12227
|
-
legendShapeId.setAttribute('stroke-opacity', this.legendCollection[legendIndex]['shapeBorder']['opacity']);
|
|
12211
|
+
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
12212
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.legendCollection[legendIndex]['fill'], this.legendCollection[legendIndex]['opacity'], this.legendCollection[legendIndex]['shapeBorder']['color'], this.legendCollection[legendIndex]['shapeBorder']['width'], this.legendCollection[legendIndex]['shapeBorder']['opacity'], '#757575');
|
|
12228
12213
|
if (this.maps.legendSettings.shape === 'HorizontalLine' || this.maps.legendSettings.shape === 'VerticalLine' || this.maps.legendSettings.shape === 'Cross') {
|
|
12229
12214
|
legendShapeId.setAttribute('stroke', this.legendCollection[legendIndex]['fill']);
|
|
12230
12215
|
}
|
|
12231
|
-
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
12232
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
12233
12216
|
}
|
|
12234
12217
|
}
|
|
12235
12218
|
}
|
|
@@ -12276,9 +12259,13 @@ class Legend {
|
|
|
12276
12259
|
}
|
|
12277
12260
|
if (targetEle !== null) {
|
|
12278
12261
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
12279
|
-
legendTextId.setAttribute('fill', '#E5E5E5');
|
|
12280
12262
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
12281
|
-
|
|
12263
|
+
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
12264
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
12265
|
+
}
|
|
12266
|
+
else {
|
|
12267
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[j].shapeSettings.fill, this.maps.layers[j].shapeSettings.opacity, this.maps.layers[j].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.width) ? 0 : this.maps.layers[j].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[j].shapeSettings.border.opacity) ? this.maps.layers[j].shapeSettings.opacity : this.maps.layers[j].shapeSettings.border.opacity, this.maps.layers[j].shapeSettings.fill);
|
|
12268
|
+
}
|
|
12282
12269
|
}
|
|
12283
12270
|
}
|
|
12284
12271
|
else {
|
|
@@ -12297,9 +12284,8 @@ class Legend {
|
|
|
12297
12284
|
layerElement.setAttribute('stroke', this.maps.layers[j].shapeSettings.border.color);
|
|
12298
12285
|
if (targetEle !== null) {
|
|
12299
12286
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Text_Index_' + legendIndex, this.maps.element.id);
|
|
12300
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
12301
12287
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Shape_Index_' + legendIndex, this.maps.element.id);
|
|
12302
|
-
legendShapeId.
|
|
12288
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.legendCollection[legendIndex]['fill'], this.legendCollection[legendIndex]['opacity'], this.legendCollection[legendIndex]['shapeBorder']['color'], this.legendCollection[legendIndex]['shapeBorder']['width'], this.legendCollection[legendIndex]['shapeBorder']['opacity'], '#757575');
|
|
12303
12289
|
}
|
|
12304
12290
|
}
|
|
12305
12291
|
}
|
|
@@ -12353,22 +12339,10 @@ class Legend {
|
|
|
12353
12339
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
12354
12340
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
12355
12341
|
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
12356
|
-
|
|
12357
|
-
legendShapeId.setAttribute('fill', legendToggleFill);
|
|
12358
|
-
legendShapeId.setAttribute('fill-opacity', (legendToggleOpacity).toString());
|
|
12359
|
-
legendShapeId.setAttribute('stroke', legendToggleBorderColor);
|
|
12360
|
-
legendShapeId.setAttribute('stroke-width', (legendToggleBorderWidth).toString());
|
|
12361
|
-
legendShapeId.setAttribute('stroke-opacity', (legendToggleBorderOpacity).toString());
|
|
12342
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
12362
12343
|
}
|
|
12363
12344
|
else {
|
|
12364
|
-
legendTextId.
|
|
12365
|
-
legendShapeId.setAttribute('fill', this.maps.layers[k].shapeSettings.fill);
|
|
12366
|
-
legendShapeId.setAttribute('stroke', this.maps.layers[k].shapeSettings.border.color);
|
|
12367
|
-
legendShapeId.setAttribute('stroke-width', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width).toString());
|
|
12368
|
-
legendShapeId.setAttribute('stroke-opacity', (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ?
|
|
12369
|
-
this.maps.layers[k].shapeSettings.opacity :
|
|
12370
|
-
this.maps.layers[k].shapeSettings.border.opacity).toString());
|
|
12371
|
-
legendShapeId.setAttribute('fill-opacity', (this.maps.layers[k].shapeSettings.opacity).toString());
|
|
12345
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[k].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[k].shapeSettings.border.color, (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width), (isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity), this.maps.layers[k].shapeSettings.fill);
|
|
12372
12346
|
}
|
|
12373
12347
|
}
|
|
12374
12348
|
}
|
|
@@ -12434,9 +12408,13 @@ class Legend {
|
|
|
12434
12408
|
}
|
|
12435
12409
|
if (targetEle !== null) {
|
|
12436
12410
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
12437
|
-
legendShapeId.setAttribute('fill', '#E5E5E5');
|
|
12438
12411
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
12439
|
-
|
|
12412
|
+
if (!this.maps.legendSettings.toggleLegendSettings.applyShapeSettings) {
|
|
12413
|
+
this.setToggleAttributes(legendTextId, legendShapeId, legendToggleFill, legendToggleOpacity, legendToggleBorderColor, legendToggleBorderWidth, legendToggleBorderOpacity, legendToggleFill);
|
|
12414
|
+
}
|
|
12415
|
+
else {
|
|
12416
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.maps.layers[0].shapeSettings.fill, this.maps.layers[k].shapeSettings.opacity, this.maps.layers[0].shapeSettings.border.color, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.width) ? 0 : this.maps.layers[k].shapeSettings.border.width, isNullOrUndefined(this.maps.layers[k].shapeSettings.border.opacity) ? this.maps.layers[k].shapeSettings.opacity : this.maps.layers[k].shapeSettings.border.opacity, this.maps.layers[0].shapeSettings.fill);
|
|
12417
|
+
}
|
|
12440
12418
|
}
|
|
12441
12419
|
}
|
|
12442
12420
|
else {
|
|
@@ -12456,9 +12434,8 @@ class Legend {
|
|
|
12456
12434
|
mapLegendElement.setAttribute('fill', this.legendCollection[legendIndex]['fill']);
|
|
12457
12435
|
if (targetEle !== null) {
|
|
12458
12436
|
legendTextId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex + '_Text', this.maps.element.id);
|
|
12459
|
-
legendTextId.setAttribute('fill', '#757575');
|
|
12460
12437
|
legendShapeId = querySelector(this.maps.element.id + '_Legend_Index_' + legendIndex, this.maps.element.id);
|
|
12461
|
-
legendShapeId.
|
|
12438
|
+
this.setToggleAttributes(legendTextId, legendShapeId, this.legendCollection[legendIndex]['fill'], this.legendCollection[legendIndex]['opacity'], this.legendCollection[legendIndex]['shapeBorder']['color'], this.legendCollection[legendIndex]['shapeBorder']['width'], this.legendCollection[legendIndex]['shapeBorder']['opacity'], '#757575');
|
|
12462
12439
|
}
|
|
12463
12440
|
}
|
|
12464
12441
|
}
|
|
@@ -12535,6 +12512,16 @@ class Legend {
|
|
|
12535
12512
|
}
|
|
12536
12513
|
return legendData;
|
|
12537
12514
|
}
|
|
12515
|
+
setToggleAttributes(textElement, shapeElement, fillColor, fillOpacity, borderColor, borderWidth, borderOpacity, textColor) {
|
|
12516
|
+
textElement.setAttribute('fill', textColor);
|
|
12517
|
+
shapeElement.setAttribute('fill', fillColor);
|
|
12518
|
+
shapeElement.setAttribute('fill-opacity', (fillOpacity).toString());
|
|
12519
|
+
shapeElement.setAttribute('stroke', borderColor);
|
|
12520
|
+
shapeElement.setAttribute('stroke-width', (borderWidth).toString());
|
|
12521
|
+
if (!isNullOrUndefined(borderOpacity)) {
|
|
12522
|
+
shapeElement.setAttribute('stroke-opacity', (borderOpacity).toString());
|
|
12523
|
+
}
|
|
12524
|
+
}
|
|
12538
12525
|
legendGradientColor(colorMap, legendIndex) {
|
|
12539
12526
|
let legendFillColor;
|
|
12540
12527
|
const xmlns = 'http://www.w3.org/2000/svg';
|