Better baseline rendering
This commit is contained in:
parent
943e4b0d08
commit
43ebc4284e
@ -68,13 +68,6 @@ function Column(canvas, name, params, scale, range, bounds) {
|
||||
originX: 'center',
|
||||
originY: 'center',
|
||||
});
|
||||
|
||||
if (goog.math.Range.containsPoint(this.range, 0.0)) {
|
||||
var position = this.getPosFromValue(0.0);
|
||||
this.updateLine('baseline', [this.columnBounds.left, position, this.hintBounds.left, position], {
|
||||
stroke: this.strokeColor
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
this.updateRect('fillRect', {
|
||||
@ -93,6 +86,16 @@ function Column(canvas, name, params, scale, range, bounds) {
|
||||
fill: this.handleColor
|
||||
});
|
||||
|
||||
if (final && goog.math.Range.containsPoint(this.range, 0.0)) {
|
||||
var w = 2;
|
||||
var y = this.getPosFromValue(0.0) - w / 2;
|
||||
var p = [this.columnBounds.left, y, this.hintBounds.left, y];
|
||||
this.updateLine('baseline', p, {
|
||||
stroke: this.strokeColor,
|
||||
strokeWidth: w
|
||||
});
|
||||
}
|
||||
|
||||
this.canvas.renderAll();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user