mirror of
https://github.com/konvajs/konva.git
synced 2026-01-24 13:57:25 +08:00
fix baseline
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
},
|
||||
_sceneFunc: function(context) {
|
||||
context.setAttr('font', this._getContextFont());
|
||||
context.setAttr(this.getTextBaseline(), 'middle');
|
||||
context.setAttr('textBaseline', this.getTextBaseline());
|
||||
context.setAttr('textAlign', 'left');
|
||||
context.save();
|
||||
|
||||
@@ -91,15 +91,15 @@
|
||||
context.restore();
|
||||
|
||||
//// To assist with debugging visually, uncomment following
|
||||
// context.beginPath();
|
||||
// if (i % 2)
|
||||
// context.strokeStyle = 'cyan';
|
||||
// else
|
||||
// context.strokeStyle = 'green';
|
||||
// var p1 = glyphInfo[i].p1;
|
||||
// context.moveTo(p0.x, p0.y);
|
||||
// context.lineTo(p1.x, p1.y);
|
||||
// context.stroke();
|
||||
context.beginPath();
|
||||
if (i % 2)
|
||||
context.strokeStyle = 'cyan';
|
||||
else
|
||||
context.strokeStyle = 'green';
|
||||
var p1 = glyphInfo[i].p1;
|
||||
context.moveTo(p0.x, p0.y);
|
||||
context.lineTo(p1.x, p1.y);
|
||||
context.stroke();
|
||||
}
|
||||
context.restore();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user