Measurement Widget : "Clear" button fires event on disable state

511
1
Jump to solution
01-23-2019 05:45 PM
PrashantKirpan
Occasional Contributor

Hi All,

In Measurement Widget - click event is firing on "Clear" button even if button is in disable state.

I observed that (jimu-state-disabled) class is only changing element's colour but not preventing any user interaction.

Because of this behaviour, widget is allowing to clear\disable measurement result without finishing drawing (double click on map).

 

Steps:

1) Select line option on tool.

2) Start drawing line, clink on map

3) Move mouse cursor directly to clear button and click 

4) Again click on map.

How can I disable click event when "jimu-state-disabled" class is applied?

One way to check class name and stop code execution but looking for best approach to handle this.

Any help would be appreciated

Regards,

Prashant

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Prashant,

  You just need to modify the jimu-state-disabled css rule in the apps jimu-theme.css.

.jimu-btn.jimu-state-disabled{
  background-color: #adadad;
  color: #d8d8d8;
  pointer-events: none;
}

View solution in original post

1 Reply
RobertScheitlin__GISP
MVP Emeritus

Prashant,

  You just need to modify the jimu-state-disabled css rule in the apps jimu-theme.css.

.jimu-btn.jimu-state-disabled{
  background-color: #adadad;
  color: #d8d8d8;
  pointer-events: none;
}