So I am trying to disable the zoom option in my Map when a user clicks on a map region, using the event handlers it works well for the attributtes like color and so, but not working to disable the zoom.
/* ... */
, defaultArea: {
attrs : {
fill : "#28282b"
//, stroke: "#474c4b"
}
, attrsHover : {
fill: "#3da879"
}
, text : {
attrs : {
fill : "#6d6d6d"
}
, attrsHover : {
fill : "#fff"
}
}
,eventHandlers: {
click: function (e, id, mapElem, textElem,elemOptions) {
var newData = {
'areas': {}
,'zoom': {}
};
if (mapElem.originalAttrs.fill == "#28282b") {
newData.areas[id] = {
attrs: {
fill: "#3da879"
}
, text : {
attrs : {
fill : "#fff"
}
, attrsHover : {
fill : "#fff"
}
}
};
newData.zoom[id] = {
enabled : false,
maxLevel : 10
};
} else {
newData.areas[id] = {
attrs: {
fill: "#28282b"
}
, text : {
attrs : {
fill : "#6d6d6d"
}
, attrsHover : {
fill : "#fff"
}
}
};
}
$(".mapcontainer").trigger('update', [newData]);
}
}
/* ... */