PluginProbe
Getwid – Gutenberg Blocks / 3.0.1
Getwid – Gutenberg Blocks v3.0.1
3.0.2 3.0.1 3.0.0 2.1.0 2.1.1 2.1.2 2.1.3 2.2.0 trunk 1.8.7 1.9.1 2.0.10 2.0.11 2.0.12 2.0.13 2.0.14 2.0.5 2.0.6 2.0.7 2.0.8 2.0.9
getwid / assets / blocks / image-hotspot / view.js

view.js in Getwid – Gutenberg Blocks 3.0.1, at assets/blocks/image-hotspot/view.js

1 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (()=>{"use strict";const t={n:n=>{const i=n&&n.__esModule?()=>n.default:()=>n;return t.d(i,{a:i}),i},d:(n,i)=>{if(Array.isArray(i))for(var e=0;e<i.length;){var a=i[e++],o=i[e++];t.o(n,a)?0===o&&e++:0===o?Object.defineProperty(n,a,{enumerable:!0,value:i[e++]}):Object.defineProperty(n,a,{enumerable:!0,get:o})}else for(var a in i)t.o(i,a)&&!t.o(n,a)&&Object.defineProperty(n,a,{enumerable:!0,get:i[a]})},o:(t,n)=>Object.hasOwn(t,n)},n=window.jQuery;var i=t.n(n);const e="wp-block-getwid-image-hotspot";function a(){const t=window,n=i()(`.${e}:not(.getwid-init)`);n.length&&t.tippy&&n.each(function(n,a){const o=i()(a),d=o.data("trigger"),s=o.data("theme"),r=o.data("tooltip-animation"),m=o.data("arrow"),l=o.data("image-points")||[];o.addClass("getwid-init"),i()(`.getwid-animation .${e}__dot`).on("mouseenter",function(){!function(t,n){const e=(()=>{const t=document.createElement("div").style,n={animation:"animationend",OAnimation:"oAnimationEnd",MozAnimation:"mozAnimationEnd",WebkitAnimation:"webkitAnimationEnd"};for(const i in n)if(i in t)return n[i];return"animationend"})(),a=n.animation||"",o=n.duration||"1s",d=n.delay||"0s";t.css({"animation-duration":o,"animation-delay":d,"-webkit-animation-delay":d}),t.addClass(`animated ${a}`).one(e,function(){i()(this).removeClass(`animated ${a}`)})}(i()(this),{animation:i()(this).closest(".getwid-animation").attr("data-animation")})}),o.find(`.${e}__dot`).each(function(n,a){const o=i()(a),c=Number(o.data("point-id")),p=l[c]||{},u=t._unescape||(t=>t),f=u(o.find(`.${e}__dot-title`).html()||""),h=u(p.content||""),g=t.tippy?.(a,{maxWidth:parseInt(String(p.popUpWidth),10),hideOnClick:"multiple"!==d||"toggle",theme:s,animation:r,animateFill:!1,interactive:!0,trigger:"hover"===d?"mouseenter":"click",arrow:m,placement:p.placement,allowHTML:!0,content:`<div class="${e}__tooltip"><div class="${e}__tooltip-title">${f}</div><div class="${e}__tooltip-content">${h}</div></div>`});p.popUpOpen&&setTimeout(()=>{g?.show?.()},1e3),o.find(`.${e}__dot-description`).remove(),t.Waypoint&&new t.Waypoint({element:a,handler(){i()(this.element).addClass("is-visible")},offset:"100%"})})})}i()(document).ready(()=>{i()(document.body).on("post-load",a),a()})})();