@hpcc-js/map 3.5.4 → 3.5.5
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/LICENSE +43 -43
- package/README.md +88 -88
- package/TopoJSON/BR.json +122 -122
- package/TopoJSON/GB_idx.json +1 -1
- package/TopoJSON/IE_idx.json +1 -1
- package/TopoJSON/ND_idx.json +1 -1
- package/TopoJSON/countries.json +257 -257
- package/TopoJSON/us-counties.json +16550 -16550
- package/TopoJSON/us-states.json +458 -458
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +8 -8
- package/src/CanvasPinLayer.ts +99 -99
- package/src/CanvasPins.ts +397 -397
- package/src/Choropleth.css +26 -26
- package/src/Choropleth.ts +203 -203
- package/src/ChoroplethContinents.ts +13 -13
- package/src/ChoroplethCounties.ts +111 -111
- package/src/ChoroplethCountries.ts +100 -100
- package/src/ChoroplethStates.ts +103 -103
- package/src/ChoroplethStatesHeat.ts +8 -8
- package/src/GMap.css +20 -20
- package/src/GMap.ts +880 -880
- package/src/GMapCounties.ts +93 -93
- package/src/GMapGraph.ts +61 -61
- package/src/GMapHeat.ts +27 -27
- package/src/GMapLayered.ts +94 -94
- package/src/GMapPin.ts +115 -115
- package/src/GMapPinLine.ts +138 -138
- package/src/GeoHash.css +14 -14
- package/src/GeoHash.ts +139 -139
- package/src/Graph.css +9 -9
- package/src/Graph.ts +98 -98
- package/src/Graticule.css +12 -12
- package/src/Graticule.ts +97 -97
- package/src/Heat.ts +87 -87
- package/src/IChoropleth.ts +8 -8
- package/src/Layer.ts +99 -99
- package/src/Layered.css +18 -18
- package/src/Layered.ts +206 -206
- package/src/Lines.css +8 -8
- package/src/Lines.ts +78 -78
- package/src/OpenStreet.css +15 -15
- package/src/OpenStreet.ts +126 -126
- package/src/Pins.css +17 -17
- package/src/Pins.ts +350 -350
- package/src/Projection.ts +42 -42
- package/src/TestHeatMap.ts +8 -8
- package/src/TopoJSONChoropleth.ts +125 -125
- package/src/Utility.ts +484 -484
- package/src/__package__.ts +3 -3
- package/src/index.ts +33 -33
- package/src/leaflet/AlbersPR.ts +48 -48
- package/src/leaflet/Blank.ts +9 -9
- package/src/leaflet/Circles.ts +139 -139
- package/src/leaflet/ClusterCircles.css +26 -26
- package/src/leaflet/ClusterCircles.ts +88 -88
- package/src/leaflet/Countries.ts +43 -43
- package/src/leaflet/DrawLayer.ts +167 -167
- package/src/leaflet/FeatureLayer.ts +138 -138
- package/src/leaflet/GMap.ts +44 -44
- package/src/leaflet/HeatLayer.ts +77 -77
- package/src/leaflet/Icons.ts +60 -60
- package/src/leaflet/Leaflet.css +3 -3
- package/src/leaflet/Leaflet.ts +239 -239
- package/src/leaflet/MapBox.ts +35 -35
- package/src/leaflet/Markers.ts +109 -109
- package/src/leaflet/OpenStreet.ts +27 -27
- package/src/leaflet/Path.ts +138 -138
- package/src/leaflet/Pins.ts +73 -73
- package/src/leaflet/Polygons.ts +113 -113
- package/src/leaflet/Region.ts +138 -138
- package/src/leaflet/Text.ts +99 -99
- package/src/leaflet/TileLayer.ts +81 -81
- package/src/leaflet/TopoJSON.ts +146 -146
- package/src/leaflet/US.ts +15 -15
- package/src/leaflet/USCounties.ts +43 -43
- package/src/leaflet/USStates.ts +41 -41
- package/src/leaflet/World.css +3 -3
- package/src/leaflet/World.ts +172 -172
- package/src/leaflet/index.ts +18 -18
- package/src/leaflet/leaflet-shim.ts +18 -18
- package/src/leaflet/plugins/BeautifyIcon.css +44 -44
- package/src/leaflet/plugins/BeautifyIcon.ts +190 -190
- package/src/leaflet/plugins/BeutifyIcon.licence +20 -20
- package/src/leaflet/plugins/D3SvgOverlay.css +2 -2
- package/src/leaflet/plugins/D3SvgOverlay.licence +20 -20
- package/src/leaflet/plugins/D3SvgOverlay.ts +175 -175
- package/src/leaflet/plugins/HeatLayer.license +21 -21
- package/src/leaflet/plugins/HeatLayer.ts +224 -224
- package/src/leaflet/plugins/Leaflet.GoogleMutant.ts +424 -424
- package/src/leaflet/plugins/lru_map.ts +352 -352
- package/src/test.ts +114 -114
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Leaflet.BeautifyIcon, a plugin that adds colorful iconic markers for Leaflet by giving full control of style to end user, It has also ability to adjust font awesome
|
|
3
|
-
and glyphicon icons
|
|
4
|
-
(c) 2016-2017, Muhammad Arslan Sajid
|
|
5
|
-
http://leafletjs.com
|
|
6
|
-
*/
|
|
7
|
-
.beautify-marker {
|
|
8
|
-
text-align: center;
|
|
9
|
-
font-weight: 700;
|
|
10
|
-
font-family: monospace;
|
|
11
|
-
position: absolute;
|
|
12
|
-
-webkit-box-sizing: border-box;
|
|
13
|
-
-moz-box-sizing: border-box;
|
|
14
|
-
box-sizing: border-box;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.beautify-marker.selected>div {
|
|
18
|
-
outline: none;
|
|
19
|
-
border-color: red;
|
|
20
|
-
box-shadow: 0 0 10px red;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.beautify-marker.circle {
|
|
24
|
-
border-radius: 100%;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.beautify-marker.circle-dot,
|
|
28
|
-
.beautify-marker.doughnut {
|
|
29
|
-
border-radius: 100%;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
.beautify-marker.marker {
|
|
33
|
-
border-top-left-radius: 50%;
|
|
34
|
-
border-top-right-radius: 50% 100%;
|
|
35
|
-
border-bottom-left-radius: 100% 50%;
|
|
36
|
-
border-bottom-right-radius: 0%;
|
|
37
|
-
/* rotating 45deg clockwise to get the corner bottom center */
|
|
38
|
-
transform: rotate(45deg);
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
.beautify-marker.marker>* {
|
|
43
|
-
/* rotating 45deg counterclock to adjust marker content back to normal */
|
|
44
|
-
transform: rotate(-45deg);
|
|
1
|
+
/*
|
|
2
|
+
Leaflet.BeautifyIcon, a plugin that adds colorful iconic markers for Leaflet by giving full control of style to end user, It has also ability to adjust font awesome
|
|
3
|
+
and glyphicon icons
|
|
4
|
+
(c) 2016-2017, Muhammad Arslan Sajid
|
|
5
|
+
http://leafletjs.com
|
|
6
|
+
*/
|
|
7
|
+
.beautify-marker {
|
|
8
|
+
text-align: center;
|
|
9
|
+
font-weight: 700;
|
|
10
|
+
font-family: monospace;
|
|
11
|
+
position: absolute;
|
|
12
|
+
-webkit-box-sizing: border-box;
|
|
13
|
+
-moz-box-sizing: border-box;
|
|
14
|
+
box-sizing: border-box;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.beautify-marker.selected>div {
|
|
18
|
+
outline: none;
|
|
19
|
+
border-color: red;
|
|
20
|
+
box-shadow: 0 0 10px red;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.beautify-marker.circle {
|
|
24
|
+
border-radius: 100%;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.beautify-marker.circle-dot,
|
|
28
|
+
.beautify-marker.doughnut {
|
|
29
|
+
border-radius: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.beautify-marker.marker {
|
|
33
|
+
border-top-left-radius: 50%;
|
|
34
|
+
border-top-right-radius: 50% 100%;
|
|
35
|
+
border-bottom-left-radius: 100% 50%;
|
|
36
|
+
border-bottom-right-radius: 0%;
|
|
37
|
+
/* rotating 45deg clockwise to get the corner bottom center */
|
|
38
|
+
transform: rotate(45deg);
|
|
39
|
+
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.beautify-marker.marker>* {
|
|
43
|
+
/* rotating 45deg counterclock to adjust marker content back to normal */
|
|
44
|
+
transform: rotate(-45deg);
|
|
45
45
|
}
|
|
@@ -1,190 +1,190 @@
|
|
|
1
|
-
import { Icon, point, Util } from "leaflet";
|
|
2
|
-
|
|
3
|
-
import "./BeautifyIcon.css";
|
|
4
|
-
|
|
5
|
-
/* Ported from https://github.com/marslan390/BeautifyMarker
|
|
6
|
-
Changes:
|
|
7
|
-
* Ported to TypeScript
|
|
8
|
-
* Added @hpcc-js "selection" support
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
const defaults = {
|
|
12
|
-
|
|
13
|
-
iconColor: "#1EB300",
|
|
14
|
-
|
|
15
|
-
iconAnchor: {
|
|
16
|
-
"marker": [14, 34]
|
|
17
|
-
, "circle": [11, 10]
|
|
18
|
-
, "circle-dot": [5, 5]
|
|
19
|
-
, "rectangle-dot": [5, 6]
|
|
20
|
-
, "doughnut": [8, 8]
|
|
21
|
-
},
|
|
22
|
-
|
|
23
|
-
popupAnchor: {
|
|
24
|
-
"marker": [0, -25]
|
|
25
|
-
, "circle": [-3, -76]
|
|
26
|
-
, "circle-dot": [0, -2]
|
|
27
|
-
, "rectangle-dot": [0, -2]
|
|
28
|
-
, "doughnut": [0, -2]
|
|
29
|
-
},
|
|
30
|
-
|
|
31
|
-
innerIconAnchor: {
|
|
32
|
-
marker: [-2, 5]
|
|
33
|
-
, circle: [0, 2]
|
|
34
|
-
},
|
|
35
|
-
|
|
36
|
-
iconSize: {
|
|
37
|
-
"marker": [28, 28]
|
|
38
|
-
, "circle": [22, 22]
|
|
39
|
-
, "circle-dot": [2, 2]
|
|
40
|
-
, "rectangle-dot": [2, 2]
|
|
41
|
-
, "doughnut": [15, 15]
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
const IconClass = Icon.extend({
|
|
46
|
-
|
|
47
|
-
options: {
|
|
48
|
-
icon: "leaf"
|
|
49
|
-
, iconSize: defaults.iconSize.circle
|
|
50
|
-
, iconAnchor: defaults.iconAnchor.marker
|
|
51
|
-
, iconShape: "marker"
|
|
52
|
-
, iconStyle: ""
|
|
53
|
-
, innerIconAnchor: [0, 3] // circle with fa or glyphicon or marker with text
|
|
54
|
-
, innerIconStyle: ""
|
|
55
|
-
, isAlphaNumericIcon: false
|
|
56
|
-
, text: 1
|
|
57
|
-
, borderColor: defaults.iconColor
|
|
58
|
-
, borderWidth: 2
|
|
59
|
-
, borderStyle: "solid"
|
|
60
|
-
, backgroundColor: "white"
|
|
61
|
-
, textColor: defaults.iconColor
|
|
62
|
-
, customClasses: ""
|
|
63
|
-
, spin: false
|
|
64
|
-
, prefix: "fa"
|
|
65
|
-
, html: ""
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
initialize(options) {
|
|
69
|
-
|
|
70
|
-
this.applyDefaults(options);
|
|
71
|
-
this.options = (!options || !options.html) ? Util.setOptions(this, options) : options;
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
applyDefaults(options) {
|
|
75
|
-
|
|
76
|
-
if (options) {
|
|
77
|
-
if (!options.iconSize && options.iconShape) {
|
|
78
|
-
options.iconSize = defaults.iconSize[options.iconShape];
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
if (!options.iconAnchor && options.iconShape) {
|
|
82
|
-
options.iconAnchor = defaults.iconAnchor[options.iconShape];
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (!options.popupAnchor && options.iconShape) {
|
|
86
|
-
options.popupAnchor = defaults.popupAnchor[options.iconShape];
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
if (!options.innerIconAnchor) {
|
|
90
|
-
// if icon is type of circle or marker
|
|
91
|
-
if (options.iconShape === "circle" || options.iconShape === "marker") {
|
|
92
|
-
if (options.iconShape === "circle" && options.isAlphaNumericIcon) { // if circle with text
|
|
93
|
-
options.innerIconAnchor = [0, -1];
|
|
94
|
-
} else if (options.iconShape === "marker" && !options.isAlphaNumericIcon) {// marker with icon
|
|
95
|
-
options.innerIconAnchor = defaults.innerIconAnchor[options.iconShape];
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
createIcon() {
|
|
103
|
-
|
|
104
|
-
const iconDiv = document.createElement("div");
|
|
105
|
-
const options = this.options;
|
|
106
|
-
|
|
107
|
-
iconDiv.innerHTML = !options.html ? this.createIconInnerHtml() : options.html;
|
|
108
|
-
this._setIconStyles(iconDiv);
|
|
109
|
-
|
|
110
|
-
// having a marker requires an extra parent div for rotation correction
|
|
111
|
-
if (this.options.iconShape === "marker") {
|
|
112
|
-
const wrapperDiv = document.createElement("div");
|
|
113
|
-
wrapperDiv.className = "beautify-marker" + (options.props.owner._currSelRow === options.props.row ? " selected" : "");
|
|
114
|
-
wrapperDiv.appendChild(iconDiv);
|
|
115
|
-
return wrapperDiv;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
return iconDiv;
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
createIconInnerHtml() {
|
|
122
|
-
|
|
123
|
-
const options = this.options;
|
|
124
|
-
|
|
125
|
-
if (options.iconShape === "circle-dot" || options.iconShape === "rectangle-dot" || options.iconShape === "doughnut") {
|
|
126
|
-
return "";
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
const innerIconStyle = this.getInnerIconStyle(options);
|
|
130
|
-
if (options.isAlphaNumericIcon) {
|
|
131
|
-
return '<div style="' + innerIconStyle + '">' + options.text + "</div>";
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
let spinClass = "";
|
|
135
|
-
if (options.spin) {
|
|
136
|
-
spinClass = " fa-spin";
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
return '<i class="' + options.prefix + " " + options.icon + spinClass + '" style="' + innerIconStyle + '"></i>';
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
getInnerIconStyle(options) {
|
|
143
|
-
|
|
144
|
-
const innerAnchor = point(options.innerIconAnchor);
|
|
145
|
-
return "color:" + options.textColor + ";margin-top:" + innerAnchor.y + "px; margin-left:" + innerAnchor.x + "px;" + options.innerIconStyle;
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
_setIconStyles(iconDiv) {
|
|
149
|
-
|
|
150
|
-
const options = this.options;
|
|
151
|
-
const size = point(options.iconSize);
|
|
152
|
-
const anchor = point(options.iconAnchor);
|
|
153
|
-
|
|
154
|
-
iconDiv.className = "beautify-marker ";
|
|
155
|
-
|
|
156
|
-
if (options.iconShape) {
|
|
157
|
-
iconDiv.className += options.iconShape;
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
if (options.customClasses) {
|
|
161
|
-
iconDiv.className += " " + options.customClasses;
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
iconDiv.style.backgroundColor = options.backgroundColor;
|
|
165
|
-
iconDiv.style.color = options.textColor;
|
|
166
|
-
iconDiv.style.borderColor = options.borderColor;
|
|
167
|
-
iconDiv.style.borderWidth = options.borderWidth + "px";
|
|
168
|
-
iconDiv.style.borderStyle = options.borderStyle;
|
|
169
|
-
|
|
170
|
-
if (size) {
|
|
171
|
-
iconDiv.style.width = size.x + "px";
|
|
172
|
-
iconDiv.style.height = size.y + "px";
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
if (anchor) {
|
|
176
|
-
iconDiv.style.marginLeft = (-anchor.x) + "px";
|
|
177
|
-
iconDiv.style.marginTop = (-anchor.y) + "px";
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
if (options.iconStyle) {
|
|
181
|
-
let cStyle = iconDiv.getAttribute("style");
|
|
182
|
-
cStyle += options.iconStyle;
|
|
183
|
-
iconDiv.setAttribute("style", cStyle);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
export function BeautifyIcon(options) {
|
|
189
|
-
return new (IconClass as any)(options);
|
|
190
|
-
}
|
|
1
|
+
import { Icon, point, Util } from "leaflet";
|
|
2
|
+
|
|
3
|
+
import "./BeautifyIcon.css";
|
|
4
|
+
|
|
5
|
+
/* Ported from https://github.com/marslan390/BeautifyMarker
|
|
6
|
+
Changes:
|
|
7
|
+
* Ported to TypeScript
|
|
8
|
+
* Added @hpcc-js "selection" support
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const defaults = {
|
|
12
|
+
|
|
13
|
+
iconColor: "#1EB300",
|
|
14
|
+
|
|
15
|
+
iconAnchor: {
|
|
16
|
+
"marker": [14, 34]
|
|
17
|
+
, "circle": [11, 10]
|
|
18
|
+
, "circle-dot": [5, 5]
|
|
19
|
+
, "rectangle-dot": [5, 6]
|
|
20
|
+
, "doughnut": [8, 8]
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
popupAnchor: {
|
|
24
|
+
"marker": [0, -25]
|
|
25
|
+
, "circle": [-3, -76]
|
|
26
|
+
, "circle-dot": [0, -2]
|
|
27
|
+
, "rectangle-dot": [0, -2]
|
|
28
|
+
, "doughnut": [0, -2]
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
innerIconAnchor: {
|
|
32
|
+
marker: [-2, 5]
|
|
33
|
+
, circle: [0, 2]
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
iconSize: {
|
|
37
|
+
"marker": [28, 28]
|
|
38
|
+
, "circle": [22, 22]
|
|
39
|
+
, "circle-dot": [2, 2]
|
|
40
|
+
, "rectangle-dot": [2, 2]
|
|
41
|
+
, "doughnut": [15, 15]
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const IconClass = Icon.extend({
|
|
46
|
+
|
|
47
|
+
options: {
|
|
48
|
+
icon: "leaf"
|
|
49
|
+
, iconSize: defaults.iconSize.circle
|
|
50
|
+
, iconAnchor: defaults.iconAnchor.marker
|
|
51
|
+
, iconShape: "marker"
|
|
52
|
+
, iconStyle: ""
|
|
53
|
+
, innerIconAnchor: [0, 3] // circle with fa or glyphicon or marker with text
|
|
54
|
+
, innerIconStyle: ""
|
|
55
|
+
, isAlphaNumericIcon: false
|
|
56
|
+
, text: 1
|
|
57
|
+
, borderColor: defaults.iconColor
|
|
58
|
+
, borderWidth: 2
|
|
59
|
+
, borderStyle: "solid"
|
|
60
|
+
, backgroundColor: "white"
|
|
61
|
+
, textColor: defaults.iconColor
|
|
62
|
+
, customClasses: ""
|
|
63
|
+
, spin: false
|
|
64
|
+
, prefix: "fa"
|
|
65
|
+
, html: ""
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
initialize(options) {
|
|
69
|
+
|
|
70
|
+
this.applyDefaults(options);
|
|
71
|
+
this.options = (!options || !options.html) ? Util.setOptions(this, options) : options;
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
applyDefaults(options) {
|
|
75
|
+
|
|
76
|
+
if (options) {
|
|
77
|
+
if (!options.iconSize && options.iconShape) {
|
|
78
|
+
options.iconSize = defaults.iconSize[options.iconShape];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if (!options.iconAnchor && options.iconShape) {
|
|
82
|
+
options.iconAnchor = defaults.iconAnchor[options.iconShape];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
if (!options.popupAnchor && options.iconShape) {
|
|
86
|
+
options.popupAnchor = defaults.popupAnchor[options.iconShape];
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
if (!options.innerIconAnchor) {
|
|
90
|
+
// if icon is type of circle or marker
|
|
91
|
+
if (options.iconShape === "circle" || options.iconShape === "marker") {
|
|
92
|
+
if (options.iconShape === "circle" && options.isAlphaNumericIcon) { // if circle with text
|
|
93
|
+
options.innerIconAnchor = [0, -1];
|
|
94
|
+
} else if (options.iconShape === "marker" && !options.isAlphaNumericIcon) {// marker with icon
|
|
95
|
+
options.innerIconAnchor = defaults.innerIconAnchor[options.iconShape];
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
|
|
102
|
+
createIcon() {
|
|
103
|
+
|
|
104
|
+
const iconDiv = document.createElement("div");
|
|
105
|
+
const options = this.options;
|
|
106
|
+
|
|
107
|
+
iconDiv.innerHTML = !options.html ? this.createIconInnerHtml() : options.html;
|
|
108
|
+
this._setIconStyles(iconDiv);
|
|
109
|
+
|
|
110
|
+
// having a marker requires an extra parent div for rotation correction
|
|
111
|
+
if (this.options.iconShape === "marker") {
|
|
112
|
+
const wrapperDiv = document.createElement("div");
|
|
113
|
+
wrapperDiv.className = "beautify-marker" + (options.props.owner._currSelRow === options.props.row ? " selected" : "");
|
|
114
|
+
wrapperDiv.appendChild(iconDiv);
|
|
115
|
+
return wrapperDiv;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
return iconDiv;
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
createIconInnerHtml() {
|
|
122
|
+
|
|
123
|
+
const options = this.options;
|
|
124
|
+
|
|
125
|
+
if (options.iconShape === "circle-dot" || options.iconShape === "rectangle-dot" || options.iconShape === "doughnut") {
|
|
126
|
+
return "";
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
const innerIconStyle = this.getInnerIconStyle(options);
|
|
130
|
+
if (options.isAlphaNumericIcon) {
|
|
131
|
+
return '<div style="' + innerIconStyle + '">' + options.text + "</div>";
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
let spinClass = "";
|
|
135
|
+
if (options.spin) {
|
|
136
|
+
spinClass = " fa-spin";
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
return '<i class="' + options.prefix + " " + options.icon + spinClass + '" style="' + innerIconStyle + '"></i>';
|
|
140
|
+
},
|
|
141
|
+
|
|
142
|
+
getInnerIconStyle(options) {
|
|
143
|
+
|
|
144
|
+
const innerAnchor = point(options.innerIconAnchor);
|
|
145
|
+
return "color:" + options.textColor + ";margin-top:" + innerAnchor.y + "px; margin-left:" + innerAnchor.x + "px;" + options.innerIconStyle;
|
|
146
|
+
},
|
|
147
|
+
|
|
148
|
+
_setIconStyles(iconDiv) {
|
|
149
|
+
|
|
150
|
+
const options = this.options;
|
|
151
|
+
const size = point(options.iconSize);
|
|
152
|
+
const anchor = point(options.iconAnchor);
|
|
153
|
+
|
|
154
|
+
iconDiv.className = "beautify-marker ";
|
|
155
|
+
|
|
156
|
+
if (options.iconShape) {
|
|
157
|
+
iconDiv.className += options.iconShape;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if (options.customClasses) {
|
|
161
|
+
iconDiv.className += " " + options.customClasses;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
iconDiv.style.backgroundColor = options.backgroundColor;
|
|
165
|
+
iconDiv.style.color = options.textColor;
|
|
166
|
+
iconDiv.style.borderColor = options.borderColor;
|
|
167
|
+
iconDiv.style.borderWidth = options.borderWidth + "px";
|
|
168
|
+
iconDiv.style.borderStyle = options.borderStyle;
|
|
169
|
+
|
|
170
|
+
if (size) {
|
|
171
|
+
iconDiv.style.width = size.x + "px";
|
|
172
|
+
iconDiv.style.height = size.y + "px";
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
if (anchor) {
|
|
176
|
+
iconDiv.style.marginLeft = (-anchor.x) + "px";
|
|
177
|
+
iconDiv.style.marginTop = (-anchor.y) + "px";
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
if (options.iconStyle) {
|
|
181
|
+
let cStyle = iconDiv.getAttribute("style");
|
|
182
|
+
cStyle += options.iconStyle;
|
|
183
|
+
iconDiv.setAttribute("style", cStyle);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
|
|
188
|
+
export function BeautifyIcon(options) {
|
|
189
|
+
return new (IconClass as any)(options);
|
|
190
|
+
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2016 Muhammad Arslan Sajid
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2016 Muhammad Arslan Sajid
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
g.d3-overlay * {
|
|
2
|
-
pointer-events: visiblePainted;
|
|
1
|
+
g.d3-overlay * {
|
|
2
|
+
pointer-events: visiblePainted;
|
|
3
3
|
}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2014 Teralytics AG
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014 Teralytics AG
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
21
|
THE SOFTWARE.
|