eventGroup.select("circle")
.attr("class", "dot")
.attr("r", 4)
.attr("cx", 10)
.attr("cy", 10)
.attr("fill", function(d) {
if (d.textArea) {
return "url(#annotateIcon)";
} else {
if (d.evtColor) {
return d.evtColor;
} else {
return "#229ae5";
}
}
})
.attr("stroke", function(d) { return d.evtColor ? d.evtColor : "#229ae5"; })
.attr("stroke-width", 2)
.on("contextmenu", function(d) {
var position = d3.mouse(this.parentNode);
var _this = this;
var boxPosition;
var positionValue;
var xPosition = this.getBoundingClientRect().x;
d3.event.stopPropagation();// to avoid over-ridding of click event on the chart background
}
Is there any other way of doing this that will not cause this behavior to occur ? Is my approach to solve the clash of the event behavior correct ?