renderLabel method doesn't really need a container argument
This commit is contained in:
parent
521ab74723
commit
d953dcaab4
@ -5,6 +5,6 @@ export default _.extend({}, Base, {
|
||||
type: 'any-character',
|
||||
|
||||
_render() {
|
||||
this.label = this.renderLabel(this.container, 'any character');
|
||||
this.label = this.renderLabel('any character');
|
||||
}
|
||||
});
|
||||
|
@ -10,8 +10,8 @@ export default {
|
||||
return this.container.getBBox();
|
||||
},
|
||||
|
||||
renderLabel(container, text) {
|
||||
var group = container.group()
|
||||
renderLabel(text) {
|
||||
var group = this.container.group()
|
||||
.addClass('label');
|
||||
|
||||
group.rect();
|
||||
@ -61,7 +61,7 @@ export default {
|
||||
|
||||
this.container.addClass('placeholder');
|
||||
|
||||
this.label = this.renderLabel(this.container, this.textValue);
|
||||
this.label = this.renderLabel(this.textValue);
|
||||
|
||||
this.label.select('rect').attr({
|
||||
rx: 10,
|
||||
|
@ -13,7 +13,7 @@ export default _.extend({}, Base, {
|
||||
},
|
||||
|
||||
_render() {
|
||||
this.label = this.renderLabel(this.container, _.result(this, this.code()));
|
||||
this.label = this.renderLabel(_.result(this, this.code()));
|
||||
|
||||
this.label.select('rect').attr({
|
||||
rx: 3,
|
||||
|
@ -5,7 +5,7 @@ export default _.extend({}, Base, {
|
||||
type: 'literal',
|
||||
|
||||
_render() {
|
||||
this.label = this.renderLabel(this.container, '"' + this.literal.textValue + '"');
|
||||
this.label = this.renderLabel('"' + this.literal.textValue + '"');
|
||||
|
||||
this.label.select('rect').attr({
|
||||
rx: 3,
|
||||
|
@ -11,7 +11,7 @@ export default _.extend({}, Base, {
|
||||
this.contents = {};
|
||||
|
||||
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');
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ export default _.extend({}, Base, {
|
||||
}).bind(this));
|
||||
|
||||
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');
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user