From f31830e5743c0789e30e55eb22a31a27096c4607 Mon Sep 17 00:00:00 2001 From: Jare Guo Date: Sat, 25 Nov 2017 16:31:32 +0800 Subject: [PATCH] fix api --- cocos2d/core/platform/CCClass.js | 2 +- cocos2d/core/platform/js.js | 4 ++-- cocos2d/core/sprites/CCSpriteFrame.js | 4 ++-- cocos2d/core/textures/CCTextureCache.js | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cocos2d/core/platform/CCClass.js b/cocos2d/core/platform/CCClass.js index 1f7d159a96..5378010097 100644 --- a/cocos2d/core/platform/CCClass.js +++ b/cocos2d/core/platform/CCClass.js @@ -832,7 +832,7 @@ function declareProperties (cls, className, properties, baseClass, mixins, es6) * @param {String} [options.name] - The class name used for serialization. * @param {Function} [options.extends] - The base class. * @param {Function} [options.ctor] - The constructor. - * @param {Function} [options.__ctor__] - The same as ctor, but less encapsulated. + * @param {Function} [options.__ctor__] - The same as ctor, but less encapsulated. * @param {Object} [options.properties] - The property definitions. * @param {Object} [options.statics] - The static members. * @param {Function[]} [options.mixins] diff --git a/cocos2d/core/platform/js.js b/cocos2d/core/platform/js.js index 19f69cbaab..3c99593e6f 100644 --- a/cocos2d/core/platform/js.js +++ b/cocos2d/core/platform/js.js @@ -621,9 +621,9 @@ js.shiftArguments = function () { }; /** - * #en + * !#en * A simple wrapper of `Object.create(null)` which ensures the return object have no prototype (and thus no inherited members). So we can skip `hasOwnProperty` calls on property lookups. It is a worthwhile optimization than the `{}` literal when `hasOwnProperty` calls are necessary. - * #zh + * !#zh * 该方法是对 `Object.create(null)` 的简单封装。`Object.create(null)` 用于创建无 prototype (也就无继承)的空对象。这样我们在该对象上查找属性时,就不用进行 `hasOwnProperty` 判断。在需要频繁判断 `hasOwnProperty` 时,使用这个方法性能会比 `{}` 更高。 * * @method createMap diff --git a/cocos2d/core/sprites/CCSpriteFrame.js b/cocos2d/core/sprites/CCSpriteFrame.js index 81064582e2..c7d71e0d7d 100644 --- a/cocos2d/core/sprites/CCSpriteFrame.js +++ b/cocos2d/core/sprites/CCSpriteFrame.js @@ -355,8 +355,8 @@ cc.SpriteFrame = cc.Class(/** @lends cc.SpriteFrame# */{ }, /** - * #en Set SpriteFrame with Texture, rect, rotated, offset and originalSize.
- * #zh 通过 Texture,rect,rotated,offset 和 originalSize 设置 SpriteFrame + * !#en Set SpriteFrame with Texture, rect, rotated, offset and originalSize.
+ * !#zh 通过 Texture,rect,rotated,offset 和 originalSize 设置 SpriteFrame * @method setTexture * @param {String|Texture2D} textureOrTextureFile * @param {Rect} [rect=null] diff --git a/cocos2d/core/textures/CCTextureCache.js b/cocos2d/core/textures/CCTextureCache.js index 517ea2a159..6b80f6d7a5 100644 --- a/cocos2d/core/textures/CCTextureCache.js +++ b/cocos2d/core/textures/CCTextureCache.js @@ -112,8 +112,8 @@ var textureCache = /** @lends cc.textureCache# */{ }, /** - * #en get all textures - * #zh 获取所有贴图 + * !#en get all textures + * !#zh 获取所有贴图 * @method getAllTextures * @return {Texture2D[]} */