forked from HoloTech/twitch-subathon-timer
v4.1-Spacing adjustments
- relaxed vertical spacing and increased horizontal gap between text and graphic - cleanup
This commit is contained in:
16
timer.js
16
timer.js
@@ -133,7 +133,7 @@ class TimerRenderer {
|
||||
if (this.scrollboxes[i].id == 'ScrollWrapGoal') {
|
||||
|
||||
// Check if element text overflows
|
||||
if (this.goal_name.getBoundingClientRect().width > (this.scrollboxes[i].getBoundingClientRect().width * .95) ) {
|
||||
if (this.goal_name.getBoundingClientRect().width > (this.scrollboxes[i].getBoundingClientRect().width * .85) ) {
|
||||
// Toggle animation
|
||||
this.goal_name.classList.add("scrollAnim");
|
||||
this.goal_namedupe.classList.add("scrollAnim");
|
||||
@@ -152,7 +152,7 @@ class TimerRenderer {
|
||||
} else {
|
||||
|
||||
// Check if element text overflows
|
||||
if (this.userboxes[i].getBoundingClientRect().width > (this.scrollboxes[i].getBoundingClientRect().width * .8) ) {
|
||||
if (this.userboxes[i].getBoundingClientRect().width > (this.scrollboxes[i].getBoundingClientRect().width * .75) ) {
|
||||
// Toggle animation
|
||||
this.userboxes[i].classList.add("scrollAnim");
|
||||
this.userdupeboxes[i].classList.add("scrollAnim");
|
||||
@@ -178,20 +178,20 @@ class TimerRenderer {
|
||||
reset() {
|
||||
this.timer.textContent = "00:00";
|
||||
this.goal_label.textContent = "Next Goal:";
|
||||
this.goal_name.textContent = "The answer was..";
|
||||
this.goal_namedupe.textContent = "The answer was..";
|
||||
this.goal_name.textContent = "The answer is...";
|
||||
this.goal_namedupe.textContent = "The answer is...";
|
||||
this.goal_progress.textContent = "0000/0000";
|
||||
|
||||
this.topusers_label.textContent = "Leaderboard:";
|
||||
this.topusers_user1_num.textContent = "1";
|
||||
this.topusers_user1_name.textContent = "Username_Very_Super_Long12";
|
||||
this.topusers_userdupe1_name.textContent = "Username_Very_Super_Long12";
|
||||
this.topusers_user1_name.textContent = "Username4";
|
||||
this.topusers_userdupe1_name.textContent = "Username4";
|
||||
this.topusers_user2_num.textContent = "2";
|
||||
this.topusers_user2_name.textContent = "User";
|
||||
this.topusers_userdupe2_name.textContent = "User";
|
||||
this.topusers_user3_num.textContent = "3";
|
||||
this.topusers_user3_name.textContent = "Username48";
|
||||
this.topusers_userdupe3_name.textContent = "Username48";
|
||||
this.topusers_user3_name.textContent = "Username_Very_Super_Long12";
|
||||
this.topusers_userdupe3_name.textContent = "Username_Very_Super_Long12";
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user