hanabi-live icon indicating copy to clipboard operation
hanabi-live copied to clipboard

chat should default to being flush with the right-edge of the window regardless of recorded width from last game

Open timotree3 opened this issue 4 years ago • 6 comments

timotree3 avatar Dec 01 '20 22:12 timotree3

it remembers x y width and height

Zamiell avatar Dec 01 '20 22:12 Zamiell

seems like it stores wrong values for those. I moved my chat window to the top of the screen and the real y was 0 but the stored y was -7. Is it storing the delta from the latest movement instead of the actual value?

timotree3 avatar Dec 04 '20 17:12 timotree3

no idea, can you test?

Zamiell avatar Dec 04 '20 17:12 Zamiell

it might be -7 because the there might be some padding at the top of the window that you can't see

Zamiell avatar Dec 04 '20 17:12 Zamiell

I went in the debugger and during the isOffscreen xroutine when it accesses the element's bounding box it comes up with 0 for the y. Then after refreshing the page when it tries to recreate it from localstorage, it comes up with 7 and determines it's off the bottom end of the screen because it decided to move my chat down 7 pixels after I resized my chat to be as tall as possible

timotree3 avatar Dec 04 '20 17:12 timotree3

sounds like you might have to hardcode +7 to the x and y before the isOffscreen check or something?

Zamiell avatar Dec 04 '20 19:12 Zamiell