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.

this.render() not showing gallery unless i resize the window

See original GitHub issue

First, I would like to congratulate you on the quality of this gallery and thank you for sharing with the community.

I just installed the component, it works but… the gallery doesn’t render unless I resize the screen.

I pinpointed the problem to the this part :

// twice, single leads to different strange browser behaviour this.render(); this.render();

I even tried using setTimeout with 5 seconds timeout, sometimes it works, sometimes it doesn’t.

Again, when I change resize the window it works just fine.

Do you have any idea how to fix this ?

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
jschuldescommented, Feb 6, 2020

I´ve had the same problem. The thumbnails in the invisible part of the page doesn´t get rendered after they got scrolled into view. I started a new small project with angular 8.2 and material. In my case the problem was that I didn´t receive a scroll event and therefore the code for loading the images wasn´t called. Following line added in ngOnInit() resolved my problem:

window.addEventListener('scroll', this.triggerCycle.bind(this), true);

In ngOnDestroy I just remove the listener.

0reactions
mmeziancommented, Jul 27, 2019

Anyone else could test the script bellow the fold (bellow the visible part of the screen) and see if it loads ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix an image when the window is resized?
I've managed to make the title div responsive, but not sure how to fix the image issue. This is my index.js file import...
Read more >
sf::RenderWindow Class Reference - SFML
Change the size of the rendering region of the window. ... All other functions such as pollEvent() or display() will still work (i.e....
Read more >
background-size - CSS: Cascading Style Sheets | MDN
If both components of background-size are specified and are not auto : The background image is rendered at the specified size.
Read more >
Understanding Success Criterion 1.4.4: Resize Text | WAI - W3C
Except for captions and images of text, text can be resized without ... The intent of this Success Criterion is to ensure that...
Read more >
How to resize an image in HTML? - ImageKit.io
If your image doesn't fit the layout, you can resize it in the HTML. ... We can render it with a height of...
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