From 3517493f76a3f4b15bd3fbdb947d1b9e22ab4743 Mon Sep 17 00:00:00 2001 From: Jonathan Puckey Date: Sun, 21 Apr 2013 15:59:51 +0200 Subject: [PATCH] Improve PointText constructor examples. --- src/text/PointText.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/text/PointText.js b/src/text/PointText.js index b92303ce..77617d98 100644 --- a/src/text/PointText.js +++ b/src/text/PointText.js @@ -28,11 +28,20 @@ var PointText = this.PointText = TextItem.extend(/** @lends PointText# */{ * @name PointText#initialize * @param {Point} point the position where the text will start * - * @example - * var text = new PointText(new Point(50, 100)); + * @example {@paperscript} + * var text = new PointText(new Point(200, 50)); * text.justification = 'center'; * text.fillColor = 'black'; * text.content = 'The contents of the point text'; + * + * @example {@paperscript} + * // Using object notation: + * var text = new PointText({ + * point: [50, 50], + * content: 'The contents of the point text', + * fillColor: 'black', + * fontSize: 25 + * }); */ clone: function() {