Map Timeframe: fix not mask.style error.
This commit is contained in:
@@ -38,6 +38,7 @@ import 'chartjs-adapter-date-fns';
|
||||
import getMoment from 'moment';
|
||||
|
||||
export default{
|
||||
props:['selectValue'],
|
||||
setup() {
|
||||
const allMapDataStore = AllMapDataStore();
|
||||
const { filterTimeframe, selectTimeFrame } = storeToRefs(allMapDataStore);
|
||||
@@ -142,8 +143,10 @@ export default{
|
||||
resizeMask(chart) {
|
||||
let from = (this.selectArea[0] * 0.01) / (this.selectRange * 0.01);
|
||||
let to = (this.selectArea[1] * 0.01) / (this.selectRange * 0.01);
|
||||
if(this.selectValue[0] === 'Timeframes') {
|
||||
this.resizeLeftMask(chart, from);
|
||||
this.resizeRightMask(chart, to);
|
||||
}
|
||||
},
|
||||
resizeLeftMask(chart, from) {
|
||||
const canvas = document.getElementById("chartCanvasId");
|
||||
@@ -306,12 +309,5 @@ export default{
|
||||
this.endTime = this.startMaxDate;
|
||||
this.timeFrameStartEnd;
|
||||
},
|
||||
beforeUnmount() {
|
||||
this.selectArea = [0, this.selectRange];
|
||||
this.resizeMask(this.chart);
|
||||
this.startTime = new Date(getMoment(this.filterTimeframe.x_axis.min).format());
|
||||
this.endTime = new Date(getMoment(this.filterTimeframe.x_axis.max).format());
|
||||
this.timeFrameStartEnd;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<!-- title: Trace -->
|
||||
<Trace v-if="selectValue[0] === 'Trace'" ref="filterTraceView"></Trace>
|
||||
<!-- title: Timeframes -->
|
||||
<Timeframes v-if="selectValue[0] === 'Timeframes'"></Timeframes>
|
||||
<Timeframes v-if="selectValue[0] === 'Timeframes'" :selectValue="selectValue"></Timeframes>
|
||||
</div>
|
||||
|
||||
<!-- Button -->
|
||||
|
||||
Reference in New Issue
Block a user