captbaritone / captbaritone/webamp

How to programmatically move Webamp? (through CSS styling?)

Open
#1,245 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
11.3k
Forks
796
PR merge metrics
No merged PRs in 30d

Description

So, I've seen this question pop up on various forums over the last 3 years [up to just a few weeks ago](https://www.reddit.com/r/neocities/comments/17wsxkz/positioning_webamp_herlp/), but couldn't find any answer: Is it possible to programmatically override Webamp's position variables? They don't seem to be publicly exposed.

I've hacked the initial position to my liking (couldn't use `options.__initialWindowLayout` because I wanted a relative viewport percentage rather than absolute values) and it works fine, except that when we click for the first time on any of Webamp's components, it instantly reverts back to the center of the viewport. Subsequent clicks and drags are OK. I found that the absolute positioning of Webamp relies on private coordinate variables that don't seem to be exposed at all:

Screenshot 2023-12-17 at 11 05 21 AM

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.