Skip to content

Commit 3a4bf7e

Browse files
committed
More fixes
1 parent 557302a commit 3a4bf7e

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

cocos2d/core/cocoa/CCGeometry.js

+13-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@
2929
* @class cc.Point
3030
* @param {Number} x
3131
* @param {Number} y
32+
*
33+
* @property x {Number}
34+
* @property y {Number}
3235
* @see cc.p
3336
*/
3437
cc.Point = function (x, y) {
@@ -79,6 +82,8 @@ cc.pointEqualToPoint = function (point1, point2) {
7982
* @class cc.Size
8083
* @param {Number} width
8184
* @param {Number} height
85+
* @property {Number} width
86+
* @property {Number} height
8287
* @see cc.size
8388
*/
8489
cc.Size = function (width, height) {
@@ -127,8 +132,16 @@ cc.sizeEqualToSize = function (size1, size2) {
127132
/**
128133
* cc.Rect is the class for rect object, please do not use its constructor to create rects, use cc.rect() alias function instead.
129134
* @class cc.Rect
135+
* @param {Number} x
136+
* @param {Number} y
130137
* @param {Number} width
131138
* @param {Number} height
139+
*
140+
* @property {Number} x
141+
* @property {Number} y
142+
* @property {Number} width
143+
* @property {Number} height
144+
*
132145
* @see cc.rect
133146
*/
134147
cc.Rect = function (x, y, width, height) {
@@ -323,5 +336,3 @@ cc.rectIntersection = function (rectA, rectB) {
323336
intersection.height = Math.min(cc.rectGetMaxY(rectA), cc.rectGetMaxY(rectB)) - cc.rectGetMinY(intersection);
324337
return intersection;
325338
};
326-
327-

cocos2d/core/sprites/CCSprite.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* @extends cc.Node
5151
*
5252
* @param {String|cc.SpriteFrame|HTMLImageElement|cc.Texture2D} fileName The string which indicates a path to image file, e.g., "scene1/monster.png".
53-
* @param {cc.Rect} rect Only the contents inside rect of pszFileName's texture will be applied for this sprite.
53+
* @param {cc.Rect} [rect] Only the contents inside rect of pszFileName's texture will be applied for this sprite.
5454
* @param {Boolean} [rotated] Whether or not the texture rectangle is rotated.
5555
* @example
5656
*

0 commit comments

Comments
 (0)