Skip to content

Commit

Permalink
Remove code which we do not need anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jan 10, 2024
1 parent f9b6d06 commit eac564c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
10 changes: 2 additions & 8 deletions view/card/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,10 @@ function initInput(type: 'a' | 'c' | 'h' | 'l'): HTMLInputElement {
let { max, min, step } = getInputMeta(text)

let value = computeExpression(text.value)

let action = e.detail
if (action === 'increase') {
if (e.detail === 'increase') {
value = value + step
} else if (action === 'decrease') {
} else if (e.detail === 'decrease') {
value = value - step
} else if (action === 'setMaximum') {
value = max
} else if (action === 'setMinimum') {
value = min
}

let parsedValue = bindedClamp(value, { max, min })
Expand Down
2 changes: 1 addition & 1 deletion view/field/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ function removeByPosition(str: string, position: number): string {
return str.slice(0, position) + str.slice(position + 1)
}

type SpinAction = 'decrease' | 'increase' | 'setMaximum' | 'setMinimum'
type SpinAction = 'decrease' | 'increase'

export interface SpinEvent extends Event {
detail?: SpinAction
Expand Down

0 comments on commit eac564c

Please sign in to comment.