mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 11:47:09 +00:00
Refactor <dougal-project-settings-binning/>
This commit is contained in:
@@ -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 () {
|
||||
|
||||
Reference in New Issue
Block a user