/* DOKUWIKI:include_once jquery.imagemapster.js */
/* DOKUWIKI:include ImageMappingEditor.js */             strokeColor: "5097f3",

(function ($) {

    $(function () {
        $('img[usemap]').mapster({
            fillColor: 'ffffff',
            fillOpacity: 0.15,
            wrapClass: true,
            wrapCss: true,
            stroke: true,
            strokeColor: "2983f7",
            strokeOpacity: 0.4,
            strokeWidth: 2,
            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);
    });
}
