question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CurrentImage height

See original GitHub issue

I’m submitting a…


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[x] Documentation issue or request
[ ] Support request

Current behavior

Hi.

Great module! I would like to ask you something since I’m not able to find it in the docs.

As I understand from: angular-modal-gallery/libs/angular-modal-gallery/src/components/current-image/current-image.scss -> $curr-img-max-height: 60vh; the current height of the image inside the modal is 60% of the screen height.

Since my images are quite stretched vertically I would prefer this value to be about 80. Otherwise, the image become quite small. Is there any way to configure it?

If not, would be possible to override it in my component? I’ve tried overriding #current-image in my component’s .css but unfortunately this trick didn’t work.

Expected behavior

It would be nice to be able to control this value from configuration. or If possible, add to documentation how to override it.

Minimal reproduction of the problem with instructions

My official live example on StackBlitz (based on https://stackblitz.com/edit/angular-modal-gallery-v5) is:

What is the motivation / use case for changing the behavior?

I’m currently using this module

Environment (the most important section to fill very carefully)


- Node version: 8.2.1  
- npm version: 5.3.0  
- Operating System and version:  Windows 10
- Angular version: 5.2.9 
- angular-cli version (or SystemJS/Webpack): 1.6.2 
- I'm using Server Side Rendering with angular-universal: NO
- I'm compiling with mode: DEBUG



Browser:
- [x] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

Others:

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
Ks89commented, Mar 24, 2018

I schedule this issue to investigate and try to find a way to add an input param to choose this value.

1reaction
Ks89commented, Mar 19, 2018

I tried and it’s working.

I added this to my main styles.scss

#current-image {
  max-height: 80vh !important;
  max-width: 80vh !important;
  height: auto !important;
}

Obviously change values as you prefer. However, be careful on IE11 and Edge. If you want to support all browsers, test all of them, also resizing the window both vertically and horizontally.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Get Current Image Size (Width & Height) in JavaScript
Answer: Use the JavaScript clientWidth property​​ You can simply use the JavaScript clientWidth property to get the current width and height of an...
Read more >
currentImage | Apple Developer Documentation
The current symbol size, style, and weight. var imageView: UIImageView? The button's image view.
Read more >
Get current Image width and height after max ... - Stack Overflow
I'm adding, via javascript, a class to the image elements based on their proportions. The 3 classes will set the max-width and max-height...
Read more >
Get width/height of current image / Get ROI information of user ...
Solved: Hello, i have two problems: First: Is there an option to get the width and height of the current image to use...
Read more >
Macro Commands - ImageJ - NIH
Adds n to the current image or rectangular selection, where -255 <= n <= 255. ... GetPicSize(width,height) / Miscellaneous Macro Commands
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found