Some cleanup
This commit is contained in:
parent
e7e97b0008
commit
502e4494d9
@ -28,13 +28,11 @@ export default {
|
||||
|
||||
render_bbox(container, box) {
|
||||
container.path(box.path)
|
||||
.attr({
|
||||
'class': 'bounding-box'
|
||||
});
|
||||
.addClass('bounding-box');
|
||||
},
|
||||
|
||||
render() {
|
||||
this.container.attr({ 'class': 'placeholder' });
|
||||
this.container.addClass('placeholder');
|
||||
|
||||
this.label = this.render_label(this.container, this.textValue);
|
||||
|
||||
|
@ -11,7 +11,7 @@ export default _.extend({}, Base, {
|
||||
|
||||
if (this.anchor_start()) {
|
||||
this.contents.anchor_start = this.render_label(this.container, 'Start of line')
|
||||
.attr({ 'class': 'anchor' });
|
||||
.addClass('anchor');
|
||||
}
|
||||
|
||||
this.contents.parts = _.map(this.parts(), function(part) {
|
||||
@ -22,7 +22,7 @@ export default _.extend({}, Base, {
|
||||
|
||||
if (this.anchor_end()) {
|
||||
this.contents.anchor_end = this.render_label(this.container, 'End of line')
|
||||
.attr({ 'class': 'anchor' });
|
||||
.addClass('anchor');
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -9,14 +9,12 @@ export default _.extend({}, Base, {
|
||||
.translate(10, 0));
|
||||
this.regexp.render();
|
||||
|
||||
this.start = this.container.circle().attr({
|
||||
r: 5,
|
||||
'class': 'pin'
|
||||
});
|
||||
this.end = this.container.circle().attr({
|
||||
r: 5,
|
||||
'class': 'pin'
|
||||
});
|
||||
this.start = this.container.circle()
|
||||
.addClass('pin')
|
||||
.attr({ r: 5 });
|
||||
this.end = this.container.circle()
|
||||
.addClass('pin')
|
||||
.attr({ r: 5 });
|
||||
},
|
||||
|
||||
position() {
|
||||
@ -26,7 +24,7 @@ export default _.extend({}, Base, {
|
||||
|
||||
contentBox = this.regexp.container.getBBox();
|
||||
|
||||
this.regexp.container.before(
|
||||
this.container.prepend(
|
||||
this.container.path(Snap.format('M0,{cy}h10M{x2},{cy}h10', contentBox))
|
||||
);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user