ImageMapster
ImageMapster copied to clipboard
Docs incorrectly state that highlighting will be disabled when staticState option is specified
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.
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 :)
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.
Point taken.. let me think about this, there's some major work coming soon on the plugin.
@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:
- Big USA Map Demo - Highlighting will still occur
staticState=false which prevents it from being highlighted or selected
- Docs
- 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.
- 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.
- 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).
- staticState description - staticState still maintains other interactive features (e.g. highlight, click, etc.)