Skip to content

Commit 78de6aa

Browse files
committed
Allow to add custom CSS class to areas, plotted points and links
1 parent 42dde82 commit 78de6aa

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

js/jquery.mapael.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,10 @@
425425
}
426426
}
427427

428+
if (elemOptions.cssClass !== undefined) {
429+
$(elem.mapElem.node).addClass(elemOptions.cssClass);
430+
}
431+
428432
$(elem.mapElem.node).attr("data-id", id);
429433
},
430434

@@ -2142,7 +2146,8 @@
21422146
"animDuration": 300
21432147
}
21442148
},
2145-
target: "_self"
2149+
target: "_self",
2150+
cssClass: "area"
21462151
},
21472152
defaultPlot: {
21482153
type: "circle",
@@ -2169,7 +2174,8 @@
21692174
animDuration: 300
21702175
}
21712176
},
2172-
target: "_self"
2177+
target: "_self",
2178+
cssClass: "plot"
21732179
},
21742180
defaultLink: {
21752181
factor: 0.5,
@@ -2192,7 +2198,8 @@
21922198
animDuration: 300
21932199
}
21942200
},
2195-
target: "_self"
2201+
target: "_self",
2202+
cssClass: "link"
21962203
},
21972204
zoom: {
21982205
enabled: false,

0 commit comments

Comments
 (0)