Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
| imagemapping:start [2023/03/29 17:11] – kthoene | imagemapping:start [2023/04/05 20:34] (aktuell) – kthoene | ||
|---|---|---|---|
| Zeile 1: | Zeile 1: | ||
| ====== Image Map Plugin With Marker ====== | ====== Image Map Plugin With Marker ====== | ||
| - | ====== Map with Internal Markers ====== | + | ===== About ===== |
| - | {{map> | + | **Documentation and Code**: [[https://github.com/kgitthoene/dokuwiki-plugin-imapmarkers|github.com/kgitthoene/dokuwiki-plugin-imapmarkers]]. |
| - | [[https://en.wikipedia.org/wiki/Asia|CON1 Asia @ 434, | + | |
| - | [[https:// | + | |
| - | [[https:// | + | |
| - | [[https:// | + | |
| - | [[https:// | + | |
| - | [[https:// | + | |
| - | [[https:// | + | |
| - | {{<map}} | + | |
| - | <wrap imaploc #CON1>Asia</wrap> | + | ====== Map with Internal Marker ====== |
| - | <wrap imaploc #CON2>Africa</wrap> | + | |
| - | <wrap imaploc #CON3>North America</wrap> | + | {{imapmarkers>imagemapping: |
| - | <wrap imaploc #CON4>South America</wrap> | + | [[https:// |
| - | <wrap imaploc #CON5>Antarctica</wrap> | + | [[https:// |
| - | <wrap imaploc #CON6>Europe</wrap> | | + | [[https:// |
| - | <wrap imaploc #CON7>Australia</wrap> | | + | [[https:// |
| - | <wrap hi> | + | [[https:// |
| - | <wrap imapcfg #CON1> | + | [[https:// |
| + | [[wp>Australia|CON7|Australia | ||
| + | [[wp>Australia|Australia II @ 510, | ||
| + | [[|Australia III @ 510, | ||
| + | {{cfg>}} | ||
| { | { | ||
| " | " | ||
| - | "clicked_reference_css": { " | + | "clicked-reference-css": { " |
| + | " | ||
| + | " | ||
| } | } | ||
| - | </wrap> | + | {{<cfg}} |
| + | {{< | ||
| - | ====== Map with Media-Link Marker ====== | + | {{imapmloc> |
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | <wrap hi> | ||
| - | {{map>imagemapping: | + | ++ Continents |\\ {{imapmloc>CON1|Asia}}\\ {{imapmloc> |
| - | [[imagemapping: | + | |
| - | [[imagemapping: | + | |
| - | [[imagemapping: | + | |
| - | [[imagemapping: | + | |
| - | {{<map}} | + | |
| - | <wrap imaploc #CP002>Arthur Ross Pinetum</ | + | ====== Map with Media-Link Marker ====== |
| - | <wrap imaploc #CP003>Diana Ross Playground</ | + | |
| - | <wrap imaploc # | + | {{imapmarkers> |
| - | <wrap imaploc #CP004>Summit Rock</ | + | [[imapmarkers: |
| - | <wrap hi> | + | [[imapmarkers: |
| - | <wrap imapcfg #CP001> | + | [[imapmarkers: |
| + | [[imapmarkers: | ||
| + | {{cfg>}} | ||
| { | { | ||
| " | " | ||
| Zeile 48: | Zeile 51: | ||
| " | " | ||
| } | } | ||
| - | </ | + | {{< |
| + | {{< | ||
| + | |||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | <wrap hi> | ||
| ====== Map with External URL Marker ====== | ====== Map with External URL Marker ====== | ||
| - | {{map> | + | {{imapmarkers> |
| - | [[imagemapping:start|TS01 Tompkins Square Pool @ 357, | + | [[imapmarkers:start|TS01| Tompkins Square Pool @ 357, |
| - | [[imagemapping:start|TS02 Pets Playground @ 311, | + | [[imapmarkers:start|TS02| Pets Playground @ 311, |
| - | {{<map}} | + | {{cfg>}} |
| - | + | ||
| - | <wrap imaploc # | + | |
| - | <wrap imaploc # | + | |
| - | <wrap hi> | + | |
| - | <wrap imapcfg #TS01> | + | |
| { | { | ||
| " | " | ||
| Zeile 66: | Zeile 71: | ||
| " | " | ||
| } | } | ||
| - | </wrap> | + | {{<cfg}} |
| + | {{< | ||
| - | ===== About ===== | + | {{imapmloc> |
| + | {{imapmloc> | ||
| + | <wrap hi> | ||
| - | If you change the original script.js in the plug-in **[[https:// | ||
| - | This may be very useful for maps. | ||
| - | A word to the author of [[https:// | ||
| - | |||
| - | Used plug-in: **[[https:// | ||
| - | |||
| - | ===== How to use? ===== | ||
| - | |||
| - | Add to the mappings (areas) an unique identifier. | ||
| - | Unique in the sense, that only their lower case form are used. | ||
| - | This is the **first word** in the title of the mapping. | ||
| - | |||
| - | E.g. '' | ||
| - | The identifier is: '' | ||
| - | The coordinates (here) '' | ||
| - | |||
| - | You now may add spans (references) with the CSS-class '' | ||
| - | I've used the plug-in **[[https:// | ||
| - | |||
| - | Reference wiki code (with wrap): '' | ||
| - | |||
| - | You may use multiple references for the same identifyer. | ||
| - | You can place references at anyplace in the page. | ||
| - | There is no rule to place them right behind the image mapping. | ||
| - | |||
| - | In case you click the reference, a marker is shown at the given point. | ||
| - | Works with all three forms of mapping: circle, rectangle and polygon. | ||
| ===== This Page Source ===== | ===== This Page Source ===== | ||
| < | < | ||
| - | ====== Image Map Plugin With Marker ====== | ||
| - | |||
| ====== Map with Internal Marker ====== | ====== Map with Internal Marker ====== | ||
| - | {{map> | + | {{imapmarkers> |
| - | [[https:// | + | [[https:// |
| - | [[https:// | + | [[https:// |
| - | [[https:// | + | [[https:// |
| - | [[https:// | + | [[https:// |
| - | [[https:// | + | [[https:// |
| - | [[https:// | + | [[https:// |
| - | [[https:// | + | [[wp>Australia|CON7|Australia @ 510,232,30]] |
| - | {{< | + | [[wp>Australia|Australia II @ 510, |
| - | + | [[|Australia | |
| - | <wrap imaploc # | + | {{cfg>}} |
| - | <wrap imaploc # | + | |
| - | <wrap imaploc # | + | |
| - | <wrap imaploc # | + | |
| - | <wrap imaploc # | + | |
| - | <wrap imaploc # | + | |
| - | <wrap imaploc #CON7>Australia</ | + | |
| - | <wrap hi> | + | |
| - | <wrap imapcfg #CON1> | + | |
| { | { | ||
| " | " | ||
| - | "clicked_reference_css": { " | + | "clicked-reference-css": { " |
| + | " | ||
| + | " | ||
| } | } | ||
| - | </wrap> | + | {{<cfg}} |
| + | {{< | ||
| - | ====== Map with Media-Link Marker ====== | + | {{imapmloc> |
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | <wrap hi> | ||
| - | {{map>imagemapping: | + | ++ Continents |\\ {{imapmloc>CON1|Asia}}\\ {{imapmloc> |
| - | [[imagemapping: | + | |
| - | [[imagemapping: | + | |
| - | [[imagemapping: | + | |
| - | [[imagemapping: | + | |
| - | {{<map}} | + | |
| - | <wrap imaploc #CP002>Arthur Ross Pinetum</ | + | ====== Map with Media-Link Marker ====== |
| - | <wrap imaploc #CP003>Diana Ross Playground</ | + | |
| - | <wrap imaploc # | + | {{imapmarkers> |
| - | <wrap imaploc #CP004>Summit Rock</ | + | [[imapmarkers: |
| - | <wrap hi> | + | [[imapmarkers: |
| - | <wrap imapcfg #CP001> | + | [[imapmarkers: |
| + | [[imapmarkers: | ||
| + | {{cfg>}} | ||
| { | { | ||
| " | " | ||
| Zeile 149: | Zeile 127: | ||
| " | " | ||
| } | } | ||
| - | </ | + | {{< |
| + | {{< | ||
| + | |||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | <wrap hi> | ||
| ====== Map with External URL Marker ====== | ====== Map with External URL Marker ====== | ||
| - | {{map> | + | {{imapmarkers> |
| - | [[imagemapping:start|TS01 Tompkins Square Pool @ 357, | + | [[imapmarkers:start|TS01| Tompkins Square Pool @ 357, |
| - | [[imagemapping:start|TS02 Pets Playground @ 311, | + | [[imapmarkers:start|TS02| Pets Playground @ 311, |
| - | {{<map}} | + | {{cfg>}} |
| - | + | ||
| - | <wrap imaploc # | + | |
| - | <wrap imaploc # | + | |
| - | <wrap hi> | + | |
| - | <wrap imapcfg #TS01> | + | |
| { | { | ||
| " | " | ||
| Zeile 167: | Zeile 147: | ||
| " | " | ||
| } | } | ||
| - | </ | + | {{< |
| + | {{< | ||
| + | |||
| + | {{imapmloc> | ||
| + | {{imapmloc> | ||
| + | <wrap hi> | ||
| </ | </ | ||
| - | |||
| - | ===== Javascript Replacement Source (aka. the Plug-Ins „script.js“) ===== | ||
| - | |||
| - | <wrap box right lo> | ||
| - | <file javascript script.js> | ||
| - | /* DOKUWIKI: | ||
| - | |||
| - | |||
| - | // Original source code: https:// | ||
| - | globalThis[Symbol.for(' | ||
| - | var defaults = { | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | }; | ||
| - | var a_maps = []; | ||
| - | var a_areas = []; | ||
| - | var a_references = []; | ||
| - | var a_clicked_css_properties = []; | ||
| - | var a_cfg = []; | ||
| - | var resize_timeout = null; | ||
| - | var a_last_clicked_id = []; | ||
| - | var a_imap_div = []; | ||
| - | var imap_div_timeout = null; | ||
| - | var nr_startup_intervals = 0; | ||
| - | | ||
| - | function append_html_to_jquery_object(html, | ||
| - | object[0].insertAdjacentHTML( | ||
| - | " | ||
| - | html | ||
| - | ); | ||
| - | } // function append_html_to_jquery_object | ||
| - | |||
| - | function calc_marker_pos(coords) { | ||
| - | let split_coords = coords.split("," | ||
| - | var x = 0; | ||
| - | var y = 0; | ||
| - | switch(split_coords.length) { | ||
| - | case 3: // circle | ||
| - | x = parseInt(split_coords[0]); | ||
| - | y = parseInt(split_coords[1]); | ||
| - | break; | ||
| - | case 4: // rectangle | ||
| - | x = Math.floor((parseInt(split_coords[0])+parseInt(split_coords[2]))/ | ||
| - | y = Math.floor((parseInt(split_coords[1])+parseInt(split_coords[3]))/ | ||
| - | break; | ||
| - | default: | ||
| - | if(split_coords.length >= 6) { | ||
| - | var num_coords = 0; | ||
| - | for(var i = 0; i < (split_coords.length - 1); i += 2) { | ||
| - | x += parseInt(split_coords[i]); | ||
| - | y += parseInt(split_coords[i + 1]); | ||
| - | num_coords++; | ||
| - | } | ||
| - | x = Math.floor(x / num_coords); | ||
| - | y = Math.floor(y / num_coords);; | ||
| - | } | ||
| - | } | ||
| - | return [ x, y ]; | ||
| - | } // function calc_marker_pos | ||
| - | | ||
| - | function get_id_from_string(s) { | ||
| - | const a_ids = s.split(" | ||
| - | if (a_ids.length >= 1) { | ||
| - | if (a_ids[0].length > 0) { | ||
| - | return "#" | ||
| - | } | ||
| - | } | ||
| - | return null; | ||
| - | } | ||
| - | |||
| - | function find_area_by_jquery_id(id, | ||
| - | try { | ||
| - | if (imap_index === null) { | ||
| - | for(var i = 0; i < a_areas.length; | ||
| - | if (a_areas[i] !== undefined) { | ||
| - | for(var j = 0; j < a_areas[i].length; | ||
| - | const area = a_areas[i][j]; | ||
| - | if (area[' | ||
| - | return [ i, area[' | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } else { | ||
| - | if (a_areas[imap_index] !== undefined) { | ||
| - | for(var j = 0; j < a_areas[imap_index].length; | ||
| - | const area = a_areas[imap_index][j]; | ||
| - | if (area[' | ||
| - | return [ imap_index, area[' | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } catch(e) { console.error(" | ||
| - | return [ -1, null, -1 ]; | ||
| - | } // function find_area_by_jquery_id | ||
| - | | ||
| - | return { | ||
| - | // exported variables: | ||
| - | defaults: defaults, | ||
| - | a_maps: a_maps, | ||
| - | a_areas: a_areas, | ||
| - | a_references: | ||
| - | a_clicked_css_properties: | ||
| - | a_cfg: a_cfg, | ||
| - | resize_timeout: | ||
| - | a_last_clicked_id: | ||
| - | a_imap_div: a_imap_div, | ||
| - | imap_div_timeout: | ||
| - | nr_startup_intervals: | ||
| - | // exported functions: | ||
| - | append_html_to_jquery_object: | ||
| - | calc_marker_pos: | ||
| - | get_id_from_string: | ||
| - | find_area_by_jquery_id: | ||
| - | }; | ||
| - | })(); | ||
| - | |||
| - | |||
| - | addEventListener(" | ||
| - | (function($) { | ||
| - | var _g = globalThis[Symbol.for(' | ||
| - | | ||
| - | $(' | ||
| - | fillColor: ' | ||
| - | fillOpacity: | ||
| - | wrapClass: true, | ||
| - | wrapCss: true, | ||
| - | clickNavigate: | ||
| - | }); | ||
| - | |||
| - | // | ||
| - | $.fn.cssSpecific = function(str) { | ||
| - | var ob = {}; | ||
| - | if(this.length) { | ||
| - | var css = str.split(', | ||
| - | var prms = []; | ||
| - | for(var i = 0, ii = css.length; i < ii; i++) { | ||
| - | prms = css[i].split(':' | ||
| - | ob[$.trim(prms[0])] = $(this).css($.trim(prms[1] || prms[0])); | ||
| - | } | ||
| - | } | ||
| - | return ob; | ||
| - | }; // $.fn.cssSpecific | ||
| - | | ||
| - | function get_marker_width_and_height(id) { | ||
| - | return [ $(id).width(), | ||
| - | } // function get_marker_width_and_height | ||
| - | | ||
| - | function do_marker_if_resize() { | ||
| - | _g.a_imap_div.forEach((object, | ||
| - | let marker_id_jquery = "# | ||
| - | if(_g.defaults[' | ||
| - | if((_g.a_last_clicked_id[index] !== undefined) && (_g.a_last_clicked_id[index][' | ||
| - | let id = _g.a_last_clicked_id[index][' | ||
| - | let area_index = _g.a_last_clicked_id[index][' | ||
| - | if(_g.defaults[' | ||
| - | try { | ||
| - | let found_area = _g.a_areas[index][area_index][' | ||
| - | let marker_id_jquery = "# | ||
| - | let coords = found_area.attr(" | ||
| - | let xy = _g.calc_marker_pos(coords); | ||
| - | let wh = get_marker_width_and_height(marker_id_jquery); | ||
| - | $(marker_id_jquery).css({ top: xy[1] - wh[1] + 3, left: xy[0] - (wh[0] / 2) }); | ||
| - | } catch(e) { console.error(" | ||
| - | } | ||
| - | }); | ||
| - | } // do_marker_if_resize | ||
| - | |||
| - | $(window).resize(function() { | ||
| - | if (_g.resize_timeout != null) { clearTimeout(_g.resize_timeout); | ||
| - | _g.resize_timeout = setTimeout(function() { | ||
| - | $(' | ||
| - | let parent = $(this.offsetParent); | ||
| - | let parentparent = $(parent).parent(); | ||
| - | //if (_g.defaults[' | ||
| - | // console.log(" | ||
| - | // console.log(" | ||
| - | // console.log(" | ||
| - | //} | ||
| - | // limit image width to naturalWidth: | ||
| - | $(this).mapster(' | ||
| - | }); | ||
| - | do_marker_if_resize(); | ||
| - | }, 100); | ||
| - | }); | ||
| - | | ||
| - | let imap_do_main_function = function() { | ||
| - | if(_g.defaults[' | ||
| - | _g.nr_startup_intervals++; | ||
| - | if (_g.nr_startup_intervals >= 5) { | ||
| - | // stop after 5 s searching: | ||
| - | if (_g.imap_div_timeout !== null) { clearTimeout(_g.imap_div_timeout); | ||
| - | if(_g.defaults[' | ||
| - | return; | ||
| - | } | ||
| - | // find container, maps: | ||
| - | var imap_index = 0; | ||
| - | $(" | ||
| - | let tag = $(this).prop(" | ||
| - | if ((tag == " | ||
| - | if(_g.defaults[' | ||
| - | _g.a_imap_div[imap_index] = $(this); | ||
| - | } else { | ||
| - | if ((tag == " | ||
| - | _g.a_maps[imap_index] = $(this); | ||
| - | if(_g.defaults[' | ||
| - | imap_index++; | ||
| - | } | ||
| - | } | ||
| - | }); | ||
| - | if ((_g.a_imap_div[0] !== undefined) && (_g.a_imap_div[0] !== null)) { | ||
| - | // clear search interval: | ||
| - | // | ||
| - | // hide configurations: | ||
| - | $(" | ||
| - | // | ||
| - | _g.a_imap_div.forEach((object, | ||
| - | let imap_div_index = index; | ||
| - | if(_g.defaults[' | ||
| - | // set z-index for images: | ||
| - | object.find(" | ||
| - | // collect areas: | ||
| - | if (_g.a_maps[index] !== undefined) { | ||
| - | _g.a_maps[index].find(" | ||
| - | if (_g.a_areas[index] === undefined) { | ||
| - | _g.a_areas[index] = []; | ||
| - | } | ||
| - | const area_id = _g.get_id_from_string($(this).attr(" | ||
| - | _g.a_areas[index].push({ ' | ||
| - | if(_g.defaults[' | ||
| - | }); | ||
| - | } | ||
| - | }); | ||
| - | // find configurations: | ||
| - | $(" | ||
| - | try { | ||
| - | let id = $(this).attr(" | ||
| - | let cfg_text = $(this).text(); | ||
| - | cfg_text = cfg_text.replaceAll(' | ||
| - | let cfg = JSON.parse(cfg_text); | ||
| - | let ia = _g.find_area_by_jquery_id("#" | ||
| - | let imap_index = ia[0]; | ||
| - | //let found_area = ia[1]; | ||
| - | //let area_index = ia[2]; | ||
| - | if (imap_index >= 0) { | ||
| - | _g.a_cfg[imap_index] = cfg; | ||
| - | if (cfg[' | ||
| - | _g.a_clicked_css_properties[imap_index] = Object.keys(cfg[' | ||
| - | if(_g.defaults[' | ||
| - | } | ||
| - | if (_g.defaults[' | ||
| - | } else { | ||
| - | throw new Error(" | ||
| - | } | ||
| - | } catch(e) { | ||
| - | let msg = " | ||
| - | console.error(msg); | ||
| - | $(this).css(" | ||
| - | $(this).append(' | ||
| - | $(this).show(); | ||
| - | } | ||
| - | }); | ||
| - | // create marker: | ||
| - | _g.a_imap_div.forEach((object, | ||
| - | let imap_div_index = index; | ||
| - | let marker_id = " | ||
| - | let marker_id_jquery = "#" | ||
| - | let is_marker_internal = true; | ||
| - | if ((_g.a_cfg[imap_div_index] !== undefined) && (_g.a_cfg[imap_div_index][' | ||
| - | let marker_loc = String(_g.a_cfg[imap_div_index][' | ||
| - | var marker_src; | ||
| - | if (marker_loc.match(/ | ||
| - | // http[s] URI: | ||
| - | marker_src = '< | ||
| - | } else { | ||
| - | // media link: | ||
| - | marker_src = '< | ||
| - | } | ||
| - | _g.append_html_to_jquery_object(marker_src, | ||
| - | if ((_g.a_cfg[imap_div_index] !== undefined) && (_g.a_cfg[imap_div_index][' | ||
| - | $(marker_id_jquery).css(" | ||
| - | } | ||
| - | if ((_g.a_cfg[imap_div_index] !== undefined) && (_g.a_cfg[imap_div_index][' | ||
| - | $(marker_id_jquery).css(" | ||
| - | } | ||
| - | is_marker_internal = false; | ||
| - | } | ||
| - | if (is_marker_internal) { | ||
| - | // create internal, default, marker: | ||
| - | let svg_marker = '< | ||
| - | '< | ||
| - | ' | ||
| - | ' | ||
| - | ' | ||
| - | '</ | ||
| - | '</ | ||
| - | _g.append_html_to_jquery_object(svg_marker, | ||
| - | $(marker_id_jquery).css(" | ||
| - | $(marker_id_jquery).css(" | ||
| - | if ((_g.a_cfg[imap_div_index] !== undefined) && (_g.a_cfg[imap_div_index][' | ||
| - | $(marker_id_jquery).css(" | ||
| - | } | ||
| - | if ((_g.a_cfg[imap_div_index] !== undefined) && (_g.a_cfg[imap_div_index][' | ||
| - | $(marker_id_jquery).css(" | ||
| - | } | ||
| - | $(marker_id_jquery).css(" | ||
| - | $(marker_id_jquery).css(" | ||
| - | $(" | ||
| - | if ((_g.a_cfg[imap_div_index] !== undefined) && | ||
| - | $(" | ||
| - | } | ||
| - | } | ||
| - | $(marker_id_jquery).css(" | ||
| - | $(marker_id_jquery).css(" | ||
| - | $(marker_id_jquery).hide(); | ||
| - | if(_g.defaults[' | ||
| - | }); | ||
| - | // setup clicked css style keywords: | ||
| - | _g.a_imap_div.forEach((object, | ||
| - | try { | ||
| - | if (_g.a_clicked_css_properties[index] === undefined) { | ||
| - | _g.a_clicked_css_properties[index] = Object.keys(_g.defaults[' | ||
| - | if(_g.defaults[' | ||
| - | } | ||
| - | } catch(e) { console.error(" | ||
| - | }); | ||
| - | // search for references: | ||
| - | $(" | ||
| - | try { | ||
| - | var id = ""; | ||
| - | if ($(this).attr(" | ||
| - | id = "#" | ||
| - | } else { | ||
| - | const html = $(this).html(); | ||
| - | const a_ids = html.split(" | ||
| - | id = "#" | ||
| - | } | ||
| - | if (id.length > 0) { | ||
| - | if(_g.defaults[' | ||
| - | // find corresponding area | ||
| - | let ia = _g.find_area_by_jquery_id(id); | ||
| - | let imap_index = ia[0]; | ||
| - | let found_area = ia[1]; | ||
| - | let area_index = ia[2]; | ||
| - | if (found_area != null) { | ||
| - | if ($(id).length) { | ||
| - | if (_g.a_references[imap_index] === undefined) { | ||
| - | _g.a_references[imap_index] = []; | ||
| - | } | ||
| - | _g.a_references[imap_index].push({ ' | ||
| - | let reference_index = _g.a_references[imap_index].length - 1; | ||
| - | if(_g.defaults[' | ||
| - | $(this).bind(" | ||
| - | var data = e.data; | ||
| - | let imap_index = data[' | ||
| - | let marker_id_jquery = "# | ||
| - | let area_index = data[' | ||
| - | let id = data[' | ||
| - | let reference_index = data[' | ||
| - | if(_g.defaults[' | ||
| - | if ((_g.a_last_clicked_id[imap_index] !== undefined) && (_g.a_last_clicked_id[imap_index][' | ||
| - | // hide marker | ||
| - | $(marker_id_jquery).hide(); | ||
| - | _g.a_references[imap_index].forEach((object, | ||
| - | if (object[' | ||
| - | object[' | ||
| - | } | ||
| - | }); | ||
| - | $(this).css(_g.a_references[imap_index][reference_index][' | ||
| - | } else { | ||
| - | // show marker | ||
| - | let coords = data[' | ||
| - | let xy = _g.calc_marker_pos(coords); | ||
| - | let wh = get_marker_width_and_height(marker_id_jquery); | ||
| - | $(marker_id_jquery).css({ top: xy[1] - wh[1] + 3, left: xy[0] - (wh[0] / 2) }); | ||
| - | $(marker_id_jquery).show(); | ||
| - | _g.a_references[imap_index].forEach((object, | ||
| - | if (object[' | ||
| - | if ((_g.a_cfg[imap_index] !== undefined) && (_g.a_cfg[imap_index][' | ||
| - | object[' | ||
| - | } else { | ||
| - | object[' | ||
| - | } | ||
| - | } else { | ||
| - | object[' | ||
| - | } | ||
| - | }); | ||
| - | } | ||
| - | if(_g.defaults[' | ||
| - | _g.a_last_clicked_id[imap_index] = { ' | ||
| - | }); | ||
| - | $(this).css(' | ||
| - | } | ||
| - | } | ||
| - | } | ||
| - | } catch(e) { console.error(" | ||
| - | }); | ||
| - | } else { | ||
| - | if (_g.imap_div_timeout !== null) { clearTimeout(_g.imap_div_timeout); | ||
| - | _g.imap_div_timeout = setTimeout(imap_do_main_function, | ||
| - | } | ||
| - | }; | ||
| - | | ||
| - | _g.imap_div_timeout = setTimeout(imap_do_main_function, | ||
| - | })(jQuery); | ||
| - | }); | ||
| - | |||
| - | function addBtnActionImagemap(btn, | ||
| - | // Not implemented yet | ||
| - | } | ||
| - | </ | ||