Closed meteorlxy closed 5 years ago
The initial reason why everything was in a single file was because the library used to be bundled with Webpack, which created too much boilerplate and increased the library size.
Now that we migrated to Rollup, we can afford these changes!
If you see anything that could be improved further, feel free to keep contributing 😄
Summary
This PR just extract util functions from
medium-zoom.js
toutils.js
.I took some time to figure out the code structure. Use a standalone
utils.js
could make the code clearer.Just close it if you don't like the refactor.