Add ratio as a json data #1
Labels
No labels
kind/bug
kind/duplicate
kind/enhancement
kind/question
scope/core
scope/core and generator
scope/demos
scope/generator
scope/meta
status/invalid
status/wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: caribaud/melpomene#1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Right now the pages height and width are hardcoded into the HTML reader frame :
<div id="reader-pages" class="animated" data-pages-width="9999" data-pages-height="9999" hidden>The only goal is to compute the page ratio :
function pageOriginalHeight() {return parseInt(READER_PAGES.dataset.pagesHeight)}function pageOriginalWidth() {return parseInt(READER_PAGES.dataset.pagesWidth)}function readerFrameRatio() {return READER_CONTENT_FRAME.clientWidth / READER_CONTENT_FRAME.clientHeight}function pageRatio() {return READER_PAGES.dataset.pagesWidth / READER_PAGES.dataset.pagesHeight}This could be pre-computed by the generator and added into the json file, the SVG contains the info : svg tag, attribute width / height.
New structure could be : melpomene -> pages_ratio and melpomene -> zooms ?
Adding ratio is no longer necessary as it must be dynamically inferred when data is from HTML