Refactor <dougal-project-settings-binning/>

This commit is contained in:
D. Berge
2023-11-13 22:13:40 +01:00
parent c3a56bf7e2
commit afe04f5693

View File

@@ -9,7 +9,7 @@
hint="EPSG code of the project's coordinate reference system"
persistent-hint
type="number"
v-model.number="epsg"
v-model.number="epsg_"
>
</v-text-field>
</v-form>
@@ -38,30 +38,30 @@
export default {
name: "DougalProjectSettingsGeodetics",
props: [ "value" ],
props: [ "epsg" ],
data () {
return {
epsg: null
epsg_: null
}
},
watch: {
value (newValue) {
this.reset();
epsg () {
if (this.epsg != this.epsg_) {
this.epsg_ = this.epsg;
}
}
},
methods: {
reset () {
for (const key of Object.keys(this.$data)) {
this[key] = this.value[key];
}
this.epsg_ = this.epsg;
},
save () {
this.$emit('input', {...this.$data});
this.$emit('input', {epsg: this.epsg_});
},
back () {