[jquery.mapael.js V2.2.0中有很多新功能/修改过的功能,现在我有些麻烦。
所需过程:(+ =收到,-=需要帮助)
显示美国地图和一些按钮,例如10/2019(在示例中,它只是一个链接)+
一个按钮'mouseover'显示:
鼠标移出显示:
按钮上的'mouseclick'打开链接(在示例中是#)+
另见: jsfiddle.net/ygpbzsce /
使用的版本:
Raphael V2.3.0
Mapael V2.2.0
jQuery V3.1.1
Firefox V72.0.2
明白了-我的解决方案:
1)如果不需要动画,请打开自定义脚本并将每个animDuration设置为0(零)
$(".mapcontainer").trigger('update', [{
mapOptions: updatedOptions,
newPlots: newPlots,
deletePlotKeys: false,
animDuration: 0 /* <---set to zero */
}]);
2)如果需要动画,请设置animDuration,打开jquery.mapael.js并搜索_ nonAnimatedAttrs并将“文本”添加到数组中
_nonAnimatedAttrs: [
"arrow-end", "arrow-start", "gradient",
"class", "cursor", "text-anchor",
"font", "font-family", "font-style", "font-weight", "letter-spacing",
"src", "href", "target", "text", "title",
"stroke-dasharray", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit"
],