Cleanup of charset rendering code

This commit is contained in:
Jeff Avallone 2014-12-09 17:48:44 -05:00
parent 3bbd55c36a
commit 0cb090bc10

View File

@ -10,9 +10,7 @@ export default _.extend({}, Base, {
this.label = this.container.text()
.attr({
text: this.invert() ? 'None of:' : 'One of:'
})
.transform(Snap.matrix()
.translate(0, 0));
});
this.box = this.container.rect()
.addClass('charset-box')
@ -23,7 +21,7 @@ export default _.extend({}, Base, {
this.partContainer = this.container.group();
_.each(this.parts.elements, ((part) => {
_.each(this.parts.elements, (part => {
part.container = this.partContainer.group();
part.render();
}).bind(this));
@ -32,7 +30,7 @@ export default _.extend({}, Base, {
position() {
var box, offset = 0;
_.each(this.parts.elements, ((part) => {
_.each(this.parts.elements, (part => {
var box;
part.position();
@ -47,7 +45,7 @@ export default _.extend({}, Base, {
box = this.partContainer.getBBox();
_.each(this.parts.elements, ((part) => {
_.each(this.parts.elements, (part => {
var partBox = part.container.getBBox();
part.container.transform(Snap.matrix()