Adding tests for CharsetRange nodes

This commit is contained in:
Jeff Avallone
2014-12-20 10:18:00 -05:00
parent d27831a265
commit 8a9a129856
3 changed files with 74 additions and 6 deletions
+7 -6
View File
@@ -1,4 +1,4 @@
import { spaceHorizontally } from '../../util.js';
import util from '../../util.js';
import _ from 'lodash';
import Q from 'q';
@@ -8,8 +8,7 @@ export default {
_render() {
var contents = [
this.first,
this.container.text()
.attr({ text: '-' }),
this.container.text(0, 0, '-'),
this.last
];
@@ -17,9 +16,11 @@ export default {
this.first.render(this.container.group()),
this.last.render(this.container.group())
])
.then(spaceHorizontally.bind(this, contents, {
padding: 5
}));
.then(() => {
util.spaceHorizontally(contents, {
padding: 5
});
});
},
setup() {
+7
View File
@@ -70,3 +70,10 @@ export function spaceVertically(items, options) {
.translate(horizontalCenter - item.getBBox().cx, 0));
}
}
export default {
customEvent,
normalizeBBox,
spaceHorizontally,
spaceVertically
};