Skip to content

Commit 4712396

Browse files
author
honghui
committed
Merge branch 'develop' of https://github.com/cocos2d/cocos2d-js into develop
2 parents fede494 + 20b584e commit 4712396

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

frameworks/js-bindings/bindings/script/jsb_create_apis.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ _p._ctor = function(fileName, rect){
348348
/************************ ProgressTimer *************************/
349349
_p = cc.ProgressTimer.prototype;
350350
_p._ctor = function(sprite){
351-
sprite && this.initWithSprite(sprite);
351+
sprite !== undefined && this.initWithSprite(sprite);
352352
};
353353

354354
/************************ TextFieldTTF *************************/
@@ -447,12 +447,12 @@ cc.CardinalSplineTo.prototype._ctor = cc.CardinalSplineBy.prototype._ctor = func
447447
};
448448

449449
cc.CatmullRomTo.prototype._ctor = cc.CatmullRomBy.prototype._ctor = function(dt, points) {
450-
points && this.initWithDuration(dt, points);
450+
points !== undefined && this.initWithDuration(dt, points);
451451
};
452452

453453
_p = cc.ActionEase.prototype;
454454
_p._ctor = function(action) {
455-
action && this.initWithAction(action);
455+
action !== undefined && this.initWithAction(action);
456456
};
457457
cc.EaseExponentialIn._ctor
458458
= cc.EaseExponentialOut._ctor
@@ -534,7 +534,7 @@ cc.Lens3D.prototype._ctor = function(duration, gridSize, position, radius) {
534534
cc.FlipY3D.prototype._ctor
535535
= cc.FlipX3D.prototype._ctor
536536
= function(duration) {
537-
duration !== undefiend && this.initWithDuration(duration, cc.size(1, 1));
537+
duration !== undefined && this.initWithDuration(duration, cc.size(1, 1));
538538
};
539539

540540
cc.Waves3D.prototype._ctor = function(duration, gridSize, waves, amplitude) {
@@ -597,7 +597,7 @@ cc.Repeat.prototype._ctor = function(action, times) {
597597
};
598598

599599
cc.RepeatForever.prototype._ctor = function(action) {
600-
action && this.initWithAction(action);
600+
action !== undefined && this.initWithAction(action);
601601
};
602602

603603
cc.Spawn.prototype._ctor = function(tempArray) {
@@ -819,14 +819,14 @@ cc.LabelTTF.prototype._ctor = function(text, fontName, fontSize, dimensions, hAl
819819
/************************ Other classes *************************/
820820

821821
cc.EventTouch.prototype._ctor = function(touches) {
822-
touches && cc.EventTouch.prototype.setTouches.call(this, touches);
822+
touches !== undefined && cc.EventTouch.prototype.setTouches.call(this, touches);
823823
};
824824
cc.Touch.prototype._ctor = function(x, y, id) {
825825
id !== undefined && cc.Touch.prototype.setTouchInfo.call(this, x, y, id);
826826
};
827827

828828
cc.GLProgram.prototype._ctor = function(vShaderFileName, fShaderFileName) {
829-
vShaderFileName && fShaderFileName && cc.GLProgram.prototype.init.call(this, vShaderFileName, fShaderFileName);
829+
vShaderFileName !== undefined && fShaderFileName !== undefined && cc.GLProgram.prototype.init.call(this, vShaderFileName, fShaderFileName);
830830
};
831831

832832

frameworks/js-bindings/bindings/script/jsb_ext_create_apis.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ ccui.RichElementCustomNode.prototype._ctor = function(tag, color, opacity, custo
9292
};
9393

9494
jsb.EventListenerAssetsManager.prototype._ctor = function(assetsManager, callback) {
95-
callback && this.init(assetsManager, callback);
95+
callback !== undefined && this.init(assetsManager, callback);
9696
};
9797

9898
cc.Scale9Sprite.prototype._ctor = function(file, rect, capInsets){
@@ -158,11 +158,11 @@ cc.ControlSlider.prototype._ctor = function(bgFile, progressFile, thumbFile){
158158
};
159159

160160
cc.ControlStepper.prototype._ctor = function(minusSprite, plusSprite){
161-
plusSprite && this.initWithMinusSpriteAndPlusSprite(minusSprite, plusSprite);
161+
plusSprite !== undefined && this.initWithMinusSpriteAndPlusSprite(minusSprite, plusSprite);
162162
};
163163

164164
cc.ControlSwitch.prototype._ctor = function(maskSprite, onSprite, offSprite, thumbSprite, onLabel, offLabel){
165-
offLabel && this.initWithMaskSprite(maskSprite, onSprite, offSprite, thumbSprite, onLabel, offLabel);
165+
offLabel !== undefined && this.initWithMaskSprite(maskSprite, onSprite, offSprite, thumbSprite, onLabel, offLabel);
166166
};
167167

168168
cc.TableView.prototype._ctor = function(dataSouurce, size, container){
@@ -181,19 +181,19 @@ cc.ScrollView.prototype._ctor = function(size, container) {
181181
/************************ Cocostudio *************************/
182182

183183
ccs.Armature.prototype._ctor = function(name, parentBone) {
184-
parentBone && ccs.Armature.prototype.init.call(this, name, parentBone);
184+
parentBone !== undefined && ccs.Armature.prototype.init.call(this, name, parentBone);
185185
};
186186

187187
ccs.Bone.prototype._ctor = function(name) {
188-
name && ccs.Bone.prototype.init.call(this, name);
188+
name !== undefined && ccs.Bone.prototype.init.call(this, name);
189189
};
190190

191191
ccs.ArmatureAnimation.prototype._ctor = function(armature) {
192-
armature && ccs.ArmatureAnimation.prototype.init.call(this, armature);
192+
armature !== undefined && ccs.ArmatureAnimation.prototype.init.call(this, armature);
193193
};
194194

195195
ccs.Tween.prototype._ctor = function(bone) {
196-
bone && ccs.Tween.prototype.init.call(this, bone);
196+
bone !== undefined && ccs.Tween.prototype.init.call(this, bone);
197197
};
198198

199199
ccs.BatchNode.prototype._ctor = function() {
@@ -205,7 +205,7 @@ ccs.DecorativeDisplay.prototype._ctor = function() {
205205
};
206206

207207
ccs.DisplayManager.prototype._ctor = function(bone) {
208-
bone && ccs.DisplayManager.prototype.init.call(this, bone);
208+
bone !== undefined && ccs.DisplayManager.prototype.init.call(this, bone);
209209
};
210210

211211
ccs.Skin.prototype._ctor = function(fileName, rect) {
@@ -222,7 +222,7 @@ ccs.Skin.prototype._ctor = function(fileName, rect) {
222222
};
223223

224224
ccs.ColliderDetector.prototype._ctor = function(bone) {
225-
bone && ccs.ColliderDetector.prototype.init.call(this, bone);
225+
bone !== undefined && ccs.ColliderDetector.prototype.init.call(this, bone);
226226
};
227227

228228
ccs.TriggerObj.prototype._ctor = function() {

0 commit comments

Comments
 (0)