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

Akmal / Fix: market tabs are not scrolled after window resize #1182

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion sass/components/_chart-title.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,11 @@
.cq-symbol-info {
display: flex;
flex-direction: column;
margin: 0 10px 0 20px;
margin: 0 0 0 20px;
@media (min-width: 768px) {
min-width: 15rem;
min-height: 4.2rem;
}

.cq-market {
font-size: 1em;
Expand All @@ -114,6 +118,8 @@
font-size: 1.6em;
text-align: left;
line-height: 24px;
width: auto;
padding-right: 1rem;
@include themify($themes) {
color: themed('ChartTitleSymbolText');
}
Expand Down
9 changes: 9 additions & 0 deletions src/store/CategoricalDisplayStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,15 @@ export default class CategoricalDisplayStore {
return;
}

if (!this.mainStore.chart.isMobile) {
const categories = Object.keys(this.categoryElements);
const last_category = categories.pop();
const last_category_bottom_gap = this.height - (64 + categories.length * 40); // to make the last category height reach it's filter tab
if (this.categoryElements[last_category]) {
this.categoryElements[last_category].style.minHeight = `${last_category_bottom_gap}px`;
}
}

// hits: 40px for title hight + 4px for content bottom border
const categoryTitleHeight = 44;
const scrollPanelTop = this.scrollPanel.getBoundingClientRect().top;
Expand Down