Skip to content

Commit b8c5bde

Browse files
committed
fix heat slider for low values
1 parent 3addccc commit b8c5bde

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/src/components/app/users/UserProfile.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,11 @@ export default {
8484
const sliderScore = document.getElementById('sliderScore');
8585
const sliderScoreWidth = `${sliderScore.getBoundingClientRect().width}px`;
8686
const marginLeft = `${(this.user.heat_score / maxScore) * 100}%`;
87-
sliderScore.style.marginLeft = `calc(${marginLeft} - ${sliderScoreWidth})`;
87+
if (this.user.heat_score / maxScore < 0.2) {
88+
sliderScore.style.marginLeft = `${marginLeft}`;
89+
} else {
90+
sliderScore.style.marginLeft = `calc(${marginLeft} - ${sliderScoreWidth})`;
91+
}
8892
const interests = this.user.tags;
8993
if (interests) {
9094
for (let j = 0; j < interests.length; j += 1) {

0 commit comments

Comments
 (0)