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',
_render() {
this.label = this.renderLabel('any character');
this.renderLabel('any character');
}
});

View File

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

View File

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

View File

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