Merge pull request #2093 from knoxHuang/v1.7-release

restore toggleGroup code
This commit is contained in:
Jare Guo
2017-11-03 09:39:05 +08:00
committed by GitHub
2 changed files with 11 additions and 10 deletions
-2
View File
@@ -618,8 +618,6 @@ if (CC_DEBUG) {
"8301": "Camera does not support Canvas Mode.", //cc.Camera.enabled
// AudioEngine: 8400
"8400": "Wrong type arguments, 'filePath' must be a String.", // cc.audioEngine.play
// ToggleGroup: 8500
"8500": "The ToggleGroup.toggleItems api will be removed in v2.0, please obtain toggles in other ways. \uD83D\uDE30",
};
cc._LogInfos = logs;
}
+11 -8
View File
@@ -54,6 +54,17 @@ var ToggleGroup = cc.Class({
tooltip: CC_DEV && 'i18n:COMPONENT.toggle_group.allowSwitchOff',
default: false
},
/**
* !#en Read only property, return the toggle items array reference managed by toggleGroup.
* !#zh 只读属性,返回 toggleGroup 管理的 toggle 数组引用
* @property {Array} toggleItems
*/
toggleItems: {
get: function () {
return this._toggleItems;
}
}
},
updateToggles: function (toggle) {
@@ -112,14 +123,6 @@ var ToggleGroup = cc.Class({
start: function () {
this._makeAtLeastOneToggleChecked();
}
});
var JS = require('../platform/js');
JS.get(ToggleGroup.prototype, 'toggleItems', function () {
cc.warnID(8500);
return this._toggleItems;
});
cc.ToggleGroup = module.exports = ToggleGroup;