-
Notifications
You must be signed in to change notification settings - Fork 4
/
script.js
37 lines (30 loc) · 912 Bytes
/
script.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/* DOKUWIKI:include_once jquery.imagemapster.js */
/* DOKUWIKI:include ImageMappingEditor.js */
(function ($) {
$(function () {
$('img[usemap]').mapster({
fillColor: 'ffffff',
fillOpacity: 0.1,
wrapClass: true,
wrapCss: true,
stroke: true,
strokeColor: "3320FF",
strokeOpacity: 0.8,
strokeWidth: 4,
clickNavigate: true
});
});
$(window).resize(function () {
$('img[usemap]').each(function () {
$(this).mapster('resize', $(this.offsetParent).width());
});
});
})(jQuery);
function addBtnActionImagemap(btn, props, edid) {
jQuery(btn).on('click', function () {
// get current selection
const area = document.getElementById(edid);
const sel = DWgetSelection(area);
new ImageMappingEditor(sel);
});
}