mirror of https://github.com/vitalif/dimple
Give name to magic number
parent
6ee4453a2d
commit
a75a11e179
|
@ -12,6 +12,7 @@
|
|||
runningY = 0,
|
||||
keyWidth = 15,
|
||||
keyHeight = 9,
|
||||
distanceBetweenKeyAndText = 5,
|
||||
self = this,
|
||||
theseShapes;
|
||||
|
||||
|
@ -82,7 +83,7 @@
|
|||
d3.select(this).remove();
|
||||
} else {
|
||||
d3.select(this).select("text")
|
||||
.attr("x", (self.horizontalAlign === "left" ? self._xPixels() + keyWidth + 5 + runningX : self._xPixels() + (self._widthPixels() - runningX - maxWidth) + keyWidth + 5))
|
||||
.attr("x", (self.horizontalAlign === "left" ? self._xPixels() + keyWidth + distanceBetweenKeyAndText + runningX : self._xPixels() + (self._widthPixels() - runningX - maxWidth) + keyWidth + distanceBetweenKeyAndText))
|
||||
.attr("y", function () {
|
||||
// This was previously done with dominant-baseline but this is used
|
||||
// instead due to browser inconsistency.
|
||||
|
|
Loading…
Reference in New Issue