audrenbdb / angular-particlesjs

Port of the particles.js library from Vincent Garreau into an angular directive optimized for performances
24 stars 11 forks source link

Particles rendering only at HostListener("window.resize") #3

Open DiogoLAzores opened 4 years ago

DiogoLAzores commented 4 years ago

As referred on this stackoverflow question by Timothy Louw, particles are rendered only when the HostListener("window.resize") detected changes, triggering the setCanvasSize().

Also so, setCanvasSize() should be moved from the constructor and into ngOnInit()