fix api doc

This commit is contained in:
Jare Guo
2017-10-11 09:53:24 +08:00
parent e6533009f6
commit cdad460e9d
3 changed files with 17 additions and 15 deletions
+1
View File
@@ -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
*/
+1 -1
View File
@@ -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.
+15 -14
View File
@@ -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
*/