Skip to content

Commit

Permalink
Fix drawing nod if nod.scl === 0
Browse files Browse the repository at this point in the history
  • Loading branch information
klawr committed Dec 20, 2020
1 parent 212013a commit f382cd8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions dist/g2.chart.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ g2.prototype.nod.prototype = g2.mix(g2.prototype.cir.prototype, {
lbloc: 'se',
g2() { // in contrast to `g2.prototype.cir.prototype`, `g2()` is called always !
return g2()
.cir({ ...g2.flatten(this), r: this.r * (this.scl || 1) })
.cir({ ...g2.flatten(this), r: this.r * (this.scl !== undefined ? this.scl : 1) })
.ins((g) => this.label && this.drawLabel(g))
}
});
Expand Down Expand Up @@ -2977,7 +2977,7 @@ class G2ChartElement extends HTMLElement {
funcs[itr].fn = (() => Function('"use strict"; return (' + a[4] + ')')())();
itr++;
}
this.funcs = [funcs];
this.funcs = funcs;
}
}
catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion dist/g2.full.js
Original file line number Diff line number Diff line change
Expand Up @@ -1575,7 +1575,7 @@ g2.prototype.nod.prototype = g2.mix(g2.prototype.cir.prototype, {
lbloc: 'se',
g2() { // in contrast to `g2.prototype.cir.prototype`, `g2()` is called always !
return g2()
.cir({ ...g2.flatten(this), r: this.r * (this.scl || 1) })
.cir({ ...g2.flatten(this), r: this.r * (this.scl !== undefined ? this.scl : 1) })
.ins((g) => this.label && this.drawLabel(g))
}
});
Expand Down
2 changes: 1 addition & 1 deletion dist/g2.html.js
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ g2.prototype.nod.prototype = g2.mix(g2.prototype.cir.prototype, {
lbloc: 'se',
g2() { // in contrast to `g2.prototype.cir.prototype`, `g2()` is called always !
return g2()
.cir({ ...g2.flatten(this), r: this.r * (this.scl || 1) })
.cir({ ...g2.flatten(this), r: this.r * (this.scl !== undefined ? this.scl : 1) })
.ins((g) => this.label && this.drawLabel(g))
}
});
Expand Down
2 changes: 1 addition & 1 deletion dist/g2.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/g2.chart.element.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class G2ChartElement extends HTMLElement {
funcs[itr].fn = (() => Function('"use strict"; return (' + a[4] + ')')())();
itr++;
}
this.funcs = [funcs];
this.funcs = funcs;
}
}
catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion src/g2.ext.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ g2.prototype.nod.prototype = g2.mix(g2.prototype.cir.prototype, {
lbloc: 'se',
g2() { // in contrast to `g2.prototype.cir.prototype`, `g2()` is called always !
return g2()
.cir({ ...g2.flatten(this), r: this.r * (this.scl || 1) })
.cir({ ...g2.flatten(this), r: this.r * (this.scl !== undefined ? this.scl : 1) })
.ins((g) => this.label && this.drawLabel(g))
}
});
Expand Down

0 comments on commit f382cd8

Please sign in to comment.