Skip to content
Snippets Groups Projects
Commit 35fe8cd9 authored by Lasse Overgaard Møldrup's avatar Lasse Overgaard Møldrup
Browse files

Fix deadly sins

parent 3864317c
No related branches found
No related tags found
2 merge requests!29Release of Prototype,!22Move blocks
......@@ -185,7 +185,7 @@ export default {
const missingWidth = origBlock.width / (blocks.length - 1);
blocks.splice(origCol, 1);
for (let block of blocks)
for (const block of blocks)
block.width += missingWidth;
}
......@@ -274,13 +274,13 @@ export default {
if (origRow !== row) {
const origTotalWidth = origBlocks.reduce((total, block) => total + block.width, 0);
const origScaleFactor = 100 / origTotalWidth;
for (let block of origBlocks) {
for (const block of origBlocks) {
block.width *= origScaleFactor;
}
const destTotalWidth = destBlocks.reduce((total, block) => total + block.width, 0);
const destScaleFactor = 100 / destTotalWidth;
for (let block of destBlocks) {
for (const block of destBlocks) {
block.width *= destScaleFactor;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment