19 lines
493 B
Plaintext
19 lines
493 B
Plaintext
JQVMap.prototype.select = function (cc, path) {
|
|
cc = cc.toLowerCase();
|
|
path = path || jQuery('#' + this.getCountryId(cc))[0];
|
|
|
|
if (!this.isSelected(cc)) {
|
|
if (this.multiSelectRegion) {
|
|
this.selectedRegions.push(cc);
|
|
} else {
|
|
this.selectedRegions = [cc];
|
|
}
|
|
|
|
jQuery(this.container).trigger('regionSelect.jqvmap', [cc]);
|
|
if (this.selectedColor && path) {
|
|
path.currentFillColor = this.selectedColor;
|
|
path.setFill(this.selectedColor);
|
|
}
|
|
}
|
|
};
|