From e073cafd2c44bf349cb2481fcfdb9920fb99cd2a Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Fri, 23 Nov 2012 21:49:07 +0100 Subject: [PATCH] Implement PointText#drawSelected. Closes #127. --- src/text/PointText.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/text/PointText.js b/src/text/PointText.js index 76600363..04cda026 100644 --- a/src/text/PointText.js +++ b/src/text/PointText.js @@ -84,6 +84,13 @@ var PointText = this.PointText = TextItem.extend(/** @lends PointText# */{ ctx.strokeText(line, 0, 0); ctx.translate(0, leading); } + }, + + // TODO: Should we be drawing the selection like this? Perhaps a small + // rectangle for the starting point of the text and a colored line on + // the baseline for its width? + drawSelected: function(ctx, matrix) { + Item.drawSelectedBounds(this._getBounds(), ctx, matrix); } }, new function() { var context = null;