mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 04:09:12 +00:00
Improve rating selection
This commit is contained in:
@@ -95,12 +95,8 @@ export class Rating {
|
||||
|
||||
const newValue = this.getValueFromMousePosition(event);
|
||||
|
||||
if (newValue === this.value) {
|
||||
this.value = 0;
|
||||
this.isHovering = false;
|
||||
} else {
|
||||
this.value = newValue;
|
||||
}
|
||||
this.value = newValue === this.value ? 0 : newValue;
|
||||
this.isHovering = false;
|
||||
}
|
||||
|
||||
handleKeyDown(event: KeyboardEvent) {
|
||||
|
||||
Reference in New Issue
Block a user