No need to save most label objects

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

View File

@ -5,6 +5,6 @@ export default _.extend({}, Base, {
type: 'any-character', type: 'any-character',
_render() { _render() {
this.label = this.renderLabel('any character'); this.renderLabel('any character');
} }
}); });

View File

@ -65,12 +65,11 @@ export default {
this.container.addClass('placeholder'); this.container.addClass('placeholder');
this.label = this.renderLabel(this.textValue); this.renderLabel(this.textValue)
.select('rect').attr({
this.label.select('rect').attr({ rx: 10,
rx: 10, ry: 10
ry: 10 });
});
}, },
_position() { _position() {

View File

@ -13,12 +13,11 @@ export default _.extend({}, Base, {
}, },
_render() { _render() {
this.label = this.renderLabel(_.result(this, this.code())); this.renderLabel(_.result(this, this.code()))
.select('rect').attr({
this.label.select('rect').attr({ rx: 3,
rx: 3, ry: 3
ry: 3 });
});
}, },
// Escape code mappings // Escape code mappings

View File

@ -5,11 +5,10 @@ export default _.extend({}, Base, {
type: 'literal', type: 'literal',
_render() { _render() {
this.label = this.renderLabel('"' + this.literal.textValue + '"'); this.renderLabel('"' + this.literal.textValue + '"')
.select('rect').attr({
this.label.select('rect').attr({ rx: 3,
rx: 3, ry: 3
ry: 3 });
});
} }
}); });