From 73de4661efb546495b41de99944a4a92dc678806 Mon Sep 17 00:00:00 2001 From: Nan Wang Date: Fri, 5 Feb 2016 17:18:40 +0800 Subject: [PATCH 1/2] fixed animation state type. --- cocos2d/animation/animation-state.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos2d/animation/animation-state.js b/cocos2d/animation/animation-state.js index 4470a136cf..f52ec8f93b 100644 --- a/cocos2d/animation/animation-state.js +++ b/cocos2d/animation/animation-state.js @@ -15,7 +15,7 @@ var AnimationNode = require('./types').AnimationNode; * @method AnimationState * @param {AnimationClip} clip * @param {String} [name] - * @return AnimationState + * @return {AnimationState} */ function AnimationState (clip, name) { AnimationNode.call(this, null, null, { From aa748daea711df477cc6a9fff40e4b97cf3a1ed8 Mon Sep 17 00:00:00 2001 From: Nan Wang Date: Fri, 5 Feb 2016 17:47:29 +0800 Subject: [PATCH 2/2] fixed director type. add spritetype and sizemode enum. --- cocos2d/core/CCGame.js | 2 +- cocos2d/core/components/CCSprite.js | 18 +++++++++++++++++- cocos2d/core/sprites/CCScale9Sprite.js | 2 +- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/cocos2d/core/CCGame.js b/cocos2d/core/CCGame.js index 0d5c2d1d9d..d2155d5063 100644 --- a/cocos2d/core/CCGame.js +++ b/cocos2d/core/CCGame.js @@ -215,7 +215,7 @@ var game = /** @lends cc.game# */{ /** * @property director - * @type cc.Director + * @type Director */ cc.director = cc.Director._getInstance(); if (cc.director.setOpenGLView) diff --git a/cocos2d/core/components/CCSprite.js b/cocos2d/core/components/CCSprite.js index 4273654923..679e281c41 100644 --- a/cocos2d/core/components/CCSprite.js +++ b/cocos2d/core/components/CCSprite.js @@ -21,12 +21,28 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ****************************************************************************/ - +/** + * Enum for sprite type + * @enum SpriteType + */ + /** + * @property {Number} SIMPLE + */ +/** + * @property {Number} SLICED + */ +/** + * @property {Number} TILED + */ +/** + * @property {Number} FILLED + */ var SpriteType = cc.Scale9Sprite.RenderingType; var FillType = cc.Scale9Sprite.FillType; /** * Sprite Size can track trimmed size, raw size or none + * @enum SizeMode */ var SizeMode = cc.Enum({ /** diff --git a/cocos2d/core/sprites/CCScale9Sprite.js b/cocos2d/core/sprites/CCScale9Sprite.js index 7196b9b4f5..bdc817a57f 100644 --- a/cocos2d/core/sprites/CCScale9Sprite.js +++ b/cocos2d/core/sprites/CCScale9Sprite.js @@ -29,7 +29,7 @@ EventTarget = require("../cocos2d/core/event/event-target"); -/** +/* *

* A 9-slice sprite for cocos2d UI.
*