LGSInnovations / sigplot

SigPlot provides fast interactive web-plotting for software defined radio.
https://sigplot.lgsinnovations.com
Apache License 2.0
36 stars 26 forks source link

Accordion onmouseup change events guaranteed to not fire #96

Open thezboe opened 3 years ago

thezboe commented 3 years ago

https://github.com/LGSInnovations/sigplot/blob/5bae7873547e8a490a691ee30c2576800e6cb81a/js/sigplot.accordion.js#L429-L451

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.

maihde commented 3 years ago

I agree, the this.dragging = false; and this.edge_dragging = false need to be moved after the event has fired.

On Tue, Oct 6, 2020 at 5:55 PM Zachary Boe notifications@github.com wrote:

https://github.com/LGSInnovations/sigplot/blob/5bae7873547e8a490a691ee30c2576800e6cb81a/js/sigplot.accordion.js#L429

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/LGSInnovations/sigplot/issues/96, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABYEIVKDLQW43LTAIQYZFTSJOG47ANCNFSM4SGS76EA .

maihde commented 3 years ago

@thezboe I fixed this in https://github.com/spectriclabs/sigplot/commit/4b58015919ffd1162e635cb36c5056bd584b57ea

thezboe commented 1 year ago

This has caused another issue with accordion events. I believe the following snippet needs to be && not || since they will never both be true. This has the result that the accordion plugin can not be dropped.

https://github.com/LGSInnovations/sigplot/blob/5bae7873547e8a490a691ee30c2576800e6cb81a/js/sigplot.accordion.js#L437

maihde commented 1 year ago

Thanks Zach we will take a look. FYI the primary source for SigPlot has been moved to https://github.com/spectriclabs/sigplot so I recommend placing any future issues there.