Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Region2d

A region is defined in the SVG file.

The regions MUST have a unique id

By default te regions is defined inside a g element with id equal to "regions". You can change this query selector with SvgMap.Options.regionsSelector

Example:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg ... >
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0">
    ... see SvgMap ...
    <g id="regions">
        <g id="id1">
            <path d=" ... ">
            <polygon points=" ... ">
        <g>
        <circle id="id2" .../>
    </g>
</svg>

Hierarchy

  • Region2d

Index

Type aliases

Static TDefinition

TDefinition: string | SVGGraphicsElement | IJson

Constructors

constructor

Properties

HClick

HClick: Handle<function> = new ImageMap.Event.Handle <(region: this, evt: MouseEvent) => void> ()

HDisable

HDisable: Handle<function> = new ImageMap.Event.Handle <(region: this) => void> ()

HEnable

HEnable: Handle<function> = new ImageMap.Event.Handle <(region: this) => void> ()

HMouseOver

HMouseOver: Handle<function> = new ImageMap.Event.Handle <(region: this, evt: MouseEvent) => void> ()

HSelect

HSelect: Handle<function> = new ImageMap.Event.Handle <(region: this, evt: MouseEvent) => void> ()

HUnselect

HUnselect: Handle<function> = new ImageMap.Event.Handle <(region: this, evt: MouseEvent) => void> ()

Private clipPath

clipPath: SVGClipPathElement

Private doc

doc: Document

gElement

gElement: SVGGElement

id

id: string

imageElement

imageElement: SVGImageElement

infoPoint

infoPoint: InfoPoint

map

map: SvgMap

pathElement

pathElement: SVGGraphicsElement

Protected selected

selected: boolean = false

Methods

Private createRegionElement

  • createRegionElement(def: IJson): SVGPathElement | SVGPolygonElement

disable

  • disable(): void

dispose

  • dispose(): void

enable

  • enable(): void

Private initClippedImage

  • initClippedImage(): void

Private initContourPath

  • initContourPath(def: SVGGraphicsElement | string | IJson): void

Private initGlobalElement

  • initGlobalElement(): void

Private initInfoPoint

  • initInfoPoint(): void

Private initSelection

  • initSelection(): void

isEnabled

  • isEnabled(): boolean

isSelected

  • isSelected(): boolean

Private onClick

  • onClick(evt: MouseEvent): void

Private onMouseOver

  • onMouseOver(evt: MouseEvent): void

select

  • select(): void

unselect

  • unselect(): void

updateDisplay

  • updateDisplay(): void

Generated using TypeDoc