mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 10:47:07 +00:00
Add preferences support to DougalGraphGunsPressure
This commit is contained in:
@@ -50,7 +50,7 @@ import * as aes from '@/lib/graphs/aesthetics.js';
|
|||||||
export default {
|
export default {
|
||||||
name: 'DougalGraphGunsPressure',
|
name: 'DougalGraphGunsPressure',
|
||||||
|
|
||||||
props: [ "data" ],
|
props: [ "data", "settings" ],
|
||||||
|
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
@@ -80,10 +80,24 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
settings () {
|
||||||
|
for (const key in this.settings) {
|
||||||
|
this[key] = this.settings[key];
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
shotpoint () {
|
||||||
|
if (this.shotpoint) {
|
||||||
|
this.replot();
|
||||||
|
}
|
||||||
|
this.$emit("update:settings", {[`${this.$options.name}.shotpoint`]: this.shotpoint});
|
||||||
|
},
|
||||||
|
|
||||||
violinplot () {
|
violinplot () {
|
||||||
if (this.violinplot) {
|
if (this.violinplot) {
|
||||||
this.plotViolin();
|
this.plotViolin();
|
||||||
}
|
}
|
||||||
|
this.$emit("update:settings", {[`${this.$options.name}.violinplot`]: this.violinplot});
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user