fix(consentsoftware-toggle): Fix issue in drag event handling logic for the toggle component.
This commit is contained in:
parent
48a5b96b2a
commit
26fd75b8ae
@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 2025-01-16 - 1.4.1 - fix(consentsoftware-toggle)
|
||||||
|
Fix issue in drag event handling logic for the toggle component.
|
||||||
|
|
||||||
|
- Corrected dragging functionality to accurately track dragging state.
|
||||||
|
- Included logic to delay the reset of the dragging state after toggling.
|
||||||
|
|
||||||
## 2025-01-16 - 1.4.0 - feat(toggle component)
|
## 2025-01-16 - 1.4.0 - feat(toggle component)
|
||||||
Enhanced consent toggle component with drag functionality
|
Enhanced consent toggle component with drag functionality
|
||||||
|
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@consent.software/catalog',
|
name: '@consent.software/catalog',
|
||||||
version: '1.4.0',
|
version: '1.4.1',
|
||||||
description: 'A library of web components designed to integrate robust consent management capabilities into web applications, ensuring compliance with privacy regulations.'
|
description: 'A library of web components designed to integrate robust consent management capabilities into web applications, ensuring compliance with privacy regulations.'
|
||||||
}
|
}
|
||||||
|
@ -189,7 +189,6 @@ export class ConsentsoftwareToggle extends LitElement {
|
|||||||
|
|
||||||
// Start dragging
|
// Start dragging
|
||||||
this.isDragging = true;
|
this.isDragging = true;
|
||||||
this.hasDragged = false;
|
|
||||||
// The difference between the pointer’s X and the knob’s current position
|
// The difference between the pointer’s X and the knob’s current position
|
||||||
this.startX = event.clientX - this.currentX;
|
this.startX = event.clientX - this.currentX;
|
||||||
|
|
||||||
@ -229,6 +228,9 @@ export class ConsentsoftwareToggle extends LitElement {
|
|||||||
|
|
||||||
// Dispatch toggle event
|
// Dispatch toggle event
|
||||||
this.dispatchEvent(new CustomEvent('toggle', { detail: { selected: this.selected } }));
|
this.dispatchEvent(new CustomEvent('toggle', { detail: { selected: this.selected } }));
|
||||||
|
delayFor(0).then(() => {
|
||||||
|
this.hasDragged = false;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user