ImageMapster icon indicating copy to clipboard operation
ImageMapster copied to clipboard

Docs incorrectly state that highlighting will be disabled when staticState option is specified

Open ZetIsDeadBaby opened this issue 12 years ago • 4 comments

According to docs staticState: false should prevents area from being highlighted or selected. See WA on your USA demo map, area is still highlighted.

staticState: false + highlight: false will do the trick, but area is still clickable if clickNavigate: true.

ZetIsDeadBaby avatar May 30 '13 23:05 ZetIsDeadBaby

staticState is intended to prevent an area from being selected only - not highlighted. If you want to prevent an area from being selected, highlighted or responding to click events, then simply remove the area from your image map :)

jamietre avatar May 31 '13 10:05 jamietre

Quote from your docs:

"The basic version shown inline here demonstrates a few options. altImage allows a different image to be used for both the highlight and select effects. Washington is set to staticState=false which prevents it from being highlighted or selected, while Oregon is configured with isSelectable=false which prevents it from being selected, but it will still highlight. Texas and Maine are pre-selected using default options."

Anyway sometimes you need to programmatically disable areas.

ZetIsDeadBaby avatar May 31 '13 10:05 ZetIsDeadBaby

Point taken.. let me think about this, there's some major work coming soon on the plugin.

jamietre avatar May 31 '13 11:05 jamietre

@ZetIsDeadBaby -

Thank you for pointing this out and apologies for the delayed reply.

As @jamietre indicates, staticState is intended to only affect selected state and not affect highlighting in any way. As you point out, the demo page docs indicate otherwise and there are also a couple of points on the main docs page that indicate highlighting will be affected as well.

Marking this as a docs bug and will address when docs are updated.

Relevant docs that require adjusting:

  1. Big USA Map Demo - Highlighting will still occur

staticState=false which prevents it from being highlighted or selected

  1. Docs
    1. staticState description - staticState still maintains other interactive features (e.g. highlight, click, etc.)

      When true or false, the map or area to which this option applies will be permanently selected or deselected. Typically this is more useful applied to individual areas that you want to exclude from the interactive part of the map.

    2. mapKey description - Not functionally identical since highlight would still work as would click, etc.

      When mapKey is present, any area tags that are missing this attribute will be excluded from the image map entirely. This is functionally identical to setting staticState=false for these areas, except they will be inaccessible through the API.

    3. isMask description - highlighting will still occur when staticState is set

      Normally, every area in an imagemap is an active area, and would be highlighted when moused over (unless its behavior was otherwise specified with staticState).

techfg avatar Feb 07 '21 05:02 techfg