Commit 59767e65 authored by Jeff Tian's avatar Jeff Tian Committed by Jeff Tian

Allow 0 sized markings.

parent fc1e4094
...@@ -2417,16 +2417,13 @@ Licensed under the MIT license. ...@@ -2417,16 +2417,13 @@ Licensed under the MIT license.
yrange.from = Math.max(yrange.from, yrange.axis.min); yrange.from = Math.max(yrange.from, yrange.axis.min);
yrange.to = Math.min(yrange.to, yrange.axis.max); yrange.to = Math.min(yrange.to, yrange.axis.max);
if (xrange.from === xrange.to && yrange.from === yrange.to) {
return;
}
// then draw // then draw
xrange.from = xrange.axis.p2c(xrange.from); xrange.from = xrange.axis.p2c(xrange.from);
xrange.to = xrange.axis.p2c(xrange.to); xrange.to = xrange.axis.p2c(xrange.to);
yrange.from = yrange.axis.p2c(yrange.from); yrange.from = yrange.axis.p2c(yrange.from);
yrange.to = yrange.axis.p2c(yrange.to); yrange.to = yrange.axis.p2c(yrange.to);
if (xrange.from !== xrange.to || xrange.from !== yrange.to) {
if (xrange.from === xrange.to || yrange.from === yrange.to) { if (xrange.from === xrange.to || yrange.from === yrange.to) {
// draw line // draw line
ctx.beginPath(); ctx.beginPath();
...@@ -2448,6 +2445,7 @@ Licensed under the MIT license. ...@@ -2448,6 +2445,7 @@ Licensed under the MIT license.
ctx.fill(); ctx.fill();
} }
} }
}
if (m.text) { if (m.text) {
// left aligned horizontal position: // left aligned horizontal position:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment