You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should the this context of property functions be a Node or a singleton selection, as in d3.select(this)? The singleton selection is convenient in some cases, but it does not provide the complete functionality of the W3C DOM API, and extracting the element is a bit awkward: this[0][0].
Also, there are cases where callbacks are associated with individual nodes (such as "mouseover") and other cases where there are multiple nodes (such as the .call method, and non-staggered transition "end"). Maybe it's only in the latter where we use a selection as the this context.
Also, we could shorten the syntax to d3(this) rather than d3.select(this) to make it easier to convert. And this.node() might be clearer than this[0][0].
The text was updated successfully, but these errors were encountered:
This also includes a backwards-incompatible change to module naming when
used with Node.js: instead of require("d3-cloud").cloud, you should now
use require("d3-cloud") directly.
Fixesd3#28.
Should the
this
context of property functions be aNode
or a singleton selection, as ind3.select(this)
? The singleton selection is convenient in some cases, but it does not provide the complete functionality of the W3C DOM API, and extracting the element is a bit awkward:this[0][0]
.Also, there are cases where callbacks are associated with individual nodes (such as "mouseover") and other cases where there are multiple nodes (such as the
.call
method, and non-staggered transition "end"). Maybe it's only in the latter where we use a selection as thethis
context.Also, we could shorten the syntax to
d3(this)
rather thand3.select(this)
to make it easier to convert. Andthis.node()
might be clearer thanthis[0][0]
.The text was updated successfully, but these errors were encountered: