Revert "Use a more precise check for "baseVal" property."
This reverts commit 94d0e1aa18
.
This commit is contained in:
Родитель
94d0e1aa18
Коммит
2280d51c9d
|
@ -1307,8 +1307,7 @@ function d3_selection(groups) {
|
|||
return first(function() {
|
||||
if ("classList" in this) return this.classList.contains(name);
|
||||
re.lastIndex = 0;
|
||||
return re.test(typeof this.className === "object" &&
|
||||
"baseVal" in this.className
|
||||
return re.test(this.className.baseVal != null
|
||||
? this.className.baseVal : this.className);
|
||||
});
|
||||
}
|
||||
|
@ -1316,8 +1315,7 @@ function d3_selection(groups) {
|
|||
/** @this {Element} */
|
||||
function classedAdd() {
|
||||
if ("classList" in this) return this.classList.add(name);
|
||||
var isAnimatedString = typeof this.className === "object" &&
|
||||
"baseVal" in this.className,
|
||||
var isAnimatedString = this.className.baseVal != null,
|
||||
classes = isAnimatedString ? this.className.baseVal : this.className;
|
||||
re.lastIndex = 0;
|
||||
if (!re.test(classes)) {
|
||||
|
@ -1330,8 +1328,7 @@ function d3_selection(groups) {
|
|||
/** @this {Element} */
|
||||
function classedRemove() {
|
||||
if ("classList" in this) return this.classList.remove(name);
|
||||
var isAnimatedString = typeof this.className === "object" &&
|
||||
"baseVal" in this.className,
|
||||
var isAnimatedString = this.className.baseVal != null,
|
||||
classes = isAnimatedString ? this.className.baseVal : this.className;
|
||||
classes = d3_collapse(classes.replace(re, " "));
|
||||
if (isAnimatedString) this.className.baseVal = classes;
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -307,8 +307,7 @@ function d3_selection(groups) {
|
|||
return first(function() {
|
||||
if ("classList" in this) return this.classList.contains(name);
|
||||
re.lastIndex = 0;
|
||||
return re.test(typeof this.className === "object" &&
|
||||
"baseVal" in this.className
|
||||
return re.test(this.className.baseVal != null
|
||||
? this.className.baseVal : this.className);
|
||||
});
|
||||
}
|
||||
|
@ -316,8 +315,7 @@ function d3_selection(groups) {
|
|||
/** @this {Element} */
|
||||
function classedAdd() {
|
||||
if ("classList" in this) return this.classList.add(name);
|
||||
var isAnimatedString = typeof this.className === "object" &&
|
||||
"baseVal" in this.className,
|
||||
var isAnimatedString = this.className.baseVal != null,
|
||||
classes = isAnimatedString ? this.className.baseVal : this.className;
|
||||
re.lastIndex = 0;
|
||||
if (!re.test(classes)) {
|
||||
|
@ -330,8 +328,7 @@ function d3_selection(groups) {
|
|||
/** @this {Element} */
|
||||
function classedRemove() {
|
||||
if ("classList" in this) return this.classList.remove(name);
|
||||
var isAnimatedString = typeof this.className === "object" &&
|
||||
"baseVal" in this.className,
|
||||
var isAnimatedString = this.className.baseVal != null,
|
||||
classes = isAnimatedString ? this.className.baseVal : this.className;
|
||||
classes = d3_collapse(classes.replace(re, " "));
|
||||
if (isAnimatedString) this.className.baseVal = classes;
|
||||
|
|
Загрузка…
Ссылка в новой задаче