From feebb86fbfb4ece72f8283cf96ed9ece9996d8fd Mon Sep 17 00:00:00 2001 From: zilongshanren Date: Fri, 17 Feb 2017 20:26:03 +0800 Subject: [PATCH] add spacingX property to label component --- cocos2d/core/components/CCLabel.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cocos2d/core/components/CCLabel.js b/cocos2d/core/components/CCLabel.js index 58b8fee455..b8e13394fb 100644 --- a/cocos2d/core/components/CCLabel.js +++ b/cocos2d/core/components/CCLabel.js @@ -435,6 +435,16 @@ var Label = cc.Class({ readonly: true, visible: true, animatable: false + }, + + spacingX: { + default: 0, + notify: function() { + if (this._sgNode) { + this._sgNode.setSpacingX(this.spacingX); + this._updateNodeSize(); + } + } } },