renderLabel method doesn't really need a container argument

This commit is contained in:
Jeff Avallone 2014-12-10 19:12:17 -05:00
parent 521ab74723
commit d953dcaab4
5 changed files with 8 additions and 8 deletions

View File

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

View File

@ -10,8 +10,8 @@ export default {
return this.container.getBBox(); return this.container.getBBox();
}, },
renderLabel(container, text) { renderLabel(text) {
var group = container.group() var group = this.container.group()
.addClass('label'); .addClass('label');
group.rect(); group.rect();
@ -61,7 +61,7 @@ export default {
this.container.addClass('placeholder'); this.container.addClass('placeholder');
this.label = this.renderLabel(this.container, this.textValue); this.label = this.renderLabel(this.textValue);
this.label.select('rect').attr({ this.label.select('rect').attr({
rx: 10, rx: 10,

View File

@ -13,7 +13,7 @@ export default _.extend({}, Base, {
}, },
_render() { _render() {
this.label = this.renderLabel(this.container, _.result(this, this.code())); this.label = this.renderLabel(_.result(this, this.code()));
this.label.select('rect').attr({ this.label.select('rect').attr({
rx: 3, rx: 3,

View File

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

View File

@ -11,7 +11,7 @@ export default _.extend({}, Base, {
this.contents = {}; this.contents = {};
if (this.anchorStart()) { if (this.anchorStart()) {
this.contents.anchor_start = this.renderLabel(this.container, 'Start of line') this.contents.anchor_start = this.renderLabel('Start of line')
.addClass('anchor'); .addClass('anchor');
} }
@ -22,7 +22,7 @@ export default _.extend({}, Base, {
}).bind(this)); }).bind(this));
if (this.anchorEnd()) { if (this.anchorEnd()) {
this.contents.anchor_end = this.renderLabel(this.container, 'End of line') this.contents.anchor_end = this.renderLabel('End of line')
.addClass('anchor'); .addClass('anchor');
} }
} else { } else {