antfu / drauu

Headless SVG-based drawboard in browser.
https://drauu.netlify.app/
MIT License
1.2k stars 64 forks source link

feat: add custom window support #40

Closed JuanM04 closed 8 months ago

JuanM04 commented 8 months ago

Description

Adds support to listen mouse events from a window that isn't the default.

Linked Issues

Additional context

I was trying to setup drauu on a popup, which has a different window. The problem was that window still references the main window instead of the popup, so the coordinates emitted by the mouse events were way off. This PR fixes that.

JuanM04 commented 8 months ago

Updated the name of the option!