aboutsummaryrefslogtreecommitdiff
path: root/public/javascripts/zoom.js
diff options
context:
space:
mode:
Diffstat (limited to 'public/javascripts/zoom.js')
-rw-r--r--public/javascripts/zoom.js30
1 files changed, 0 insertions, 30 deletions
diff --git a/public/javascripts/zoom.js b/public/javascripts/zoom.js
deleted file mode 100644
index 59b80db..0000000
--- a/public/javascripts/zoom.js
+++ /dev/null
@@ -1,30 +0,0 @@
-const schedule = require('./schedule')
-
-const self = {}
-
-self._nodes = {
- body: document.body
-}
-
-self._handleResize = function () {
- // the table node may not exist before this function is called
- const tableNode = document.querySelector('center > table')
-
- // infact, it may not even exist when this function is called.
- if (!tableNode) return
-
- const tableWidth = tableNode.getBoundingClientRect().width
- const tableGoalWidth = self._nodes.body.getBoundingClientRect().width * 0.9
- const zoomFactor = tableGoalWidth / tableWidth
-
- if (zoomFactor < 1) {
- tableNode.style.zoom = `${zoomFactor}`
- } else {
- tableNode.style.zoom = `1`
- }
-}
-
-schedule.on('load', self._handleResize)
-window.addEventListener('resize', self._handleResize)
-
-module.exports = self