Replacing some calls to _.each with new for loops
This commit is contained in:
parent
26bf0fcd52
commit
3d42894ac2
@ -172,13 +172,13 @@ export default {
|
|||||||
return offset + options.padding + box.width;
|
return offset + options.padding + box.width;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
_.each(items, item => {
|
for (var item of items) {
|
||||||
var box = normalize(item.getBBox());
|
let box = normalize(item.getBBox());
|
||||||
|
|
||||||
item.transform(Snap.matrix()
|
item.transform(Snap.matrix()
|
||||||
.add(item.transform().localMatrix)
|
.add(item.transform().localMatrix)
|
||||||
.translate(0, verticalCenter - box.ay));
|
.translate(0, verticalCenter - box.ay));
|
||||||
});
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
spaceVertically(items, options) {
|
spaceVertically(items, options) {
|
||||||
@ -201,11 +201,11 @@ export default {
|
|||||||
return offset + options.padding + box.height;
|
return offset + options.padding + box.height;
|
||||||
}, 0);
|
}, 0);
|
||||||
|
|
||||||
_.each(items, item => {
|
for (var item of items) {
|
||||||
item.transform(Snap.matrix()
|
item.transform(Snap.matrix()
|
||||||
.add(item.transform().localMatrix)
|
.add(item.transform().localMatrix)
|
||||||
.translate(horizontalCenter - item.getBBox().cx, 0));
|
.translate(horizontalCenter - item.getBBox().cx, 0));
|
||||||
});
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
renderLabeledBox(label, content, options) {
|
renderLabeledBox(label, content, options) {
|
||||||
|
Loading…
Reference in New Issue
Block a user