Is it possible to prevent mouseDown effect when widget already displaying selected effect

Is it possible to prevent the display of a “mouseDown” effect when the widget is already displayed with the “selected” effect?

Reproducible Steps:

  1. User clicks on a button, button displays “mouseDown” effect.
  2. User releases the mouse and the button displays with a “Selected” effect.
  3. User clicks on the selected button.

When the user clicks on an already selected button, I don’t want to see the mouseDown effect; I want to continue to see the selected effect.

Is there a way to prevent the mouseDown effect from being displayed when the selected effect is already being displayed?

Hi @dibattista

Do you mind elaborating a bit more on which Style Properties you have defined in your Selected style vs. your MouseDown style?

As you’ve noticed in RP 10, the Style Effects will blend together in the prototype. However, if you do not want the blending to occur, you can simply define the specific style properties on the Selected style, and those properties will override the properties on the MouseDown style.

For example, let’s say you have a button with the following styles:

  • Base Style: white background / black font color
  • MouseDown Style: blue font color
  • Selected Style: grey fill color

Let’s say when the button is in a selected state and the user mouses down on the button, you do not want to show the MouseDown blue font color.

In order to achieve this, you can simply define the font color that you want to display in that scenario in the Selected style (e.g. black font color). Once a font color is defined within the Selected style, it will no longer be overridden when the user mouses down on the button in the prototype.

The same would apply for other style properties you have defined in your style effects.

Hope this helps!

Hi Frankie

I’ve attached my file. There is definitely something weird going on as I don’t even see the colour for the mouseDown event any more.

When the widget is created from dragging a “Primary Button” onto the canvas, everything works as you described above. However, if you modify the shape of the button, the mouseEvent does not occur as expected.

Any help would be appreciated.

btnPressStyling-wError.rp (46.6 KB)

Hi @dibattista,

Thank you for sharing your file. I was able to reproduce this issue on my end as well. This appears to be a bug with rendering style effects in the prototype for custom shape widgets. I’ve filed this to have our team investigate further. Thank you for letting us know!

1 Like