Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exit(_domNode, _element) {
SVGWidget.prototype.exit.apply(this, arguments);
}
exit(domNode, element) {
SVGWidget.prototype.exit.apply(this, arguments);
}
update(_domNode, _element) {
SVGWidget.prototype.update.apply(this, arguments);
this.svg.style("display", this.hidden() ? "none" : null);
const overlap = this.calcOverflow(_element);
this.range(this.isHorizontal() ? [overlap.left, this.width() - overlap.right] : [this.height() - overlap.top - overlap.bottom, 0]);
const context = this;
function doPosition(element) {
element.attr("transform", function () {
switch (context.orientation()) {
case "left":
return "translate(" + overlap.depth + ", " + overlap.top + ")";
case "top":
return "translate(0," + overlap.depth + ")";
case "right":
enter(_domNode, element) {
SVGWidget.prototype.enter.apply(this, arguments);
this.svg = element.append("g");
this.svgAxis = this.svg.append("g")
.attr("class", "axis")
;
this.svgText = this.svgAxis.append("text");
this.svgGuides = (this._guideElement || element).append("g")
.attr("class", "guide")
;
}
Slider.prototype.value = function (_?: any): any {
const retVal = value.apply(this, arguments);
if (!arguments.length) {
if (!this.allowRange()) {
return SVGWidget.prototype.data.call(this)[0][0];
}
return SVGWidget.prototype.data.call(this)[0];
} else {
SVGWidget.prototype.data.call(this, [this.allowRange() ? _ : [_, _]]);
}
return retVal;
};
Slider.prototype.name = function (_: any): any {
const retVal = name.apply(this, arguments);
if (arguments.length) {
const val = _ instanceof Array ? _ : [_];
SVGWidget.prototype.columns.call(this, val);
}
return retVal;
};
postUpdate(_domNode, _element) {
SVGWidget.prototype.postUpdate.apply(this, arguments);
if (this._guideElement) {
this._guideElement
.attr("transform", this._element.attr("transform"))
;
}
}