Updating to automatically size labels when positioning

This commit is contained in:
Jeff Avallone 2014-12-10 19:16:21 -05:00
parent d953dcaab4
commit 15655900f1
2 changed files with 4 additions and 9 deletions

View File

@ -20,6 +20,8 @@ export default {
text: text
});
this._labelGroups.push(group);
return group;
},
@ -39,6 +41,7 @@ export default {
},
render() {
this._labelGroups = [];
this._render();
},
@ -46,6 +49,7 @@ export default {
if (this._proxy) {
this._proxy.position();
} else {
_.each(this._labelGroups, this.positionLabel.bind(this));
this._position();
}
},
@ -70,7 +74,6 @@ export default {
},
_position() {
this.positionLabel(this.label);
},
spaceHorizontally(items, options) {

View File

@ -33,14 +33,6 @@ export default _.extend({}, Base, {
_position() {
var items;
if (this.contents.anchor_start) {
this.positionLabel(this.contents.anchor_start);
}
if (this.contents.anchor_end) {
this.positionLabel(this.contents.anchor_end);
}
_.invoke(this.contents.parts, 'position');
items = _(this.contents).values().flatten().value();