|
_onDocMouseUp() { |
|
const Mx = this.Mx; |
|
|
|
// We are no longer dragging |
|
this.dragging = false; |
|
this.edge_dragging = false; |
|
|
|
// only emit an event if we are actually dragging |
|
if (!this.dragging || !this.edge_dragging) { |
|
return; |
|
} |
|
|
|
// Issue a slider tag event |
|
let evt = document.createEvent('Event'); |
|
evt.initEvent('accordiontag', true, true); |
|
evt.center = this.properties.center; |
|
evt.width = this.properties.width; |
|
mx.dispatchEvent(Mx, evt); |
|
this.emit('change', { |
|
center: this.properties.center, |
|
width: this.properties.width |
|
}); |
|
} |
this.dragging and this.edge_dragging are set to false just before the if-statement that returns if one of them is false.
Furthermore, I believe the if-statement logic is incorrect. this.dragging is set to true if the center is being dragged, and this.edge_dragging is true if the edge is being dragged. They are never both true at the same time it appears, so the if-statement will always be truthy and the event never fired.
sigplot/js/sigplot.accordion.js
Lines 429 to 451 in 5bae787
this.draggingandthis.edge_draggingare set to false just before the if-statement that returns if one of them is false.Furthermore, I believe the if-statement logic is incorrect.
this.draggingis set to true if the center is being dragged, andthis.edge_draggingis true if the edge is being dragged. They are never both true at the same time it appears, so the if-statement will always be truthy and the event never fired.