-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fit image options #317
Fit image options #317
Conversation
Note: the real size option has the added benefit of having the browser's native scaling work as expected. |
…t explaining what it does.
Thank you for PR!
We would write styles to classes (such as |
Thanks! Yeah agreed with @Leeingnyo I think accessing the styles directly is a bit too hacky. I took a quick look and I think in the |
However, @Leeingnyo had the idea of using styles with tags, but we need to look into it before changing the PR. |
@Hiers Sorry to late! I misunderstood something. please forget about what i said before. It seemed you used the hardcoded style to remove this following rule
Rather than using <uk-img
style="
max-width:${fitType === 'horz' ? '100%' : fitType === 'real' ? 'none' : ''};
max-height:${fitType === 'vert' ? '100%' : fitType === 'real' ? 'none' : ''};
"
/> an inline style rule would override the rule of |
As shown in this picture, the position of a right flip panel isn't on expected position in real mode (when viewer horizontally scrolled) it would be fixed giving Edit: 07-12 11:17. It would be fixed perfectly giving
|
Ah, I didn't realise my problem was deleting
|
…al image size option to not be hard coded.
Thanks both! I noticed another small issue - the page flip panels are still not positioned correctly. See screenshot below. The right panel should be the right most 1/3 area of the entire screen, and not the right 1/3 of the page. I believe this is caused by the new |
Nice catch! And your fix did work. |
… not of the page. (same for left flip panels)
LGTM, thanks! |
Adding the image fit feature mentioned in #147.
The setFit function is hardcoded to look for the css file and attribute on those exact spots and looks likely to break if that file is changed. Asides from this, the only other way I know is to make a function to look for it given the name of the file and attribute, but it'd be a function that would only be used on this one occasion.
And if anyone has a better idea for how the option should appear in the settings I'd like to hear it, design is not my passion.