Skip to content

Commit

Permalink
feat: new design rule
Browse files Browse the repository at this point in the history
  • Loading branch information
ChangChiTW committed Jan 18, 2023
1 parent 7414530 commit 09ea265
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions src/components/editor/dialogs/SettingDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,12 @@
</span>
</p>
<p>
gap size:
<span :key="keyInput">
<select v-model="gapSize">
<option value="5"> 5 </option>
<option value="30"> 30 </option>
substrate type:
<span :key="key">
<select v-model="substrate">
<option value="glass"> Glass </option>
<option value="paper"> Paper </option>
</select>
<span>
um
</span>
</span>
</p>
</div>
Expand All @@ -68,8 +65,9 @@ export default {
},
data () {
return {
key: 0,
keyInput: 0,
gapSize: 5,
substrate: 'glass',
invalidInput: false
}
},
Expand All @@ -91,22 +89,13 @@ export default {
this.$el.showModal()
},
getCornerSize(gapSize) {
const cornerSizeTable = {
5: this.gridUnit.current / 100,
30: this.gridUnit.current / 200
}
return cornerSizeTable[gapSize]
},
onConfirm () {
const cornerSize = this.getCornerSize(this.gapSize)
this.newProject({
height: this.chip.height,
width: this.chip.width,
gridUnit: this.gridUnit.current,
cornerSize: cornerSize,
gapSize: this.gapSize / 10
cornerSize: 5,
gapSize: 0.5
})
this.closeDialog()
},
Expand Down

0 comments on commit 09ea265

Please sign in to comment.