diff --git a/core/core.php b/core/core.php index 96f243a..e3ab925 100644 --- a/core/core.php +++ b/core/core.php @@ -138,7 +138,7 @@ class common // 'codemirror', // Désactivé par défaut 'tippy', 'zwiico', - //'imagemap', + 'imagemap', 'simplelightbox', 'datatables' ], diff --git a/core/vendor/imagemap/image-map.min.js b/core/vendor/imagemap/image-map.min.js new file mode 100755 index 0000000..6a3a02c --- /dev/null +++ b/core/vendor/imagemap/image-map.min.js @@ -0,0 +1,8 @@ +/** + * Copyright (c) 2018, Travis Clarke (https://www.travismclarke.com/) + * + * This source code is licensed under the Apache-2.0 license found in the + * LICENSE file in the root directory of this source tree. + */ +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.ImageMap=t(e.$)}(this,function(e){"use strict";function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:500;return function(){for(var o=arguments.length,i=Array(o),a=0;a0&&void 0!==arguments[0]?arguments[0]:0,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return function(r){var i=r.target.width,a=r.target.height,u=t/100,c=n/100,d=r.target.getAttribute("usemap").replace(/^#/,"") +;o(document.querySelectorAll(e.genAreaSelector(d))).forEach(function(e){var t=e.dataset.coords=e.dataset.coords||e.getAttribute("coords"),n=t.split(",");e.setAttribute("coords",""+n.map(function(e,t){return t%2==0?+(n[t]/i*100*u):+(n[t]/a*100*c)}))})}}}],[{key:"genAreaSelector",value:function(e){return'map[name="'.concat(e,'"] area')}}]),e}();return void 0!==e&&e.fn&&(e.fn.imageMap=function(e){return new s(this.toArray(),e)}),c.VERSION="1.1.5",c}); \ No newline at end of file diff --git a/core/vendor/imagemap/inc.json b/core/vendor/imagemap/inc.json new file mode 100755 index 0000000..34fd800 --- /dev/null +++ b/core/vendor/imagemap/inc.json @@ -0,0 +1,4 @@ +[ + "image-map.min.js", + "init.js" +] \ No newline at end of file diff --git a/core/vendor/imagemap/init.js b/core/vendor/imagemap/init.js new file mode 100755 index 0000000..99b77c7 --- /dev/null +++ b/core/vendor/imagemap/init.js @@ -0,0 +1,6 @@ +/** + * Initialisation du redimensionner de mapf + */ +$(function() { + $('img[usemap]').imageMap(); +}); \ No newline at end of file diff --git a/core/vendor/imagemap/read.me b/core/vendor/imagemap/read.me new file mode 100755 index 0000000..c473544 --- /dev/null +++ b/core/vendor/imagemap/read.me @@ -0,0 +1,2 @@ +Article https://blog.travismclarke.com/project/imagemap/ +Générateur : https://www.image-map.net/ \ No newline at end of file