d3plus-shape
Advanced tools
Comparing version 0.16.12 to 0.16.13
@@ -39,2 +39,3 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
this._id = accessor("id"); | ||
this._opacity = constant(1); | ||
this._pointerEvents = constant("auto"); | ||
@@ -72,3 +73,3 @@ this._select; | ||
update = enter.merge(images); | ||
update.attr("xlink:href", this._url).style("pointer-events", this._pointerEvents).transition(t).attr("opacity", 1).attr("width", function (d, i) { | ||
update.attr("xlink:href", this._url).style("pointer-events", this._pointerEvents).transition(t).attr("opacity", this._opacity).attr("width", function (d, i) { | ||
return _this._width(d, i); | ||
@@ -172,2 +173,14 @@ }).attr("height", function (d, i) { | ||
@memberof Image | ||
@desc Sets the opacity of the image. | ||
@param {Number} [*value* = 1] | ||
@chainable | ||
*/ | ||
}, { | ||
key: "opacity", | ||
value: function opacity(_) { | ||
return arguments.length ? (this._opacity = typeof _ === "function" ? _ : constant(_), this) : this._opacity; | ||
} | ||
/** | ||
@memberof Image | ||
@desc If *value* is specified, sets the pointer-events accessor to the specified function or string and returns the current class instance. | ||
@@ -174,0 +187,0 @@ @param {Function|String} [*value* = "auto"] |
@@ -397,3 +397,3 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
this._backgroundImageClass.data(imageData).duration(this._duration).pointerEvents("none").select(elem("g.d3plus-".concat(this._name, "-image"), { | ||
this._backgroundImageClass.data(imageData).duration(this._duration).opacity(this._nestWrapper(this._opacity)).pointerEvents("none").select(elem("g.d3plus-".concat(this._name, "-image"), { | ||
parent: this._group, | ||
@@ -467,3 +467,3 @@ update: { | ||
this._labelClass.data(labelData).duration(this._duration).pointerEvents("none").rotate(function (d) { | ||
this._labelClass.data(labelData).duration(this._duration).fontOpacity(this._nestWrapper(this._opacity)).pointerEvents("none").rotate(function (d) { | ||
return d.__d3plus__ ? d.r : d.data.r; | ||
@@ -470,0 +470,0 @@ }).rotateAnchor(function (d) { |
{ | ||
"name": "d3plus-shape", | ||
"version": "0.16.12", | ||
"version": "0.16.13", | ||
"description": "Fancy SVG shapes for visualizations", | ||
@@ -5,0 +5,0 @@ "main": "build/d3plus-shape.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
694729
7930
1660