Compare commits

...

1 Commits

Author SHA1 Message Date
746d563b8f Throttle screen updates to improve conductor performance 2020-05-13 09:26:40 -07:00
2 changed files with 7 additions and 0 deletions

View File

@ -146,6 +146,8 @@ import DatePicker from './DatePicker.vue';
import ConductorAxis from './ConductorAxis.vue';
import ConductorModeIcon from './ConductorModeIcon.vue';
import _ from 'lodash';
const DEFAULT_DURATION_FORMATTER = 'duration';
export default {
@ -185,6 +187,7 @@ export default {
}
},
mounted() {
this.setViewFromBounds = _.throttle(this.setViewFromBounds, 200);
this.setTimeSystem(JSON.parse(JSON.stringify(this.openmct.time.timeSystem())));
this.openmct.time.on('bounds', this.setViewFromBounds);

View File

@ -32,6 +32,8 @@
import * as d3Selection from 'd3-selection';
import * as d3Axis from 'd3-axis';
import * as d3Scale from 'd3-scale';
import _ from 'lodash';
import utcMultiTimeFormat from './utcMultiTimeFormat.js';
const PADDING = 1;
@ -64,6 +66,8 @@ export default {
.attr("width", "100%")
.attr("height", height);
this.setScale = _.throttle(this.setScale, 200);
this.width = this.$refs.axisHolder.clientWidth;
this.xAxis = d3Axis.axisTop();
this.dragging = false;