d3.select(this).attr("cx");
function mouseover(d) { var selection = d3.select(this), sellectionInside = d3.selectAll(".innerCircle").filter(function (d) { return d === selection.datum() }) selection.transition().attr("r", 20).style("opacity", .3) .style("fill", "white") .style("stroke", "blue") .style("stroke-width", 3) .each("end.inside", function () { sellectionInside.transition().attr("r", 20) }) } function mouseout(d) { var selection = d3.select(this), sellectionInside = d3.selectAll(".innerCircle").filter(function (d) { return d === selection.datum() }) selection.transition() .attr("r", 10) .style("opacity", 1) .style("fill", "green") .style("stroke", "green") .style("stroke-width", 1) .each("end.inside", function () { sellectionInside.transition().attr("r", 5) })
--
You received this message because you are subscribed to the Google Groups "d3-js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to d3-js+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
outer.transition()
.call(_trans, "green", 1)
_trans.call(inner.transition, "green", 1)
function _trans(selection,s, w) {
trans.call(this, 1, 1, s, w, "mouseout")
console.log(this === outer.selection) // true
}
function trans(o, fo, s, w, name) {
this
.style("opacity", o)
.style("fill-opacity", fo)
.style("stroke", s)
.style("stroke-width", w)
.ease("sin")
.duration(300)
.each("interrupt", function() {console.log(name + "\tinterrupted*************")})
}
trans.call(this, 0.3, 0, "blue", w, "mouseover")
trans.call(this, 1, 1, s, w, "mouseout")
I'm getting a mixed content error for the jsfiddle example in Chrome. Works in safari though.