PageSourceSearch

https://cuartohache.com/octavia/js/clip-path-polygon.min.js?ver=0.1.10

js cuartohache.com collected 2026-10-08 09:08:37 UTC 2,508 bytes, 9 lines download raw bytes

1/*!
2 * jQuery clip-path-polygon Plugin v0.1.12 (2017-03-23)
3 * jQuery plugin that makes easy to use clip-path on whatever tag under different browsers
4 * https://github.com/andrusieczko/clip-path-polygon
5 * 
6 * Copyright 2017 Karol Andrusieczko
7 * Released under MIT license
8 */
9var globalVariable=window||root,jQuery=jQuery||globalVariable.jQuery||require("jquery");(function(a){var b=0,c=function(a,c,d,e){this.$=a,this.$el=c,this.points=d,this.svgDefId="clipPathPolygonGenId"+b++,this.processOptions(e)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=c),exports.ClipPath=c):globalVariable.ClipPath=c,c.prototype={$:null,$el:null,points:null,isForWebkit:!0,isForSvg:!0,svgDefId:null,isPercentage:!1,create:function(){this._createClipPath(this.points)},_createClipPath:function(a){this._createSvgDefs(),this.isForSvg&&this._createSvgBasedClipPath(a),this.isForWebkit&&this._createWebkitClipPath(a)},_createWebkitClipPath:function(a){var b="polygon("+this._translatePoints(a,!0,this.isPercentage)+")";this.$el.css("-webkit-clip-path",b)},_createSvgBasedClipPath:function(a){this.$("#"+this.svgDefId).find("polygon").attr("points",this._translatePoints(a,!1,this.isPercentage)),this.$el.css("clip-path","url(#"+this.svgDefId+")")},_translatePoints:function(a,b,c){var d=[];for(var e in a){var f=this._handlePxs(a[e][0],b,c),g=this._handlePxs(a[e][1],b,c);d.push(f+" "+g)}return d.join(", ")},_handlePxs:function(a,b,c){return 0===a?a:b?a+(c?"%":"px"):c?a/100:a},_createSvgElement:function(a){return this.$(document.createElementNS("http://www.w3.org/2000/svg",a))}
9,_createSvgDefs:function(){if(0===this.$("#"+this.svgDefId).length){var a=this._createSvgElement("svg").attr("width",0).attr("height",0).css({position:"absolute",visibility:"hidden",width:0,height:0}),b=this._createSvgElement("defs");a.append(b);var c=this._createSvgElement("clipPath").attr("id",this.svgDefId);this.isPercentage&&c.get(0).setAttribute("clipPathUnits","objectBoundingBox"),b.append(c);var d=this._createSvgElement("polygon");c.append(d),this.$("body").append(a)}},processOptions:function(a){this.isForWebkit=a&&"undefined"!=typeof a.isForWebkit?a.isForWebkit:this.isForWebkit,this.isForSvg=a&&"undefined"!=typeof a.isForSvg?a.isForSvg:this.isForSvg,this.isPercentage=a&&a.isPercentage||this.isPercentage,this.svgDefId=a&&a.svgDefId||this.svgDefId}},a.fn.clipPath=function(b,d){return this.each(function(){var e=a(this),f=new c(a,e,b,d);f.create()})}}).call(this,jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.