sigplot icon indicating copy to clipboard operation
sigplot copied to clipboard

Accordion onmouseup change events guaranteed to not fire

Open thezboe opened this issue 5 years ago • 4 comments

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.

thezboe avatar Oct 06 '20 21:10 thezboe

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 [email protected] 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 avatar Oct 07 '20 02:10 maihde

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

maihde avatar May 22 '21 22:05 maihde

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

thezboe avatar Jun 15 '23 21:06 thezboe

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.

maihde avatar Jun 16 '23 17:06 maihde