Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn’t Scale if elements are % (or vw/vh) #42

Open
Villmer opened this issue Sep 9, 2022 · 0 comments
Open

Doesn’t Scale if elements are % (or vw/vh) #42

Villmer opened this issue Sep 9, 2022 · 0 comments

Comments

@Villmer
Copy link

Villmer commented Sep 9, 2022

Describe the bug
if docs are % (or vw/vh), the elements should scale when window resized.

To Reproduce
Steps to reproduce the behavior:
<!— 2 divs —>

// JS

var modxy1 = new JoyStick('xy1', {
    internalFillColor:'#db3236',
    internalStrokeColor:'#db3236',
    externalStrokeColor:'rgba(0,0,0,0)',
    //internalLineWidth:0,
    externalLineWidth:4,
}, function(stickData) {xy1_dir = stickData.cardinalDirection});
var modxy2 = new JoyStick('xy2', {
    internalFillColor:'#4885ed',
    internalStrokeColor:'#4885ed',
    externalStrokeColor:'rgba(0,0,0,0)',
    //internalLineWidth:0,
    externalLineWidth:4,
}, function(stickData) {xy2_dir = stickData.cardinalDirection});

Expected behavior
Should scale elements and re-center circle
Screenshot 2022-09-09 at 13 55 02
Screenshot 2022-09-09 at 13 55 15

@Villmer Villmer changed the title Doesn’t Scale if elements are % Doesn’t Scale if elements are % (or vw/vh) Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant