diff --git a/cocos2d/core/components/CCEditBox.js b/cocos2d/core/components/CCEditBox.js index 65f9b779de..18423d9aec 100644 --- a/cocos2d/core/components/CCEditBox.js +++ b/cocos2d/core/components/CCEditBox.js @@ -644,4 +644,5 @@ cc.EditBox = module.exports = EditBox; * // when you don't need editbox anymore * editbox.node.destroy(); * @method destroy + * @return {Boolean} whether it is the first time the destroy being called */ diff --git a/cocos2d/core/components/CCSprite.js b/cocos2d/core/components/CCSprite.js index 596123a8f3..7da5d38c33 100644 --- a/cocos2d/core/components/CCSprite.js +++ b/cocos2d/core/components/CCSprite.js @@ -28,7 +28,7 @@ var Base = require('./CCRendererUnderSG'); /** * !#en Enum for sprite type. * !#zh Sprite 类型 - * @enum Sprite.SpriteType + * @enum Sprite.Type */ /** * !#en The simple type. diff --git a/cocos2d/core/components/CCVideoPlayer.js b/cocos2d/core/components/CCVideoPlayer.js index 07dce51579..8c341f5997 100644 --- a/cocos2d/core/components/CCVideoPlayer.js +++ b/cocos2d/core/components/CCVideoPlayer.js @@ -369,6 +369,21 @@ var VideoPlayer = cc.Class({ } return false; } + + /** + * !#en if you don't need the VideoPlayer and it isn't in any running Scene, you should + * call the destroy method on this component or the associated node explicitly. + * Otherwise, the created DOM element won't be removed from web page. + * !#zh + * 如果你不再使用 VideoPlayer,并且组件未添加到场景中,那么你必须手动对组件或所在节点调用 destroy。 + * 这样才能移除网页上的 DOM 节点,避免 Web 平台内存泄露。 + * @example + * videoplayer.node.parent = null; // or videoplayer.node.removeFromParent(false); + * // when you don't need videoplayer anymore + * videoplayer.node.destroy(); + * @method destroy + * @return {Boolean} whether it is the first time the destroy being called + */ }); cc.VideoPlayer = module.exports = VideoPlayer; @@ -443,17 +458,3 @@ cc.VideoPlayer = module.exports = VideoPlayer; * @param {Event.EventCustom} event * @param {VideoPlayer} event.detail - The VideoPlayer component. */ - -/** - * !#en if you don't need the VideoPlayer and it isn't in any running Scene, you should - * call the destroy method on this component or the associated node explicitly. - * Otherwise, the created DOM element won't be removed from web page. - * !#zh - * 如果你不再使用 VideoPlayer,并且组件未添加到场景中,那么你必须手动对组件或所在节点调用 destroy。 - * 这样才能移除网页上的 DOM 节点,避免 Web 平台内存泄露。 - * @example - * videoplayer.node.parent = null; // or videoplayer.node.removeFromParent(false); - * // when you don't need videoplayer anymore - * videoplayer.node.destroy(); - * @method destroy - */