mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 17:42:41 +08:00
Merge branch 'master' into refineSprite
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
machine:
|
||||
node:
|
||||
version: 5.1.1
|
||||
|
||||
dependencies:
|
||||
pre:
|
||||
- npm install -g gulp
|
||||
- npm install gulp-qunit
|
||||
@@ -533,6 +533,7 @@ cc.Director = Class.extend(/** @lends cc.Director# */{
|
||||
// Activate
|
||||
if (scene instanceof cc.Scene) {
|
||||
scene._activate();
|
||||
this.emit(cc.Director.EVENT_AFTER_SCENE_LAUNCH, scene);
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1071,6 +1072,12 @@ cc.Director.EVENT_PROJECTION_CHANGED = "director_projection_changed";
|
||||
*/
|
||||
cc.Director.EVENT_BEFORE_SCENE_LAUNCH = "director_before_scene_launch";
|
||||
|
||||
/**
|
||||
* @event EVENT_AFTER_SCENE_LAUNCH
|
||||
* @param {cc.Scene} newScene
|
||||
*/
|
||||
cc.Director.EVENT_AFTER_SCENE_LAUNCH = "director_after_scene_launch";
|
||||
|
||||
/**
|
||||
* The event after update of cc.Director
|
||||
* @constant
|
||||
|
||||
@@ -344,6 +344,15 @@ var Sprite = cc.Class({
|
||||
|
||||
onLoad: function () {
|
||||
this._super();
|
||||
this.node.on('size-changed', this._resized, this);
|
||||
},
|
||||
|
||||
onDestroy: function () {
|
||||
this._super();
|
||||
this.node.off('size-changed', this._resized, this);
|
||||
},
|
||||
|
||||
_validateSizeMode: function() {
|
||||
//do processing
|
||||
if (-1 === this._sizeMode) {
|
||||
//FIXME:_useOriginalSize is deprecated, since v0.8, it need to be deleted
|
||||
@@ -354,12 +363,6 @@ var Sprite = cc.Class({
|
||||
}
|
||||
this._isTrimmedMode = true;
|
||||
}
|
||||
this.node.on('size-changed', this._resized, this);
|
||||
},
|
||||
|
||||
onDestroy: function () {
|
||||
this._super();
|
||||
this.node.off('size-changed', this._resized, this);
|
||||
},
|
||||
|
||||
_applyAtlas: CC_EDITOR && function (spriteFrame) {
|
||||
@@ -444,6 +447,8 @@ var Sprite = cc.Class({
|
||||
sgNode.setVisible(false);
|
||||
}
|
||||
|
||||
this._validateSizeMode();
|
||||
|
||||
this._applySpriteFrame(null);
|
||||
|
||||
// should keep the size of the sg node the same as entity,
|
||||
@@ -452,6 +457,7 @@ var Sprite = cc.Class({
|
||||
this._applySpriteSize();
|
||||
|
||||
sgNode.setRenderingType(this._type);
|
||||
sgNode.enableTrimmedContentSize(this._isTrimmedMode);
|
||||
},
|
||||
|
||||
_resized: function () {
|
||||
|
||||
+8
-6
@@ -14,21 +14,23 @@
|
||||
"browserify": "11.2.0",
|
||||
"chalk": "1.1.0",
|
||||
"del": "1.2.0",
|
||||
"event-stream": "3.3.1",
|
||||
"fire-fs": "0.2.1",
|
||||
"gulp": "3.8.11",
|
||||
"gulp-cached": "1.0.1",
|
||||
"gulp": "3.9.0",
|
||||
"gulp-cached": "1.1.0",
|
||||
"gulp-concat": "2.6.0",
|
||||
"gulp-fb": "0.5.0",
|
||||
"gulp-header": "1.2.2",
|
||||
"gulp-jshint": "1.11.0",
|
||||
"gulp-jshint": "1.11.2",
|
||||
"gulp-mirror": "0.4.0",
|
||||
"gulp-plumber": "0.6.6",
|
||||
"gulp-rename": "1.2.2",
|
||||
"gulp-shell": "0.4.1",
|
||||
"gulp-sourcemaps": "1.5.2",
|
||||
"gulp-uglify": "1.2.0",
|
||||
"gulp-util": "3.0.5",
|
||||
"jshint-stylish": "2.0.0",
|
||||
"require-dir": "0.1.0",
|
||||
"gulp-util": "3.0.6",
|
||||
"jshint-stylish": "2.0.1",
|
||||
"require-dir": "0.3.0",
|
||||
"vinyl": "1.1.0",
|
||||
"vinyl-buffer": "1.0.0",
|
||||
"vinyl-source-stream": "1.0.0"
|
||||
|
||||
Reference in New Issue
Block a user