From 9ac25b9a5010c1d8ce2618e620ec13a665429cdb Mon Sep 17 00:00:00 2001 From: Jeff Avallone Date: Wed, 10 Dec 2014 19:23:14 -0500 Subject: [PATCH] No need to save most label objects --- src/js/parser/javascript/any_character.js | 2 +- src/js/parser/javascript/base.js | 11 +++++------ src/js/parser/javascript/escape.js | 11 +++++------ src/js/parser/javascript/literal.js | 11 +++++------ 4 files changed, 16 insertions(+), 19 deletions(-) diff --git a/src/js/parser/javascript/any_character.js b/src/js/parser/javascript/any_character.js index fd99555..88eca9e 100644 --- a/src/js/parser/javascript/any_character.js +++ b/src/js/parser/javascript/any_character.js @@ -5,6 +5,6 @@ export default _.extend({}, Base, { type: 'any-character', _render() { - this.label = this.renderLabel('any character'); + this.renderLabel('any character'); } }); diff --git a/src/js/parser/javascript/base.js b/src/js/parser/javascript/base.js index b40a103..753287d 100644 --- a/src/js/parser/javascript/base.js +++ b/src/js/parser/javascript/base.js @@ -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() { diff --git a/src/js/parser/javascript/escape.js b/src/js/parser/javascript/escape.js index a921a76..f086754 100644 --- a/src/js/parser/javascript/escape.js +++ b/src/js/parser/javascript/escape.js @@ -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 diff --git a/src/js/parser/javascript/literal.js b/src/js/parser/javascript/literal.js index 92ae7e6..7f41b17 100644 --- a/src/js/parser/javascript/literal.js +++ b/src/js/parser/javascript/literal.js @@ -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 + }); } });