From ae74a71637148fcce04be50465dfdd7af37db9d7 Mon Sep 17 00:00:00 2001 From: klemek Date: Sat, 7 Dec 2019 11:45:49 +0100 Subject: [PATCH] code refactor --- index.html | 12 ++++++------ main.js | 34 +++++++++++++++++++++------------- 2 files changed, 27 insertions(+), 19 deletions(-) diff --git a/index.html b/index.html index 9b1d5b9..c2ddf5b 100644 --- a/index.html +++ b/index.html @@ -22,7 +22,7 @@
- + @@ -36,7 +36,7 @@ - + @@ -44,7 +44,7 @@ - + - + @@ -70,7 +70,7 @@ - + - +
Sheet Size:
Boxes: ×
Box size: cm Use ratio
Box ratio:
Box margin: cm Sheet padding
Sheet padding: { + constants.papers.forEach(s => { self.sheets.push({ title: `${s.title} (${s.w}×${s.h}cm)`, w: s.w, h: s.h }); }); - data.papers.forEach(s => { + constants.papers.forEach(s => { self.sheets.push({ title: `${s.title} landscape (${s.h}×${s.w}cm)`, w: s.h, h: s.w }); }); - data.ratios.forEach(r => { + constants.ratios.forEach(r => { self.ratios.push({ title: `${r.rw}:${r.rh}`, rw: r.rw,