Skip to content

Commit

Permalink
fix(ui): new location/name style (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando authored Jan 11, 2021
1 parent 9f99728 commit 21c2015
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions src/components/ControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,32 +124,30 @@
</v-layout>

<v-layout row>
<v-flex xs2 style="max-width:100px">
<v-subheader>Name: {{ selectedNode.name }}</v-subheader>
</v-flex>
<v-flex xs8 style="max-width:300px">
<v-text-field
label="New name"
label="Name"
append-outer-icon="send"
:error="!!nameError"
:error-messages="nameError"
v-model.trim="newName"
clearable
@click:clear="resetName"
@click:append-outer="updateName"
></v-text-field>
</v-flex>
</v-layout>

<v-layout row>
<v-flex xs2 style="max-width:100px">
<v-subheader>Location: {{ selectedNode.loc }}</v-subheader>
</v-flex>
<v-flex xs8 style="max-width:300px">
<v-text-field
label="New Location"
label="Location"
append-outer-icon="send"
v-model.trim="newLoc"
:error="!!locError"
:error-messages="locError"
clearable
@click:clear="resetLocation"
@click:append-outer="updateLoc"
></v-text-field>
</v-flex>
Expand Down Expand Up @@ -810,6 +808,16 @@ export default {
this.selectedNode = this.nodes.find(n => n.id === node.id)
}
},
resetName () {
setTimeout(() => {
this.newName = this.selectedNode.name
}, 10)
},
resetLocation () {
setTimeout(() => {
this.newLoc = this.selectedNode.loc
}, 10)
},
getValue (v) {
const node = this.nodes[v.nodeId]
Expand Down

0 comments on commit 21c2015

Please sign in to comment.