Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@
@close-graph="() => closeGraph(graph)"
@min-max-graph="() => minMaxGraph(graph)"
@resize="() => resize()"
@pause="() => (state = 'pause')"
@start="() => (state = 'start')"
@click="() => graphSelected(graph)"
@started="graphStarted"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,18 @@ export default {
// setSeries links graphs so clicking an item to hide it also hides the other graph item
// setSeries: true,
},
bind: {
mouseup: (self, targ, handler) => {
return (e) => {
// Single click while paused will resume the graph
// This makes it possible to resume in TlmViewer widgets
if (this.state === 'pause' && self.select.width === 0) {
this.$emit('start')
}
handler(e)
}
},
},
},
hooks: {
setScale: [
Expand All @@ -742,6 +754,14 @@ export default {
}
},
],
setSelect: [
(chart) => {
// Pause the graph while selecting a range to zoom
if (this.state == 'start' && chart.select.width > 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

triple equals

this.$emit('pause')
}
},
],
ready: [
(u) => {
let canvas = u.root.querySelector('.u-over')
Expand Down Expand Up @@ -819,6 +839,10 @@ export default {
setSelect: [
(chart) => {
if (!this.zoomChart) {
// Pause the graph while selecting an overview range to zoom
if (this.state == 'start' && chart.select.width > 0) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

triple equals

this.$emit('pause')
}
this.zoomOverview = true
let min = chart.posToVal(chart.select.left, 'x')
let max = chart.posToVal(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
:height="size.height"
:width="size.width"
:style="computedStyle"
@pause="() => (state = 'pause')"
@start="() => (state = 'start')"
hide-system-bar
hide-overview
/>
Expand Down