Skip to content

Commit 1068563

Browse files
committed
jsdoc fixes.
1 parent eec8466 commit 1068563

1 file changed

Lines changed: 20 additions & 10 deletions

File tree

src/gameobjects/Text.js

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,8 @@ Phaser.Text.prototype.constructor = Phaser.Text;
157157

158158
/**
159159
* Automatically called by World.preUpdate.
160-
* @method Phaser.Text.prototype.preUpdate
160+
*
161+
* @method Phaser.Text#preUpdate
161162
*/
162163
Phaser.Text.prototype.preUpdate = function () {
163164

@@ -198,15 +199,15 @@ Phaser.Text.prototype.preUpdate = function () {
198199
* Override and use this function in your own custom objects to handle any update requirements you may have.
199200
*
200201
* @method Phaser.Text#update
201-
* @memberof Phaser.Text
202202
*/
203203
Phaser.Text.prototype.update = function() {
204204

205205
};
206206

207207
/**
208208
* Automatically called by World.postUpdate.
209-
* @method Phaser.Text.prototype.postUpdate
209+
*
210+
* @method Phaser.Text#postUpdate
210211
*/
211212
Phaser.Text.prototype.postUpdate = function () {
212213

@@ -225,7 +226,7 @@ Phaser.Text.prototype.postUpdate = function () {
225226
};
226227

227228
/**
228-
* @method Phaser.Text.prototype.destroy
229+
* @method Phaser.Text#destroy
229230
* @param {boolean} [destroyChildren=true] - Should every child of this object have its destroy method called?
230231
*/
231232
Phaser.Text.prototype.destroy = function (destroyChildren) {
@@ -294,7 +295,9 @@ Phaser.Text.prototype.destroy = function (destroyChildren) {
294295
};
295296

296297
/**
297-
* @method Phaser.Text.prototype.setShadow
298+
* Sets a drop-shadow effect on the Text.
299+
*
300+
* @method Phaser.Text#setShadow
298301
* @param {number} [x=0] - The shadowOffsetX value in pixels. This is how far offset horizontally the shadow effect will be.
299302
* @param {number} [y=0] - The shadowOffsetY value in pixels. This is how far offset vertically the shadow effect will be.
300303
* @param {string} [color='rgba(0,0,0,0)'] - The color of the shadow, as given in CSS rgba format. Set the alpha component to 0 to disable the shadow.
@@ -313,7 +316,7 @@ Phaser.Text.prototype.setShadow = function (x, y, color, blur) {
313316
/**
314317
* Set the style of the text by passing a single style object to it.
315318
*
316-
* @method Phaser.Text.prototype.setStyle
319+
* @method Phaser.Text#setStyle
317320
* @param {Object} [style] - The style properties to be set on the Text.
318321
* @param {string} [style.font='bold 20pt Arial'] - The style and size of the font.
319322
* @param {string} [style.fill='black'] - A canvas fillstyle that will be used on the text eg 'red', '#00FF00'.
@@ -346,7 +349,7 @@ Phaser.Text.prototype.setStyle = function (style) {
346349
/**
347350
* Renders text. This replaces the Pixi.Text.updateText function as we need a few extra bits in here.
348351
*
349-
* @method Phaser.Text.prototype.updateText
352+
* @method Phaser.Text#updateText
350353
* @private
351354
*/
352355
Phaser.Text.prototype.updateText = function () {
@@ -451,6 +454,12 @@ Phaser.Text.prototype.updateText = function () {
451454

452455
};
453456

457+
/**
458+
* Updates a line of text.
459+
*
460+
* @method Phaser.Text#updateLine
461+
* @private
462+
*/
454463
Phaser.Text.prototype.updateLine = function (line, x, y) {
455464

456465
for (var i = 0; i < line.length; i++)
@@ -483,7 +492,7 @@ Phaser.Text.prototype.updateLine = function (line, x, y) {
483492
/**
484493
* Clears any previously set color stops.
485494
*
486-
* @method Phaser.Text.prototype.clearColors
495+
* @method Phaser.Text#clearColors
487496
*/
488497
Phaser.Text.prototype.clearColors = function () {
489498

@@ -499,7 +508,7 @@ Phaser.Text.prototype.clearColors = function () {
499508
* Once set the color remains in use until either another color or the end of the string is encountered.
500509
* For example if the Text was `Photon Storm` and you did `Text.addColor('#ffff00', 6)` it would color in the word `Storm` in yellow.
501510
*
502-
* @method Phaser.Text.prototype.addColor
511+
* @method Phaser.Text#addColor
503512
* @param {string} color - A canvas fillstyle that will be used on the text eg `red`, `#00FF00`, `rgba()`.
504513
* @param {number} position - The index of the character in the string to start applying this color value from.
505514
*/
@@ -513,7 +522,7 @@ Phaser.Text.prototype.addColor = function (color, position) {
513522
/**
514523
* Greedy wrapping algorithm that will wrap words as the line grows longer than its horizontal bounds.
515524
*
516-
* @method Phaser.Text.prototype.runWordWrap
525+
* @method Phaser.Text#runWordWrap
517526
* @param {string} text - The text to perform word wrap detection against.
518527
* @private
519528
*/
@@ -563,6 +572,7 @@ Phaser.Text.prototype.runWordWrap = function (text) {
563572
* Indicates the rotation of the Text, in degrees, from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.
564573
* Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement player.angle = 450 is the same as player.angle = 90.
565574
* If you wish to work in radians instead of degrees use the property Sprite.rotation instead.
575+
*
566576
* @name Phaser.Text#angle
567577
* @property {number} angle - Gets or sets the angle of rotation in degrees.
568578
*/

0 commit comments

Comments
 (0)