Flipper on "pressup"

Can the flipper be flipped on "mouseup" rather than "mousedown"?

When we first started ZIM we used an ACTIONEVENT to allow you to set if you wanted a mousedown or a click on things like CheckBox, etc. The default is "mousedown". After a while, on newer components, we gave up on this... I just had never used it. Looking at the Flipper, it has hard coded "mousedown" events so what you can do is remove the events and then add the events you want:

back.removeAllEventListeners();
front.removeAllEventListeners();
front.on("click", card.flip);
back.on("click", card.flip);

Ah... that works... but we just decided to patch 016 with the ACTIONEVENT for Flipper. So... you could just set

ACTIONEVENT = "click"; // before making the Flipper.

But that will affect your other components too. So, up to you.

1 Like

Thanks, worked like a charm!

1 Like