Resize chart on menu toggle
This commit is contained in:
parent
9417d75632
commit
f9ae256a9f
@ -301,19 +301,18 @@ label[for=user] {
|
||||
}
|
||||
|
||||
#bottom {
|
||||
position: absolute;
|
||||
position: relative;
|
||||
z-index: 10000;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#chart {
|
||||
font-family: "Open Sans", Verdana, sans-serif;
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
bottom: -15px;
|
||||
left: 0;
|
||||
height: 200px;
|
||||
margin-right: 165px;
|
||||
padding: 0 10px;
|
||||
opacity: 0.8;
|
||||
background-color: white;
|
||||
@ -321,9 +320,9 @@ label[for=user] {
|
||||
|
||||
#chart-close {
|
||||
font-size: 0.8em;
|
||||
position: fixed;
|
||||
position: absolute;
|
||||
z-index: 10001;
|
||||
right: 175px;
|
||||
right: 15px;
|
||||
bottom: 160px;
|
||||
cursor: pointer;
|
||||
color: #5070af;
|
||||
|
@ -43,7 +43,8 @@ export default class ChartViewModel extends ViewModel {
|
||||
pointSelected: null,
|
||||
chartVisible: false,
|
||||
buttonVisible: false,
|
||||
onChartToggle: null
|
||||
onChartToggle: null,
|
||||
onMenuToggle: null
|
||||
});
|
||||
this.state = state;
|
||||
/** @type {PlotData} */
|
||||
@ -123,6 +124,9 @@ export default class ChartViewModel extends ViewModel {
|
||||
this.model.onChartToggle = () => {
|
||||
this.model.chartVisible = !this.model.chartVisible;
|
||||
};
|
||||
this.model.onMenuToggle = () => {
|
||||
this.chart.update();
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -310,13 +310,19 @@ export default class TrackViewModel extends ViewModel {
|
||||
this.model.autoReload = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} el
|
||||
* @param {boolean} visible
|
||||
*/
|
||||
static setMenuVisible(el, visible) {
|
||||
if (el) {
|
||||
if (visible) {
|
||||
el.classList.remove('menu-hidden');
|
||||
} else {
|
||||
el.classList.add('menu-hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
renderSummary() {
|
||||
if (!this.state.currentTrack || !this.state.currentTrack.hasPositions) {
|
||||
|
@ -131,12 +131,18 @@ export default class UserViewModel extends ViewModel {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {HTMLElement} el
|
||||
* @param {boolean} visible
|
||||
*/
|
||||
static setMenuVisible(el, visible) {
|
||||
if (el) {
|
||||
if (visible) {
|
||||
el.classList.remove('menu-hidden');
|
||||
} else {
|
||||
el.classList.add('menu-hidden');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user