Closed agm1984 closed 4 years ago
Hi, thanks for the kind words!
Please try lowercase @windowresized
instead of @windowResized
. Also it's already supported, so you don't need :additionalEvents
!
This is a gotcha multiple people have already had issues with, so I guess it's finally time for me to add FAQ :D
Thanks for the turbo reply velocity. I just tried and that did work. Thanks a lot.
You're welcome 🙂
Hey I'm having an issue with the
windowResized
event.These don't work for me. I found this issue thread: https://github.com/Kinrany/vue-p5/issues/11
In here, you recommended:
That also doesn't work for me, and the issue is that
document.addEventListener()
doesn't work. When I change it towindow
, it starts working and correctly fires theresize
event.I figured I would make an issue for this in case anyone else encounters this. It will probably affect the generic/edge cases around
:additionalEvents="[]"
if it is callingdocument.
in the library code.Beyond that, nice work. I just ported over an ancient vanilla JavaScript "sacred geometry" generator, and the code is so much nicer to work with now via vue-p5.