mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 16:12:40 +08:00
Merge pull request #1296 from zilongshanren/fix-layout-padding-migrate
fix migrate padding data
This commit is contained in:
@@ -272,8 +272,7 @@ var Layout = cc.Class({
|
||||
},
|
||||
|
||||
_N$padding: {
|
||||
default: 0,
|
||||
editorOnly: true
|
||||
default: 0
|
||||
},
|
||||
/**
|
||||
* !#en The left padding of layout, it only effect the layout in one direction.
|
||||
@@ -415,10 +414,8 @@ var Layout = cc.Class({
|
||||
this.node.setContentSize(this._layoutSize);
|
||||
}
|
||||
|
||||
if(CC_EDITOR) {
|
||||
if(this._N$padding !== 0) {
|
||||
this._migratePaddingData();
|
||||
}
|
||||
if(this._N$padding !== 0) {
|
||||
this._migratePaddingData();
|
||||
}
|
||||
|
||||
this.node.on('size-changed', this._resized, this);
|
||||
|
||||
Reference in New Issue
Block a user