diff --git a/README.md b/README.md index f92d89054..58e5d9174 100644 --- a/README.md +++ b/README.md @@ -304,7 +304,7 @@ Version 2.4 - "Katar" - in dev ### Updates * TypeScript definitions fixes and updates (thanks @clark-stevenson @isuda @ggarek @jamesgroat) -* JSDoc typo fixes (thanks @robertpenner @luckylooke @asyncanup) +* JSDoc typo fixes (thanks @robertpenner @luckylooke @asyncanup @muzuiget) * Added missing `resumed` method to Phaser.State class template. * Color.webToColor and Color.updateColor now updates the `out.color` and `out.color32` properties (thanks @cuixiping #1728) * Tilemap.createFromObjects has been updated for Tiled 0.11 and can now look-up object layers based on id, uid or name. It will also now copy over Sprite scaling properties if set (thanks @mandarinx #1738) diff --git a/src/utils/Utils.js b/src/utils/Utils.js index 335262e1f..08059975d 100644 --- a/src/utils/Utils.js +++ b/src/utils/Utils.js @@ -184,13 +184,13 @@ Phaser.Utils = { }, /** - * Javascript string pad http://www.webtoolkit.info/. + * JavaScript string pad http://www.webtoolkit.info/. * * @method Phaser.Utils.pad * @param {string} str - The target string. - * @param {number} len - The number of characters to be added. - * @param {number} pad - The string to pad it out with (defaults to a space). - * @param {number} [dir=3] The direction dir = 1 (left), 2 (right), 3 (both). + * @param {integer} [len=0] - The number of characters to be added. + * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). + * @param {integer} [dir=3] The direction dir = 1 (left), 2 (right), 3 (both). * @return {string} The padded string */ pad: function (str, len, pad, dir) { diff --git a/typescript/phaser.d.ts b/typescript/phaser.d.ts index 4d3d4e825..25f91f972 100644 --- a/typescript/phaser.d.ts +++ b/typescript/phaser.d.ts @@ -4879,7 +4879,7 @@ declare module Phaser { static getProperty(obj: any, prop: string): any; static isPlainObject(object: any): boolean; static mixin(from: any, to: any): any; - static pad(str: string, len: number, pad: number, dir?: number): string; + static pad(str: string, len?: number, pad?: string, dir?: number): string; static parseDimension(size: any, dimension: number): number; static randomChoice(choice1: any, choice2: any): any; static rotateArray(array: T[], direction: any): T;