diff options
Diffstat (limited to 'src/Map/Canvas.js')
-rw-r--r-- | src/Map/Canvas.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Map/Canvas.js b/src/Map/Canvas.js index cbd6e9e..111063e 100644 --- a/src/Map/Canvas.js +++ b/src/Map/Canvas.js @@ -89,6 +89,10 @@ class Canvas { this.drawPolygon(shape); break; + case Shape.Text: + this.drawText(shape); + break; + default: break; } @@ -126,6 +130,12 @@ class Canvas { ct.stroke(); ct.fill(); } + + drawText(shape) { + console.log('yes'); + const ct = this.context; + ct.fillText(shape.text, shape.nodes[0].x, shape.nodes[0].y); + } } |