Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
META-INF.resources.bower_components.jquery-image-heatmap.jquery.maphilight.min.js Maven / Gradle / Ivy
(function(g){var b,k,c,l,o,n,j,e,h,a,m;b=document.namespaces;k=!!document.createElement("canvas").getContext;if(!(k||b)){g.fn.maphilight=function(){return this};return}if(k){e=function(p){return Math.max(0,Math.min(parseInt(p,16),255))};h=function(p,q){return"rgba("+e(p.substr(0,2))+","+e(p.substr(2,2))+","+e(p.substr(4,2))+","+q+")"};c=function(p){var q=g(' ').get(0);q.getContext("2d").clearRect(0,0,q.width,q.height);return q};var f=function(r,p,s,q,t){q=q||0;t=t||0;r.beginPath();if(p=="rect"){r.rect(s[0]+q,s[1]+t,s[2]-s[0],s[3]-s[1])}else{if(p=="poly"){r.moveTo(s[0]+q,s[1]+t);for(i=2;i').get(0)};l=function(q,t,u,x,p){var v,w,r,s;v=' ';w=(x.stroke?'strokeweight="'+x.strokeWidth+'" stroked="t" strokecolor="#'+x.strokeColor+'"':'stroked="f"');r=' ';if(t=="rect"){s=g(' ')}else{if(t=="poly"){s=g(' ')}else{if(t=="circ"){s=g(' ')}}}s.get(0).innerHTML=v+r;g(q).append(s)};o=function(p){g(p).find("[name=highlighted]").remove()}}n=function(q){var p,r=q.getAttribute("coords").split(",");for(p=0;p0)){return}if(A.hasClass("maphilighted")){var u=A.parent();A.insertBefore(u);u.remove();g(w).unbind(".maphilight").find("area[coords]").unbind(".maphilight")}x=g("
").css({display:"block",background:'url("'+this.src+'")',position:"relative",padding:0,width:F,height:B});if(H.wrapClass){if(H.wrapClass===true){x.addClass(g(this).attr("class"))}else{x.addClass(H.wrapClass)}}A.before(x).css("opacity",0).css(j).remove();if(g.browser.msie){A.css("filter","Alpha(opacity=0)")}x.append(A);z=c(this);g(z).css(j);z.height=this.height;z.width=this.width;v=c(this);g(v).css(j);v.height=this.height;v.width=this.width;G=c(this);g(G).css(j);G.height=this.height;G.width=this.width;E=function(M){var K,L;L=m(this,H);if(!L.neverOn&&!L.alwaysOn){K=n(this);l(z,K[0],K[1],L,"highlighted");if(L.groupBy){var J;var I=L.groupBy;if(/^[a-zA-Z][-a-zA-Z]+$/.test(L.groupBy)){J=w.find("area")}else{}var N=this;J.each(function(){var P=m(this,H);if(P.groupBy){if(this!=N){var O=n(this);l(z,O[0],O[1],P,"highlighted")}}})}if(!k){g(z).append(" ")}}};click=function(M){o(G);var K,L;L=m(this,H);K=n(this);l(G,K[0],K[1],L,"highlighted");if(L.groupBy){var J;var I=L.groupBy;if(/^[a-zA-Z][-a-zA-Z]+$/.test(L.groupBy)){J=w.find("area")}else{}var N=this;J.each(function(){var P=m(this,H);if(P.groupBy){if(this!=N){var O=n(this);l(G,O[0],O[1],P,"highlighted")}}})}if(!k){g(z).append(" ")}};g(w).bind("alwaysHaveOn",function(){g(w).find("area[coords]").each(function(){var I,J;J=m(this,H);J.fillColor=J.overlayColorPermanent;J.strokeWidth=0;J.strokeColor="000000";J.fillOpacity=J.overlayColorOpacity;I=n(this);if(!(J.fillColor==="transparent")){l(v,I[0],I[1],J,"");l(v,I[0],I[1],J,"")}});A.before(v)});g(w).bind("alwaysOn.maphilight",function(){if(C){o(C)}if(!k){g(z).empty()}g(w).find("area[coords]").each(function(){var I,J;J=m(this,H);if(J.alwaysOn){if(!C&&k){C=c(A.get());g(C).css(j);C.width=A.width();C.height=A.height();A.before(C)}J.fade=J.alwaysOnFade;I=n(this);l(C,I[0],I[1],J,"");l(z,I[0],I[1],J,"")}})});g(w).trigger("alwaysHaveOn").find("area[coords]");g(w).trigger("alwaysOn.maphilight").find("area[coords]").bind("mouseover.maphilight",E).bind("click.maphilight",click).bind("mouseout.maphilight",function(I){o(z)});A.before(z);A.before(G);A.addClass("maphilighted")})};g.fn.maphilight.defaults={fill:true,fillColor:"000000",fillOpacity:0.4,stroke:true,strokeColor:"000000",strokeOpacity:1,strokeWidth:1,fade:true,alwaysOn:false,neverOn:false,groupBy:false,wrapClass:true,shadow:false,shadowX:0,shadowY:0,shadowRadius:6,shadowColor:"000000",shadowOpacity:0.8,shadowPosition:"outside",shadowFrom:false,overlayColorPermanent:"transparent",overlayColorOpacity:1,attName:"8D679D4B11D3E4981000E787EC6DE8A4",attName2:"attribute2",boneId:"no bone"}})(jQuery);