alchemy 1.0.3 → 8.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +24 -17
- data/README.md +538 -4
- data/lib/alchemy.rb +3 -2
- metadata +61 -223
- data/Rakefile +0 -21
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Bold-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-BoldItalic-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Italic-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.eot +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.svg +0 -154
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.ttf +0 -0
- data/app/assets/fonts/alchemy/LiberationSans-Regular-webfont.woff +0 -0
- data/app/assets/fonts/alchemy/Red Hat Liberation License.txt +0 -78
- data/app/assets/fonts/alchemy/overpass_bold-web.eot +0 -0
- data/app/assets/fonts/alchemy/overpass_bold-web.svg +0 -470
- data/app/assets/fonts/alchemy/overpass_bold-web.ttf +0 -0
- data/app/assets/fonts/alchemy/overpass_bold-web.woff +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.eot +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.svg +0 -470
- data/app/assets/fonts/alchemy/overpass_regular-web.ttf +0 -0
- data/app/assets/fonts/alchemy/overpass_regular-web.woff +0 -0
- data/app/assets/images/alchemy/icons/action-icons.png +0 -0
- data/app/assets/images/alchemy/icons/arrow_icon.png +0 -0
- data/app/assets/images/alchemy/icons/chosen-sprite.png +0 -0
- data/app/assets/images/alchemy/icons/error_icon.png +0 -0
- data/app/assets/images/alchemy/icons/objects.png +0 -0
- data/app/assets/images/alchemy/icons/spinner.gif +0 -0
- data/app/assets/images/alchemy/icons/spinner_head.gif +0 -0
- data/app/assets/images/alchemy/icons/success_icon.png +0 -0
- data/app/assets/images/alchemy/icons/warning_icon.png +0 -0
- data/app/assets/javascripts/alchemy/flash_messages.js +0 -12
- data/app/assets/javascripts/alchemy/forms.js +0 -25
- data/app/assets/javascripts/alchemy/i18n.js +0 -36
- data/app/assets/javascripts/alchemy/login.js +0 -130
- data/app/assets/javascripts/alchemy/password.js +0 -99
- data/app/assets/stylesheets/alchemy/components/_chosen.scss +0 -423
- data/app/assets/stylesheets/alchemy/components/_content.scss +0 -58
- data/app/assets/stylesheets/alchemy/components/_helpers.scss +0 -38
- data/app/assets/stylesheets/alchemy/components/_media.scss +0 -49
- data/app/assets/stylesheets/alchemy/components/_media_object.scss +0 -22
- data/app/assets/stylesheets/alchemy/components/_normalize.scss +0 -396
- data/app/assets/stylesheets/alchemy/components/_shared.scss +0 -18
- data/app/assets/stylesheets/alchemy/components/buttons/_buttons.scss +0 -278
- data/app/assets/stylesheets/alchemy/components/buttons/_buttons_vars.scss +0 -11
- data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages.scss +0 -93
- data/app/assets/stylesheets/alchemy/components/flash_messages/_flash_messages_vars.scss +0 -3
- data/app/assets/stylesheets/alchemy/components/fonts/_liberation.scss +0 -44
- data/app/assets/stylesheets/alchemy/components/fonts/_overpass.scss +0 -24
- data/app/assets/stylesheets/alchemy/components/footer/_footer.scss +0 -53
- data/app/assets/stylesheets/alchemy/components/footer/_footer_vars.scss +0 -4
- data/app/assets/stylesheets/alchemy/components/forms/_forms.scss +0 -552
- data/app/assets/stylesheets/alchemy/components/forms/_forms_ie.scss +0 -45
- data/app/assets/stylesheets/alchemy/components/forms/_forms_mixins.scss +0 -18
- data/app/assets/stylesheets/alchemy/components/forms/_forms_responsive.scss +0 -167
- data/app/assets/stylesheets/alchemy/components/forms/_forms_vars.scss +0 -25
- data/app/assets/stylesheets/alchemy/components/header/_header.scss +0 -216
- data/app/assets/stylesheets/alchemy/components/header/_header_vars.scss +0 -11
- data/app/assets/stylesheets/alchemy/components/login/_login.scss +0 -173
- data/app/assets/stylesheets/alchemy/components/login/_login_mixins.scss +0 -7
- data/app/assets/stylesheets/alchemy/components/login/_login_vars.scss +0 -19
- data/app/assets/stylesheets/alchemy/components/sprites/_sprites.scss +0 -110
- data/app/assets/stylesheets/alchemy/components/sprites/_sprites_mixins.scss +0 -9
- data/app/assets/stylesheets/alchemy/components/text/_text.scss +0 -30
- data/app/assets/stylesheets/alchemy/components/text/_text_vars.scss +0 -1
- data/app/assets/stylesheets/alchemy/composites/content_elements.scss +0 -6
- data/app/assets/stylesheets/alchemy/composites/login.scss +0 -9
- data/app/assets/stylesheets/alchemy/composites/shell.scss +0 -4
- data/app/assets/stylesheets/alchemy/partials/_base.scss +0 -8
- data/app/assets/stylesheets/alchemy/partials/_colors.scss +0 -99
- data/app/assets/stylesheets/alchemy/partials/_mixins.scss +0 -24
- data/app/assets/stylesheets/alchemy/partials/_vars.scss +0 -31
- data/app/helpers/alchemy/gettext_translations.rb +0 -28
- data/app/helpers/alchemy/layout_helper.rb +0 -35
- data/app/helpers/alchemy/rails_translations.rb +0 -21
- data/app/helpers/alchemy/translation_helper.rb +0 -19
- data/app/views/alchemy/layouts/_change_password_layout.html.haml +0 -20
- data/app/views/alchemy/layouts/_common_i18n.haml +0 -4
- data/app/views/alchemy/layouts/_header_layout.haml +0 -13
- data/app/views/alchemy/layouts/_login_layout.html.haml +0 -58
- data/app/views/alchemy/layouts/_user_session_layout.haml +0 -17
- data/app/views/alchemy/layouts/base.html.haml +0 -20
- data/app/views/alchemy/layouts/shell_layout.haml +0 -10
- data/lib/alchemy/engine.rb +0 -8
- data/lib/alchemy/version.rb +0 -3
- data/test/alchemy_test.rb +0 -7
- data/test/test_helper.rb +0 -9
- data/vendor/assets/javascripts/alchemy/handlebars.js +0 -2201
- data/vendor/assets/javascripts/alchemy/html5shiv.js +0 -298
- data/vendor/assets/javascripts/alchemy/jquery/jquery-1.6.2.js +0 -8981
- data/vendor/assets/javascripts/alchemy/jquery/plugins/chosen.jquery.js +0 -1003
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.js +0 -1427
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/excanvas.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.js +0 -179
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.colorhelpers.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.js +0 -167
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.crosshair.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.js +0 -183
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.fillbetween.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.js +0 -238
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.image.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.js +0 -2599
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.min.js +0 -6
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.js +0 -336
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.navigate.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.js +0 -750
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.pie.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.js +0 -60
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.resize.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.js +0 -344
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.selection.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.js +0 -184
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.stack.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.js +0 -70
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.symbol.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.js +0 -103
- data/vendor/assets/javascripts/alchemy/jquery/plugins/flot-0.7/jquery.flot.threshold.min.js +0 -1
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/blank.svg +0 -3
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/custom_test.js +0 -67
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.css +0 -9
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.js +0 -1101
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svg.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.js +0 -396
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svgfilter.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.js +0 -1337
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.min.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/jquery.svggraph.pack.js +0 -7
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/lion.svg +0 -161
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery-svg/test.js +0 -714
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ajaxfileupload.js +0 -205
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-bbq.js +0 -1137
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ba-resize.js +0 -246
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.cookie.js +0 -92
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.easing.1.3.js +0 -205
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.fancyqueries.js +0 -106
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.flash.js +0 -288
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.form.js +0 -964
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.hoverIntent.js +0 -106
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.ajaxupload.js +0 -62
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jeditable.js +0 -556
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jnotify.js +0 -210
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.js +0 -1390
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.jscrollpane.min.js +0 -11
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.linkHover.js +0 -89
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.loadmask.min.js +0 -10
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.mousewheel.js +0 -78
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.filter.js +0 -176
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.multiselect.js +0 -668
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.pack.js +0 -11
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.periodicalupdater.js +0 -175
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sortElements.js +0 -75
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.sparkline.min.js +0 -94
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.text-overflow.js +0 -60
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timepickr.js +0 -214
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.timers.js +0 -142
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.tipsy.js +0 -358
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.treeTable.js +0 -226
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.trunk8.js +0 -203
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.multiselect.js +0 -338
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.ui.totop.js +0 -58
- data/vendor/assets/javascripts/alchemy/jquery/plugins/jquery.uitablefilter.js +0 -95
- data/vendor/assets/javascripts/alchemy/jquery/plugins/ui.spinner.js +0 -683
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_dadada_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_75_e6e6e6_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-hard_95_ffffff_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_highlight-soft_80_e0e0e0_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-hard_65_ffffff_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-bg_inset-soft_95_fef1ec_1x100.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_8f8f8f_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_97baed_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/css/custom-theme/jquery-ui-1.8.11.custom.css +0 -573
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-1.5.1.min.js +0 -16
- data/vendor/assets/javascripts/alchemy/jquery-ui-1.8.11.custom/js/jquery-ui-1.8.11.custom.min.js +0 -783
- data/vendor/assets/javascripts/alchemy/rails.js +0 -331
- data/vendor/assets/javascripts/alchemy/underscore-1.3.1.js +0 -999
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/* http://keith-wood.name/svg.html
|
|
2
|
-
SVG for jQuery v1.0.1.
|
|
3
|
-
Written by Keith Wood (kbwood@iprimus.com.au) August 2007.
|
|
4
|
-
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
|
|
5
|
-
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
|
|
6
|
-
Please attribute the author if you use it. */
|
|
7
|
-
var svgManager=null;(function($){function SVGManager(){this._nextId=0;this._svgs=[];this._settings=[];this._extensions=[];this.regional=[];this.regional['']={notSupportedText:'This browser does not support SVG',errorLoadingText:'Error loading'};this.local=this.regional['']}$.extend(SVGManager.prototype,{svgNS:'http://www.w3.org/2000/svg',xlinkNS:'http://www.w3.org/1999/xlink',_rootClass:SVGRoot,_connectSVG:function(a,b,c,d){var e=this._nextId++;a._svgId=e;var f=null;if($.browser.msie){a.innerHTML='<embed type="image/svg+xml" width="'+a.clientWidth+'" height="'+a.clientHeight+'" src="blank.svg"/>';this._settings[e]=[a,b,d,c]}else if(document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#SVG","1.1")||document.implementation.hasFeature("org.w3c.svg","1.1")){f=document.createElementNS(this.svgNS,'svg');f.setAttribute('version','1.1');f.setAttribute('width',a.clientWidth);f.setAttribute('height',a.clientHeight);a.appendChild(f);this._afterLoad(e,f,[a,b,d,c])}else{a.innerHTML='<p class="svg_error">'+this.local.notSupportedText+'</p>'}return e},_registerSVG:function(){for(var i=0;i<document.embeds.length;i++){var a=document.embeds[i].parentNode._svgId;var b=document.embeds[i].getSVGDocument();b=(b?b.documentElement:null);if(a!=null&&b&&!this._svgs[a]){this._afterLoad(a,b)}}},_afterLoad:function(a,b,c){var c=c||this._settings[a];var d=this._svgs[a]=new this._rootClass(b,c[0]);if(c[1]){d.load(c[1])}if(c[2]){d.configure(c[2])}if(c[3]){c[3](c[0])}},getSVGFor:function(a){a=(typeof a=='string'?$(a)[0]:(a.jquery?a[0]:a));return this._svgs[a._svgId]},addExtension:function(a,b){this._extensions[this._extensions.length]=[a,b]}});function SVGRoot(a,b){this._svg=a;this._container=b;for(var i=0;i<svgManager._extensions.length;i++){var c=svgManager._extensions[i];this[c[0]]=new c[1](this)}}$.extend(SVGRoot.prototype,{_width:function(){return this._container.clientWidth},_height:function(){return this._container.clientHeight},configure:function(a,b){if(b){for(var i=this._svg.attributes.length-1;i>=0;i--){var c=this._svg.attributes.item(i);if(!(c.nodeName=='onload'||c.nodeName=='version'||c.nodeName.substring(0,5)=='xmlns')){this._svg.attributes.removeNamedItem(c.nodeName)}}}for(var d in a){this._svg.setAttribute(d,a[d])}return this},getElementById:function(a){return this._svg.getElementById(a)},title:function(a,b,c){var d=this._makeNode(a,'title',c||{});d.appendChild(this._svg.ownerDocument.createTextNode(b));return d},describe:function(a,b,c){var d=this._makeNode(a,'desc',c||{});d.appendChild(this._svg.ownerDocument.createTextNode(b));return d},defs:function(a,b,c){if(typeof b!='string'){c=b;b=null}return this._makeNode(a,'defs',$.extend((b?{id:b}:{}),c||{}))},symbol:function(a,b,c,d,e,f,g){return this._makeNode(a,'symbol',$.extend({id:b,viewBox:c+' '+d+' '+e+' '+f},g||{}))},marker:function(a,b,c,d,e,f,g,h){if(typeof g=='object'){h=g;g=null}return this._makeNode(a,'marker',$.extend({id:b,refX:c,refY:d,markerWidth:e,markerHeight:f,orient:g||'auto'},h||{}))},style:function(a,b,c){var d=this._makeNode(a,'style',$.extend({type:'text/css'},c||{}));d.appendChild(this._svg.ownerDocument.createTextNode(this._escapeXML(b)));return d},script:function(a,b,c,d){if(typeof c=='object'){d=c;c=null}var e=this._makeNode(a,'script',$.extend({type:c||'text/javascript'},d||{}));e.appendChild(this._svg.ownerDocument.createTextNode(this._escapeXML(b)));return e},linearGradient:function(a,b,c,d,e,f,g,h){if(typeof d=='object'){h=d;d=null}var i=$.extend({id:b},(d!=null?{x1:d,y1:e,x2:f,y2:g}:{}));return this._gradient(a,'linearGradient',$.extend(i,h||{}),c)},radialGradient:function(a,b,c,d,e,r,f,g,h){if(typeof d=='object'){h=d;d=null}var i=$.extend({id:b},(d!=null?{cx:d,cy:e,r:r,fx:f,fy:g}:{}));return this._gradient(a,'radialGradient',$.extend(i,h||{}),c)},_gradient:function(a,b,c,d){var e=this._makeNode(a,b,c);for(var i=0;i<d.length;i++){var f=d[i];this._makeNode(e,'stop',$.extend({offset:f[0],stop_color:f[1]},(f[2]!=null?{stop_opacity:f[2]}:{})))}return e},pattern:function(a,b,x,y,c,d,e,f,g,h,i){if(typeof e=='object'){i=e;e=null}var j=$.extend({id:b,x:x,y:y,width:c,height:d},(e!=null?{viewBox:e+' '+f+' '+g+' '+h}:{}));return this._makeNode(a,'pattern',$.extend(j,i||{}))},mask:function(a,b,x,y,c,d,e){return this._makeNode(a,'mask',$.extend({id:b,x:x,y:y,width:c,height:d},e||{}))},createPath:function(){return new SVGPath()},createText:function(){return new SVGText()},svg:function(a,x,y,b,c,d,e,f,g,h){if(typeof d=='object'){h=d;d=null}var i=$.extend({x:x,y:y,width:b,height:c},(d!=null?{viewBox:d+' '+e+' '+f+' '+g}:{}));return this._makeNode(a,'svg',$.extend(i,h||{}))},group:function(a,b,c){if(typeof b=='object'){c=b;b=null}return this._makeNode(a,'g',$.extend({id:b},c||{}))},use:function(a,x,y,b,c,d,e){if(typeof x=='string'){d=x;e=y;x=y=b=c=null}var f=this._makeNode(a,'use',$.extend({x:x,y:y,width:b,height:c},e||{}));f.setAttributeNS(svgManager.xlinkNS,'href',d);return f},link:function(a,b,c){var d=this._makeNode(a,'a',c);d.setAttributeNS(svgManager.xlinkNS,'href',b);return d},image:function(a,x,y,b,c,d,e){var f=this._makeNode(a,'image',$.extend({x:x,y:y,width:b,height:c},e||{}));f.setAttributeNS(svgManager.xlinkNS,'href',d);return f},path:function(a,b,c){return this._makeNode(a,'path',$.extend({d:(b.path?b.path():b)},c||{}))},rect:function(a,x,y,b,c,d){return this._makeNode(a,'rect',$.extend({x:x,y:y,width:b,height:c},d||{}))},roundrect:function(a,x,y,b,c,d,e,f){return this._makeNode(a,'rect',$.extend({x:x,y:y,width:b,height:c,rx:d,ry:e},f||{}))},circle:function(a,b,c,r,d){return this._makeNode(a,'circle',$.extend({cx:b,cy:c,r:r},d||{}))},ellipse:function(a,b,c,d,e,f){return this._makeNode(a,'ellipse',$.extend({cx:b,cy:c,rx:d,ry:e},f||{}))},line:function(a,b,c,d,e,f){return this._makeNode(a,'line',$.extend({x1:b,y1:c,x2:d,y2:e},f||{}))},polyline:function(a,b,c){return this._poly(a,'polyline',b,c)},polygon:function(a,b,c){return this._poly(a,'polygon',b,c)},_poly:function(a,b,c,d){var e='';for(var i=0;i<c.length;i++){e+=c[i].join()+' '}return this._makeNode(a,b,$.extend({points:e},d||{}))},text:function(a,x,y,b,c){if(typeof x=='string'&&arguments.length<4){b=x;c=y;x=y=null}return this._text(a,'text',b,$.extend({x:(x&&isArray(x)?x.join(' '):x),y:(y&&isArray(y)?y.join(' '):y)},c||{}))},textpath:function(a,b,c,d){var e=this._text(a,'textPath',c,d||{});e.setAttributeNS(svgManager.xlinkNS,'href',b);return e},_text:function(a,b,c,d){var e=this._makeNode(a,b,d);if(typeof c=='string'){e.appendChild(e.ownerDocument.createTextNode(c))}else{for(var i=0;i<c._parts.length;i++){var f=c._parts[i];if(f[0]=='tspan'){var g=this._makeNode(e,f[0],f[2]);g.appendChild(e.ownerDocument.createTextNode(f[1]));e.appendChild(g)}else if(f[0]=='tref'){var g=this._makeNode(e,f[0],f[2]);g.setAttributeNS(svgManager.xlinkNS,'href',f[1]);e.appendChild(g)}else if(f[0]=='textpath'){var h=f[2].href;f[2].href=null;var g=this._makeNode(e,f[0],f[2]);g.setAttributeNS(svgManager.xlinkNS,'href',h);g.appendChild(e.ownerDocument.createTextNode(f[1]));e.appendChild(g)}else{e.appendChild(e.ownerDocument.createTextNode(f[1]))}}}return e},other:function(a,b,c){return this._makeNode(a,other,c||{})},_makeNode:function(a,b,c){a=a||this._svg;var d=this._svg.ownerDocument.createElementNS(svgManager.svgNS,b);for(var b in c){var e=c[b];if(e!=null&&e!=null&&(typeof e!='string'||e!='')){d.setAttribute(this._fromJSName(b),e)}}a.appendChild(d);return d},_fromJSName:function(a){return a.replace(/^_/,'').replace(/_/g,'-')},add:function(b,c){var d=this;b=b||this._svg;c=(c.jquery?c:$(c));c.each(function(){var a=d._cloneAsSVG(this);if(a){b.appendChild(a)}})},_cloneAsSVG:function(a){var b=null;if(a.nodeType==1){b=this._svg.ownerDocument.createElementNS(a.namespaceURI||svgManager.svgNS,this._checkName(a.nodeName));for(var i=0;i<a.attributes.length;i++){var c=a.attributes.item(i);if(c.nodeName!='xmlns'){if(c.prefix=='xlink'){b.setAttributeNS(svgManager.xlinkNS,c.localName,c.nodeValue)}else{b.setAttribute(this._checkName(c.nodeName),c.nodeValue)}}}for(var i=0;i<a.childNodes.length;i++){var d=this._cloneAsSVG(a.childNodes[i]);if(d){b.appendChild(d)}}}else if(a.nodeType==3){if($.trim(a.nodeValue)){b=this._svg.ownerDocument.createTextNode(a.nodeValue)}}else if(a.nodeType==4){if($.trim(a.nodeValue)){b=this._svg.ownerDocument.createCDATASection(a.nodeValue)}}return b},_checkName:function(a){a=(a.substring(0,1)>='A'&&a.substring(0,1)<='Z'?a.toLowerCase():a);return(a.substring(0,4)=='svg:'?a.substring(4):a)},load:function(e,f){if(!f){this.clear(true)}var g=this;var h=$.ajax({url:e,dataType:'xml',success:function(a){if($.browser.msie){a.loadXML(h.responseText);if(a.parseError.errorCode!=0){g.text(null,10,20,svgManager.local.errorLoadingText+': '+a.parseError.reason);return}}var b={};for(var i=0;i<a.documentElement.attributes.length;i++){var c=a.documentElement.attributes.item(i);if(!(c.nodeName=='version'||c.nodeName.substring(0,5)=='xmlns')){b[c.nodeName]=c.nodeValue}}g.configure(b,true);var d=a.documentElement.childNodes;for(var i=0;i<d.length;i++){g.add(null,d[i])}},error:function(a,b,c){g.text(null,10,20,svgManager.local.errorLoadingText+': '+b+(c?' '+c.message:''))}})},remove:function(a){a.parentNode.removeChild(a)},clear:function(a){if(a){this.configure({},true)}while(this._svg.firstChild){this._svg.removeChild(this._svg.firstChild)}},toSVG:function(){return this._toSVG(this._svg)},_toSVG:function(a){var b='';if(!a){return b}if(a.nodeType==3){b=a.nodeValue}else if(a.nodeType==4){b='<![CDATA['+a.nodeValue+']]>'}else{b='<'+a.nodeName;if(a.attributes){for(var i=0;i<a.attributes.length;i++){var c=a.attributes.item(i);if(!($.trim(c.nodeValue)==''||c.nodeValue.match(/^\[object/)||c.nodeValue.match(/^function/))){b+=' '+(c.namespaceURI==svgManager.xlinkNS?'xlink:':'')+c.nodeName+'="'+c.nodeValue+'"'}}}if(a.firstChild){b+='>';var d=a.firstChild;while(d){b+=this._toSVG(d);d=d.nextSibling}b+='</'+a.nodeName+'>'}else{b+='/>'}}return b},_escapeXML:function(a){a=a.replace(/&/g,'&');a=a.replace(/</g,'<');a=a.replace(/>/g,'>');return a}});function SVGPath(){this._path=''}$.extend(SVGPath.prototype,{reset:function(){this._path='';return this},moveTo:function(x,y,a){a=(isArray(x)?y:a);return this._coords((a?'m':'M'),x,y)},lineTo:function(x,y,a){a=(isArray(x)?y:a);return this._coords((a?'l':'L'),x,y)},horizTo:function(x,a){this._path+=(a?'h':'H')+x;return this},vertTo:function(y,a){this._path+=(a?'v':'V')+y;return this},curveCTo:function(a,b,c,d,x,y,e){e=(isArray(a)?b:e);return this._coords((e?'c':'C'),a,b,c,d,x,y)},smoothCTo:function(a,b,x,y,c){c=(isArray(a)?b:c);return this._coords((c?'s':'S'),a,b,x,y)},curveQTo:function(a,b,x,y,c){c=(isArray(a)?b:c);return this._coords((c?'q':'Q'),a,b,x,y)},smoothQTo:function(x,y,a){a=(isArray(x)?y:a);return this._coords((a?'t':'T'),x,y)},_coords:function(a,b,c,d,e,f,g){if(isArray(b)){for(var i=0;i<b.length;i++){var h=b[i];this._path+=(i==0?a:' ')+h[0]+','+h[1]+(h.length<4?'':' '+h[2]+','+h[3]+(h.length<6?'':' '+h[4]+','+h[5]))}}else{this._path+=a+b+','+c+(d==null?'':' '+d+','+e+(f==null?'':' '+f+','+g))}return this},arcTo:function(a,b,c,d,e,x,y,f){f=(isArray(a)?b:f);this._path+=(f?'a':'A');if(isArray(a)){for(var i=0;i<a.length;i++){var g=a[i];this._path+=(i==0?'':' ')+g[0]+','+g[1]+' '+g[2]+' '+(g[3]?'1':'0')+','+(g[4]?'1':'0')+' '+g[5]+','+g[6]}}else{this._path+=a+','+b+' '+c+' '+(d?'1':'0')+','+(e?'1':'0')+' '+x+','+y}return this},close:function(){this._path+='z';return this},path:function(){return this._path}});function SVGText(){this._parts=[]}$.extend(SVGText.prototype,{reset:function(){this._parts=[];return this},string:function(a){this._parts[this._parts.length]=['text',a];return this},span:function(a,b){this._parts[this._parts.length]=['tspan',a,b];return this},ref:function(a,b){this._parts[this._parts.length]=['tref',a,b];return this},path:function(a,b,c){this._parts[this._parts.length]=['textpath',b,$.extend({href:a},c||{})];return this}});$.fn.svg=function(a,b,c){if(typeof a=='function'){c=b;b=a;a=null}if(a&&typeof a=='object'){c=a;a=b=null}if(b&&typeof b=='object'){c=b;b=null}return this.each(function(){svgManager._connectSVG(this,a,b,c)})};function isArray(a){return(a.constructor&&a.constructor.toString().match(/\Array\(\)/))}svgManager=new SVGManager()})(jQuery);
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/* http://keith-wood.name/svg.html
|
|
2
|
-
SVG for jQuery v1.0.1.
|
|
3
|
-
Written by Keith Wood (kbwood@iprimus.com.au) August 2007.
|
|
4
|
-
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
|
|
5
|
-
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
|
|
6
|
-
Please attribute the author if you use it. */
|
|
7
|
-
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('k E=o;(8($){8 1t(){7.27=0;7.1j=[];7.1u=[];7.1f=[];7.1v=[];7.1v[\'\']={28:\'2W 1w 2X 2Y 2Z 29\',1x:\'30 31\'};7.1k=7.1v[\'\']}$.u(1t.1l,{1m:\'1y://1z.1A.1n/32/Y\',11:\'1y://1z.1A.1n/33/1B\',2a:1C,2b:8(a,b,c,d){k e=7.27++;a.1D=e;k f=o;n($.1w.2c){a.2d=\'<34 1E="1F/Y+2e" 12="\'+a.1G+\'" 13="\'+a.1H+\'" 35="36.Y"/>\';7.1u[e]=[a,b,d,c]}J n(1o||1b.2f.2g("1y://1z.1A.1n/37/38/39#29","1.1")||1b.2f.2g("1n.3a.Y","1.1")){f=1b.1I(7.1m,\'Y\');f.1c(\'1J\',\'1.1\');f.1c(\'12\',a.1G);f.1c(\'13\',a.1H);a.G(f);7.1K(e,f,[a,b,d,c])}J{a.2d=\'<p 3b="3c">\'+7.1k.28+\'</p>\'}9 e},3d:8(){I(k i=0;i<1b.1L.B;i++){k a=1b.1L[i].2h.1D;k b=1b.1L[i].3e();b=(b?b.1p:o);n(a!=o&&b&&!7.1j[a]){7.1K(a,b)}}},1K:8(a,b,c){k c=c||7.1u[a];k d=7.1j[a]=1g 7.2a(b,c[0]);n(c[1]){d.2i(c[1])}n(c[2]){d.1q(c[2])}n(c[3]){c[3](c[0])}},3f:8(a){a=(F a==\'17\'?$(a)[0]:(a.2j?a[0]:a));9 7.1j[a.1D]},3g:8(a,b){7.1f[7.1f.B]=[a,b]}});8 1C(a,b){7.D=a;7.1M=b;I(k i=0;i<E.1f.B;i++){k c=E.1f[i];7[c[0]]=1g c[1](7)}}$.u(1C.1l,{3h:8(){9 7.1M.1G},3i:8(){9 7.1M.1H},1q:8(a,b){n(b){I(k i=7.D.W.B-1;i>=0;i--){k c=7.D.W.1r(i);n(!(c.K==\'3j\'||c.K==\'1J\'||c.K.1d(0,5)==\'1N\')){7.D.W.3k(c.K)}}}I(k d 2k a){7.D.1c(d,a[d])}9 7},2l:8(a){9 7.D.2l(a)},2m:8(a,b,c){k d=7.w(a,\'2m\',c||{});d.G(7.D.O.14(b));9 d},3l:8(a,b,c){k d=7.w(a,\'3m\',c||{});d.G(7.D.O.14(b));9 d},2n:8(a,b,c){n(F b!=\'17\'){c=b;b=o}9 7.w(a,\'2n\',$.u((b?{16:b}:{}),c||{}))},2o:8(a,b,c,d,e,f,g){9 7.w(a,\'2o\',$.u({16:b,1O:c+\' \'+d+\' \'+e+\' \'+f},g||{}))},2p:8(a,b,c,d,e,f,g,h){n(F g==\'X\'){h=g;g=o}9 7.w(a,\'2p\',$.u({16:b,3n:c,3o:d,3p:e,3q:f,3r:g||\'3s\'},h||{}))},2q:8(a,b,c){k d=7.w(a,\'2q\',$.u({1E:\'18/3t\'},c||{}));d.G(7.D.O.14(7.1P(b)));9 d},2r:8(a,b,c,d){n(F c==\'X\'){d=c;c=o}k e=7.w(a,\'2r\',$.u({1E:c||\'18/3u\'},d||{}));e.G(7.D.O.14(7.1P(b)));9 e},2s:8(a,b,c,d,e,f,g,h){n(F d==\'X\'){h=d;d=o}k i=$.u({16:b},(d!=o?{2t:d,2u:e,2v:f,2w:g}:{}));9 7.1Q(a,\'2s\',$.u(i,h||{}),c)},2x:8(a,b,c,d,e,r,f,g,h){n(F d==\'X\'){h=d;d=o}k i=$.u({16:b},(d!=o?{1R:d,1S:e,r:r,3v:f,3w:g}:{}));9 7.1Q(a,\'2x\',$.u(i,h||{}),c)},1Q:8(a,b,c,d){k e=7.w(a,b,c);I(k i=0;i<d.B;i++){k f=d[i];7.w(e,\'3x\',$.u({3y:f[0],3z:f[1]},(f[2]!=o?{3A:f[2]}:{})))}9 e},2y:8(a,b,x,y,c,d,e,f,g,h,i){n(F e==\'X\'){i=e;e=o}k j=$.u({16:b,x:x,y:y,12:c,13:d},(e!=o?{1O:e+\' \'+f+\' \'+g+\' \'+h}:{}));9 7.w(a,\'2y\',$.u(j,i||{}))},2z:8(a,b,x,y,c,d,e){9 7.w(a,\'2z\',$.u({16:b,x:x,y:y,12:c,13:d},e||{}))},3B:8(){9 1g 1T()},3C:8(){9 1g 1U()},Y:8(a,x,y,b,c,d,e,f,g,h){n(F d==\'X\'){h=d;d=o}k i=$.u({x:x,y:y,12:b,13:c},(d!=o?{1O:d+\' \'+e+\' \'+f+\' \'+g}:{}));9 7.w(a,\'Y\',$.u(i,h||{}))},3D:8(a,b,c){n(F b==\'X\'){c=b;b=o}9 7.w(a,\'g\',$.u({16:b},c||{}))},2A:8(a,x,y,b,c,d,e){n(F x==\'17\'){d=x;e=y;x=y=b=c=o}k f=7.w(a,\'2A\',$.u({x:x,y:y,12:b,13:c},e||{}));f.19(E.11,\'15\',d);9 f},3E:8(a,b,c){k d=7.w(a,\'a\',c);d.19(E.11,\'15\',b);9 d},1F:8(a,x,y,b,c,d,e){k f=7.w(a,\'1F\',$.u({x:x,y:y,12:b,13:c},e||{}));f.19(E.11,\'15\',d);9 f},1e:8(a,b,c){9 7.w(a,\'1e\',$.u({d:(b.1e?b.1e():b)},c||{}))},1V:8(a,x,y,b,c,d){9 7.w(a,\'1V\',$.u({x:x,y:y,12:b,13:c},d||{}))},3F:8(a,x,y,b,c,d,e,f){9 7.w(a,\'1V\',$.u({x:x,y:y,12:b,13:c,2B:d,2C:e},f||{}))},2D:8(a,b,c,r,d){9 7.w(a,\'2D\',$.u({1R:b,1S:c,r:r},d||{}))},2E:8(a,b,c,d,e,f){9 7.w(a,\'2E\',$.u({1R:b,1S:c,2B:d,2C:e},f||{}))},2F:8(a,b,c,d,e,f){9 7.w(a,\'2F\',$.u({2t:b,2u:c,2v:d,2w:e},f||{}))},2G:8(a,b,c){9 7.1W(a,\'2G\',b,c)},2H:8(a,b,c){9 7.1W(a,\'2H\',b,c)},1W:8(a,b,c,d){k e=\'\';I(k i=0;i<c.B;i++){e+=c[i].1X()+\' \'}9 7.w(a,b,$.u({3G:e},d||{}))},18:8(a,x,y,b,c){n(F x==\'17\'&&3H.B<4){b=x;c=y;x=y=o}9 7.1Y(a,\'18\',b,$.u({x:(x&&P(x)?x.1X(\' \'):x),y:(y&&P(y)?y.1X(\' \'):y)},c||{}))},1Z:8(a,b,c,d){k e=7.1Y(a,\'3I\',c,d||{});e.19(E.11,\'15\',b);9 e},1Y:8(a,b,c,d){k e=7.w(a,b,d);n(F c==\'17\'){e.G(e.O.14(c))}J{I(k i=0;i<c.R.B;i++){k f=c.R[i];n(f[0]==\'2I\'){k g=7.w(e,f[0],f[2]);g.G(e.O.14(f[1]));e.G(g)}J n(f[0]==\'2J\'){k g=7.w(e,f[0],f[2]);g.19(E.11,\'15\',f[1]);e.G(g)}J n(f[0]==\'1Z\'){k h=f[2].15;f[2].15=o;k g=7.w(e,f[0],f[2]);g.19(E.11,\'15\',h);g.G(e.O.14(f[1]));e.G(g)}J{e.G(e.O.14(f[1]))}}}9 e},2K:8(a,b,c){9 7.w(a,2K,c||{})},w:8(a,b,c){a=a||7.D;k d=7.D.O.1I(E.1m,b);I(k b 2k c){k e=c[b];n(e!=o&&e!=o&&(F e!=\'17\'||e!=\'\')){d.1c(7.2L(b),e)}}a.G(d);9 d},2L:8(a){9 a.1h(/^2M/,\'\').1h(/2M/g,\'-\')},2N:8(b,c){k d=7;b=b||7.D;c=(c.2j?c:$(c));c.2O(8(){k a=d.21(7);n(a){b.G(a)}})},21:8(a){k b=o;n(a.1i==1){b=7.D.O.1I(a.2P||E.1m,7.22(a.K));I(k i=0;i<a.W.B;i++){k c=a.W.1r(i);n(c.K!=\'1N\'){n(c.3J==\'1B\'){b.19(E.11,c.3K,c.N)}J{b.1c(7.22(c.K),c.N)}}}I(k i=0;i<a.23.B;i++){k d=7.21(a.23[i]);n(d){b.G(d)}}}J n(a.1i==3){n($.24(a.N)){b=7.D.O.14(a.N)}}J n(a.1i==4){n($.24(a.N)){b=7.D.O.3L(a.N)}}9 b},22:8(a){a=(a.1d(0,1)>=\'A\'&&a.1d(0,1)<=\'Z\'?a.3M():a);9(a.1d(0,4)==\'Y:\'?a.1d(4):a)},2i:8(e,f){n(!f){7.2Q(1o)}k g=7;k h=$.3N({3O:e,3P:\'2e\',3Q:8(a){n($.1w.2c){a.3R(h.3S);n(a.2R.3T!=0){g.18(o,10,20,E.1k.1x+\': \'+a.2R.3U);9}}k b={};I(k i=0;i<a.1p.W.B;i++){k c=a.1p.W.1r(i);n(!(c.K==\'1J\'||c.K.1d(0,5)==\'1N\')){b[c.K]=c.N}}g.1q(b,1o);k d=a.1p.23;I(k i=0;i<d.B;i++){g.2N(o,d[i])}},3V:8(a,b,c){g.18(o,10,20,E.1k.1x+\': \'+b+(c?\' \'+c.3W:\'\'))}})},3X:8(a){a.2h.2S(a)},2Q:8(a){n(a){7.1q({},1o)}2T(7.D.1s){7.D.2S(7.D.1s)}},3Y:8(){9 7.25(7.D)},25:8(a){k b=\'\';n(!a){9 b}n(a.1i==3){b=a.N}J n(a.1i==4){b=\'<![3Z[\'+a.N+\']]>\'}J{b=\'<\'+a.K;n(a.W){I(k i=0;i<a.W.B;i++){k c=a.W.1r(i);n(!($.24(c.N)==\'\'||c.N.26(/^\\[X/)||c.N.26(/^8/))){b+=\' \'+(c.2P==E.11?\'1B:\':\'\')+c.K+\'="\'+c.N+\'"\'}}}n(a.1s){b+=\'>\';k d=a.1s;2T(d){b+=7.25(d);d=d.40}b+=\'</\'+a.K+\'>\'}J{b+=\'/>\'}}9 b},1P:8(a){a=a.1h(/&/g,\'&41;\');a=a.1h(/</g,\'&42;\');a=a.1h(/>/g,\'&43;\');9 a}});8 1T(){7.U=\'\'}$.u(1T.1l,{2U:8(){7.U=\'\';9 7},44:8(x,y,a){a=(P(x)?y:a);9 7.1a((a?\'m\':\'M\'),x,y)},45:8(x,y,a){a=(P(x)?y:a);9 7.1a((a?\'l\':\'L\'),x,y)},46:8(x,a){7.U+=(a?\'h\':\'H\')+x;9 7},47:8(y,a){7.U+=(a?\'v\':\'V\')+y;9 7},48:8(a,b,c,d,x,y,e){e=(P(a)?b:e);9 7.1a((e?\'c\':\'C\'),a,b,c,d,x,y)},49:8(a,b,x,y,c){c=(P(a)?b:c);9 7.1a((c?\'s\':\'S\'),a,b,x,y)},4a:8(a,b,x,y,c){c=(P(a)?b:c);9 7.1a((c?\'q\':\'Q\'),a,b,x,y)},4b:8(x,y,a){a=(P(x)?y:a);9 7.1a((a?\'t\':\'T\'),x,y)},1a:8(a,b,c,d,e,f,g){n(P(b)){I(k i=0;i<b.B;i++){k h=b[i];7.U+=(i==0?a:\' \')+h[0]+\',\'+h[1]+(h.B<4?\'\':\' \'+h[2]+\',\'+h[3]+(h.B<6?\'\':\' \'+h[4]+\',\'+h[5]))}}J{7.U+=a+b+\',\'+c+(d==o?\'\':\' \'+d+\',\'+e+(f==o?\'\':\' \'+f+\',\'+g))}9 7},4c:8(a,b,c,d,e,x,y,f){f=(P(a)?b:f);7.U+=(f?\'a\':\'A\');n(P(a)){I(k i=0;i<a.B;i++){k g=a[i];7.U+=(i==0?\'\':\' \')+g[0]+\',\'+g[1]+\' \'+g[2]+\' \'+(g[3]?\'1\':\'0\')+\',\'+(g[4]?\'1\':\'0\')+\' \'+g[5]+\',\'+g[6]}}J{7.U+=a+\',\'+b+\' \'+c+\' \'+(d?\'1\':\'0\')+\',\'+(e?\'1\':\'0\')+\' \'+x+\',\'+y}9 7},4d:8(){7.U+=\'z\';9 7},1e:8(){9 7.U}});8 1U(){7.R=[]}$.u(1U.1l,{2U:8(){7.R=[];9 7},17:8(a){7.R[7.R.B]=[\'18\',a];9 7},4e:8(a,b){7.R[7.R.B]=[\'2I\',a,b];9 7},4f:8(a,b){7.R[7.R.B]=[\'2J\',a,b];9 7},1e:8(a,b,c){7.R[7.R.B]=[\'1Z\',b,$.u({15:a},c||{})];9 7}});$.4g.Y=8(a,b,c){n(F a==\'8\'){c=b;b=a;a=o}n(a&&F a==\'X\'){c=a;a=b=o}n(b&&F b==\'X\'){c=b;b=o}9 7.2O(8(){E.2b(7,a,b,c)})};8 P(a){9(a.2V&&a.2V.4h().26(/\\4i\\(\\)/))}E=1g 1t()})(4j);',62,268,'|||||||this|function|return|||||||||||var|||if|null||||||extend||_makeNode|||||length||_svg|svgManager|typeof|appendChild||for|else|nodeName|||nodeValue|ownerDocument|isArray||_parts|||_path||attributes|object|svg|||xlinkNS|width|height|createTextNode|href|id|string|text|setAttributeNS|_coords|document|setAttribute|substring|path|_extensions|new|replace|nodeType|_svgs|local|prototype|svgNS|org|true|documentElement|configure|item|firstChild|SVGManager|_settings|regional|browser|errorLoadingText|http|www|w3|xlink|SVGRoot|_svgId|type|image|clientWidth|clientHeight|createElementNS|version|_afterLoad|embeds|_container|xmlns|viewBox|_escapeXML|_gradient|cx|cy|SVGPath|SVGText|rect|_poly|join|_text|textpath||_cloneAsSVG|_checkName|childNodes|trim|_toSVG|match|_nextId|notSupportedText|SVG|_rootClass|_connectSVG|msie|innerHTML|xml|implementation|hasFeature|parentNode|load|jquery|in|getElementById|title|defs|symbol|marker|style|script|linearGradient|x1|y1|x2|y2|radialGradient|pattern|mask|use|rx|ry|circle|ellipse|line|polyline|polygon|tspan|tref|other|_fromJSName|_|add|each|namespaceURI|clear|parseError|removeChild|while|reset|constructor|This|does|not|support|Error|loading|2000|1999|embed|src|blank|TR|SVG11|feature|w3c|class|svg_error|_registerSVG|getSVGDocument|getSVGFor|addExtension|_width|_height|onload|removeNamedItem|describe|desc|refX|refY|markerWidth|markerHeight|orient|auto|css|javascript|fx|fy|stop|offset|stop_color|stop_opacity|createPath|createText|group|link|roundrect|points|arguments|textPath|prefix|localName|createCDATASection|toLowerCase|ajax|url|dataType|success|loadXML|responseText|errorCode|reason|error|message|remove|toSVG|CDATA|nextSibling|amp|lt|gt|moveTo|lineTo|horizTo|vertTo|curveCTo|smoothCTo|curveQTo|smoothQTo|arcTo|close|span|ref|fn|toString|Array|jQuery'.split('|'),0,{}))
|
|
@@ -1,396 +0,0 @@
|
|
|
1
|
-
/* http://keith-wood.name/svg.html
|
|
2
|
-
SVG filters for jQuery v1.0.1.
|
|
3
|
-
Written by Keith Wood (kbwood@iprimus.com.au) August 2007.
|
|
4
|
-
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
|
|
5
|
-
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
|
|
6
|
-
Please attribute the author if you use it. */
|
|
7
|
-
|
|
8
|
-
(function($) { // Hide scope, no $ conflict
|
|
9
|
-
|
|
10
|
-
svgManager.addExtension('filters', SVGFilter);
|
|
11
|
-
|
|
12
|
-
$.extend(svgManager._rootClass.prototype, {
|
|
13
|
-
|
|
14
|
-
/* Add a filter definition.
|
|
15
|
-
@param parent element - the parent node for the new filter
|
|
16
|
-
@param id string - the ID for this filter
|
|
17
|
-
@param x number - the x-coordinate for the left edge of the filter
|
|
18
|
-
@param y number - the y-coordinate for the top edge of the filter
|
|
19
|
-
@param width number - the width of the filter
|
|
20
|
-
@param height number - the height of the filter
|
|
21
|
-
@param settings object - additional settings for the filter (optional)
|
|
22
|
-
@return the new filter node */
|
|
23
|
-
filter: function(parent, id, x, y, width, height, settings) {
|
|
24
|
-
return this._makeNode(parent, 'filter', $.extend(
|
|
25
|
-
{id: id, x: x, y: y, width: width, height: height}, settings || {}));
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
/* Extension point for SVG filters.
|
|
30
|
-
Access through root.filters. */
|
|
31
|
-
function SVGFilter(root) {
|
|
32
|
-
this._root = root; // The attached SVG root object
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
$.extend(SVGFilter.prototype, {
|
|
36
|
-
|
|
37
|
-
/* Add a distant light filter.
|
|
38
|
-
@param parent element - the parent node for the new filter
|
|
39
|
-
@param result string - the ID of this filter
|
|
40
|
-
@param azimuth number - the angle (degrees) in the XY plane for the light source
|
|
41
|
-
@param elevation number - the angle (degrees) in the YZ plane for the light source
|
|
42
|
-
@param settings object - additional settings for the filter (optional)
|
|
43
|
-
@return the new filter node */
|
|
44
|
-
distantLight: function(parent, result, azimuth, elevation, settings) {
|
|
45
|
-
return this._root._makeNode(parent, 'feDistantLight', $.extend(
|
|
46
|
-
{result: result, azimuth: azimuth, elevantion: elevation}, settings || {}));
|
|
47
|
-
},
|
|
48
|
-
|
|
49
|
-
/* Add a point light filter.
|
|
50
|
-
@param parent element - the parent node for the new filter
|
|
51
|
-
@param result string - the ID of this filter
|
|
52
|
-
@param x number - the x-coordinate for the light source
|
|
53
|
-
@param y number - the y-coordinate for the light source
|
|
54
|
-
@param z number - the z-coordinate for the light source
|
|
55
|
-
@param settings object - additional settings for the filter (optional)
|
|
56
|
-
@return the new filter node */
|
|
57
|
-
pointLight: function(parent, result, x, y, z, settings) {
|
|
58
|
-
return this._root._makeNode(parent, 'fePointLight', $.extend(
|
|
59
|
-
{result: result, x: x, y: y, z: z}, settings || {}));
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
/* Add a spot light filter.
|
|
63
|
-
Specify all of toX, toY, toZ or none of them.
|
|
64
|
-
@param parent element - the parent node for the new filter
|
|
65
|
-
@param result string - the ID of this filter
|
|
66
|
-
@param x number - the x-coordinate for the light source
|
|
67
|
-
@param y number - the y-coordinate for the light source
|
|
68
|
-
@param z number - the z-coordinate for the light source
|
|
69
|
-
@param toX number - the x-coordinate for where the light is pointing (optional)
|
|
70
|
-
@param toY number - the y-coordinate for where the light is pointing (optional)
|
|
71
|
-
@param toZ number - the z-coordinate for where the light is pointing (optional)
|
|
72
|
-
@param settings object - additional settings for the filter (optional)
|
|
73
|
-
@return the new filter node */
|
|
74
|
-
spotLight: function(parent, result, x, y, z, toX, toY, toZ, settings) {
|
|
75
|
-
if (typeof toX == 'object') {
|
|
76
|
-
settings = toX;
|
|
77
|
-
toX = null;
|
|
78
|
-
}
|
|
79
|
-
var sets = $.extend({result: result, x: x, y: y, z: z},
|
|
80
|
-
(toX != null ? {pointsAtX: toX, pointsAtY: toY, pointsAtZ: toZ} : {}));
|
|
81
|
-
return this._root._makeNode(parent, 'feSpotLight', $.extend(sets, settings || {}));
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
/* Add a blend filter.
|
|
85
|
-
@param parent element - the parent node for the new filter
|
|
86
|
-
@param result string - the ID of this filter
|
|
87
|
-
@param mode string - normal | multiply | screen | darken | lighten
|
|
88
|
-
@param in1 string - the first image to blend
|
|
89
|
-
@param in2 string - the second image to blend
|
|
90
|
-
@param settings object - additional settings for the filter (optional)
|
|
91
|
-
@return the new filter node */
|
|
92
|
-
blend: function(parent, result, mode, in1, in2, settings) {
|
|
93
|
-
return this._root._makeNode(parent, 'feBlend', $.extend(
|
|
94
|
-
{result: result, mode: mode, _in: in1, in2: in2}, settings || {}));
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
/* Add a colour matrix filter.
|
|
98
|
-
@param parent element - the parent node for the new filter
|
|
99
|
-
@param result string - the ID of this filter
|
|
100
|
-
@param in1 string - the source to colour
|
|
101
|
-
@param type string - matrix | saturate | hueRotate | luminanceToAlpha
|
|
102
|
-
@param values number[][] - for 'matrix' the matrix (5x4) values to apply
|
|
103
|
-
number - for 'saturate' 0.0 to 1.0
|
|
104
|
-
number - for 'hueRotate' degrees
|
|
105
|
-
void - for 'luminanceToAlpha'
|
|
106
|
-
@param settings object - additional settings for the filter (optional)
|
|
107
|
-
@return the new filter node */
|
|
108
|
-
colorMatrix: function(parent, result, in1, type, values, settings) {
|
|
109
|
-
if (isArray(values)) {
|
|
110
|
-
var vs = '';
|
|
111
|
-
for (var i = 0; i < values.length; i++) {
|
|
112
|
-
vs += (i == 0 ? '' : ' ') + values[i].join(' ');
|
|
113
|
-
}
|
|
114
|
-
values = vs;
|
|
115
|
-
}
|
|
116
|
-
else if (typeof values == 'object') {
|
|
117
|
-
settings = values;
|
|
118
|
-
values = null;
|
|
119
|
-
}
|
|
120
|
-
var sets = $.extend({result: result, _in: in1, type: type},
|
|
121
|
-
(values != null ? {values: values} : {}));
|
|
122
|
-
return this._root._makeNode(parent, 'feColorMatrix', $.extend(sets, settings || {}));
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
/* Add a component transfer filter.
|
|
126
|
-
@param parent element - the parent node for the new filter
|
|
127
|
-
@param result string - the ID of this filter
|
|
128
|
-
@param functions object[] - one for each of RGB and A (alpha, optional)
|
|
129
|
-
for each entry:
|
|
130
|
-
[0] is string - identity | table | discrete | linear | gamma
|
|
131
|
-
[1] is number[] - for 'table' or 'discrete' the list of
|
|
132
|
-
interpolation or step values OR
|
|
133
|
-
number - for 'linear' the slope, for 'gamma' the amplitude,
|
|
134
|
-
[2] is number - for 'linear' the intercept, for 'gamma' the exponent,
|
|
135
|
-
[3] is number - for 'gamma' the offset
|
|
136
|
-
@param settings object - additional settings for the filter (optional)
|
|
137
|
-
@return the new filter node */
|
|
138
|
-
componentTransfer: function(parent, result, functions, settings) {
|
|
139
|
-
var node = this._root._makeNode(parent, 'feComponentTransfer',
|
|
140
|
-
$.extend({result: result}, settings || {}));
|
|
141
|
-
var rgba = ['R', 'G', 'B', 'A'];
|
|
142
|
-
for (var i = 0; i < Math.min(4, functions.length); i++) {
|
|
143
|
-
var props = functions[i];
|
|
144
|
-
var sets = $.extend({type: props[0]},
|
|
145
|
-
(type == 'table' || type == 'discrete' ? {table: props[1].join(' ')} :
|
|
146
|
-
(type == 'linear' ? {slope: props[1], intercept: props[2]} :
|
|
147
|
-
(type == 'gamma' ? {amplitude: props[1],
|
|
148
|
-
exponent: props[2], offset: props[3]} : {}))));
|
|
149
|
-
this._root._makeNode(node, 'feFunc' + rgba[i], sets);
|
|
150
|
-
}
|
|
151
|
-
return node;
|
|
152
|
-
},
|
|
153
|
-
|
|
154
|
-
/* Add a composite filter.
|
|
155
|
-
Specify all of k1, k2, k3, k4 or none of them.
|
|
156
|
-
@param parent element - the parent node for the new filter
|
|
157
|
-
@param result string - the ID of this filter
|
|
158
|
-
@param operator string - over | in | out | atop | xor | arithmetic
|
|
159
|
-
@param in1 string - the first filter to compose
|
|
160
|
-
@param in2 string - the second filter to compose
|
|
161
|
-
@param k1 number - for 'arithmetic' (optional)
|
|
162
|
-
@param k2 number - for 'arithmetic' (optional)
|
|
163
|
-
@param k3 number - for 'arithmetic' (optional)
|
|
164
|
-
@param k4 number - for 'arithmetic' (optional)
|
|
165
|
-
@param settings object - additional settings for the filter (optional)
|
|
166
|
-
@return the new filter node */
|
|
167
|
-
composite: function(parent, result, operator, in1, in2, k1, k2, k3, k4, settings) {
|
|
168
|
-
if (typeof k1 == 'object') {
|
|
169
|
-
settings = k1;
|
|
170
|
-
k1 = null;
|
|
171
|
-
}
|
|
172
|
-
var sets = $.extend({result: result, operator: operator, _in: in1, in2: in2},
|
|
173
|
-
(k1 != null ? {k1: k1, k2: k2, k3: k3, k4: k4} : {}));
|
|
174
|
-
return this._root._makeNode(parent, 'feComposite',
|
|
175
|
-
$.extend(sets, settings || {}));
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
/* Add a convolve matrix filter.
|
|
179
|
-
@param parent element - the parent node for the new filter
|
|
180
|
-
@param result string - the ID of this filter
|
|
181
|
-
@param order int or 'int int' - the size(s) of the matrix
|
|
182
|
-
@param matrix number[][] - the kernel matrix for the convolution
|
|
183
|
-
@param settings object - additional settings for the filter (optional)
|
|
184
|
-
@return the new filter node */
|
|
185
|
-
convolveMatrix: function(parent, result, order, matrix, settings) {
|
|
186
|
-
var mx = '';
|
|
187
|
-
for (var i = 0; i < matrix.length; i++) {
|
|
188
|
-
mx += (i == 0 ? '' : ' ') + matrix[i].join(' ');
|
|
189
|
-
}
|
|
190
|
-
matrix = mx;
|
|
191
|
-
return this._root._makeNode(parent, 'feConvolveMatrix', $.extend(
|
|
192
|
-
{result: result, order: order, kernelMatrix: matrix}, settings || {}));
|
|
193
|
-
},
|
|
194
|
-
|
|
195
|
-
/* Add a diffuse lighting filter.
|
|
196
|
-
@param parent element - the parent node for the new filter
|
|
197
|
-
@param result string - the ID of this filter
|
|
198
|
-
@param colour string - the lighting colour (optional)
|
|
199
|
-
@param settings object - additional settings for the filter (optional)
|
|
200
|
-
@return the new filter node */
|
|
201
|
-
diffuseLighting: function(parent, result, colour, settings) {
|
|
202
|
-
if (typeof colour == 'object') {
|
|
203
|
-
settings = colour;
|
|
204
|
-
colour = null;
|
|
205
|
-
}
|
|
206
|
-
return this._root._makeNode(parent, 'feDiffuseLighting',
|
|
207
|
-
$.extend($.extend({result: result}, (colour ? {lighting_color: colour} : {})), settings || {}));
|
|
208
|
-
},
|
|
209
|
-
|
|
210
|
-
/* Add a displacement map filter.
|
|
211
|
-
@param parent element - the parent node for the new filter
|
|
212
|
-
@param result string - the ID of this filter
|
|
213
|
-
@param in1 string - the source image
|
|
214
|
-
@param in2 string - the displacement image
|
|
215
|
-
@param settings object - additional settings for the filter (optional)
|
|
216
|
-
@return the new filter node */
|
|
217
|
-
displacementMap: function(parent, result, in1, in2, settings) {
|
|
218
|
-
return this._root._makeNode(parent, 'feDisplacementMap',
|
|
219
|
-
$.extend({result: result, _in: in1, in2: in2}, settings || {}));
|
|
220
|
-
},
|
|
221
|
-
|
|
222
|
-
/* Add a flood filter.
|
|
223
|
-
Specify all of x, y, width, height or none of them.
|
|
224
|
-
@param parent element - the parent node for the new filter
|
|
225
|
-
@param result string - the ID of this filter
|
|
226
|
-
@param x number - the left coordinate of the rectangle (optional)
|
|
227
|
-
@param y number - the top coordinate of the rectangle (optional)
|
|
228
|
-
@param width number - the width of the rectangle (optional)
|
|
229
|
-
@param height number - the height of the rectangle (optional)
|
|
230
|
-
@param colour string - the colour to fill with
|
|
231
|
-
@param opacity number - the opacity 0.0-1.0
|
|
232
|
-
@param settings object - additional settings for the filter (optional)
|
|
233
|
-
@return the new filter node */
|
|
234
|
-
flood: function(parent, result, x, y, width, height, colour, opacity, settings) {
|
|
235
|
-
if (arguments.length < 6) {
|
|
236
|
-
colour = x;
|
|
237
|
-
opacity = y;
|
|
238
|
-
settings = width;
|
|
239
|
-
x = null;
|
|
240
|
-
}
|
|
241
|
-
var sets = $.extend({result: result, flood_color: colour, flood_opacity: opacity},
|
|
242
|
-
(x != null ? {x: x, y: y, width: width, height: height} : {}));
|
|
243
|
-
return this._root._makeNode(parent, 'feFlood',
|
|
244
|
-
$.extend(sets, settings || {}));
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
/* Add a Gaussian blur filter.
|
|
248
|
-
@param parent element - the parent node for the new filter
|
|
249
|
-
@param result string - the ID of this filter
|
|
250
|
-
@param in1 string - the source filter
|
|
251
|
-
@param stdDevX number - the standard deviation along the x-axis
|
|
252
|
-
@param stdDevY number - the standard deviation along the y-axis (optional)
|
|
253
|
-
@param settings object - additional settings for the filter (optional)
|
|
254
|
-
@return the new filter node */
|
|
255
|
-
gaussianBlur: function(parent, result, in1, stdDevX, stdDevY, settings) {
|
|
256
|
-
if (typeof stdDevY == 'object') {
|
|
257
|
-
settings = stdDevY;
|
|
258
|
-
stdDevY = null;
|
|
259
|
-
}
|
|
260
|
-
return this._root._makeNode(parent, 'feGaussianBlur', $.extend(
|
|
261
|
-
{result: result, _in: in1, stdDeviation: stdDevX + (stdDevY ? ' ' + stdDevY : '')},
|
|
262
|
-
settings || {}));
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
-
/* Add an image filter.
|
|
266
|
-
@param parent element - the parent node for the new filter
|
|
267
|
-
@param result string - the ID of this filter
|
|
268
|
-
@param href string - the URL of the image
|
|
269
|
-
@param settings object - additional settings for the filter (optional)
|
|
270
|
-
@return the new filter node */
|
|
271
|
-
image: function(parent, result, href, settings) {
|
|
272
|
-
var node = this._root._makeNode(parent, 'feImage', $.extend(
|
|
273
|
-
{result: result}, settings || {}));
|
|
274
|
-
node.setAttributeNS(svgManager._xlinkNS, 'href', href);
|
|
275
|
-
return node;
|
|
276
|
-
},
|
|
277
|
-
|
|
278
|
-
/* Add a merge filter.
|
|
279
|
-
@param parent element - the parent node for the new filter
|
|
280
|
-
@param result string - the ID of this filter
|
|
281
|
-
@param refs string[] - the IDs of the filters to merge
|
|
282
|
-
@param settings object - additional settings for the filter (optional)
|
|
283
|
-
@return the new filter node */
|
|
284
|
-
merge: function(parent, result, refs, settings) {
|
|
285
|
-
var node = this._root._makeNode(parent, 'feMerge', $.extend(
|
|
286
|
-
{result: result}, settings || {}));
|
|
287
|
-
for (var i = 0; i < refs.length; i++) {
|
|
288
|
-
this._root._makeNode(node, 'feMergeNode', {_in: refs[i]});
|
|
289
|
-
}
|
|
290
|
-
return node;
|
|
291
|
-
},
|
|
292
|
-
|
|
293
|
-
/* Add a morphology filter.
|
|
294
|
-
@param parent element - the parent node for the new filter
|
|
295
|
-
@param result string - the ID of this filter
|
|
296
|
-
@param in1 string - the source filter
|
|
297
|
-
@param operator string - erode | dilate
|
|
298
|
-
@param radiusX number - the size of the operation in the x-axis
|
|
299
|
-
@param radiusY number - the size of the operation in the y-axis (optional)
|
|
300
|
-
@param settings object - additional settings for the filter (optional)
|
|
301
|
-
@return the new filter node */
|
|
302
|
-
morphology: function(parent, result, in1, operator, radiusX, radiusY, settings) {
|
|
303
|
-
if (typeof radiusY == 'object') {
|
|
304
|
-
settings = radiusY;
|
|
305
|
-
radiusY = null;
|
|
306
|
-
}
|
|
307
|
-
return this._root._makeNode(parent, 'feMorphology', $.extend(
|
|
308
|
-
{result: result, _in: in1, operator: operator,
|
|
309
|
-
radius: radiusX + (radiusY ? ' ' + radiusY : '')}, settings || {}));
|
|
310
|
-
},
|
|
311
|
-
|
|
312
|
-
/* Add an offset filter.
|
|
313
|
-
@param parent element - the parent node for the new filter
|
|
314
|
-
@param result string - the ID of this filter
|
|
315
|
-
@param in1 string - the source filter
|
|
316
|
-
@param dX number - the offset in the x-axis
|
|
317
|
-
@param dY number - the offset in the y-axis
|
|
318
|
-
@param settings object - additional settings for the filter (optional)
|
|
319
|
-
@return the new filter node */
|
|
320
|
-
offset: function(parent, result, in1, dx, dy, settings) {
|
|
321
|
-
return this._root._makeNode(parent, 'feOffset', $.extend(
|
|
322
|
-
{result: result, _in: in1, dx: dx, dy: dy}, settings || {}));
|
|
323
|
-
},
|
|
324
|
-
|
|
325
|
-
/* Add a specular lighting filter.
|
|
326
|
-
Numeric params are only optional if following numeric params are also omitted.
|
|
327
|
-
@param parent element - the parent node for the new filter
|
|
328
|
-
@param result string - the ID of this filter
|
|
329
|
-
@param in1 string - the source filter
|
|
330
|
-
@param surfaceScale number - the surface height when Ain = 1 (optional)
|
|
331
|
-
@param specularConstant number - the ks in Phong lighting model (optional)
|
|
332
|
-
@param specularExponent number - the shininess 1.0-128.0 (optional)
|
|
333
|
-
@param settings object - additional settings for the filter (optional)
|
|
334
|
-
@return the new filter node */
|
|
335
|
-
specularLighting: function(parent, result, in1, surfaceScale,
|
|
336
|
-
specularConstant, specularExponent, settings) {
|
|
337
|
-
if (typeof surfaceScale == 'object') {
|
|
338
|
-
settings = surfaceScale;
|
|
339
|
-
surfaceScale = null;
|
|
340
|
-
}
|
|
341
|
-
if (typeof specularConstant == 'object') {
|
|
342
|
-
settings = specularConstant;
|
|
343
|
-
specularConstant = null;
|
|
344
|
-
}
|
|
345
|
-
if (typeof specularExponent == 'object') {
|
|
346
|
-
settings = specularExponent;
|
|
347
|
-
specularExponent = null;
|
|
348
|
-
}
|
|
349
|
-
return this._root._makeNode(parent, 'feSpecularLighting', $.extend(
|
|
350
|
-
{result: result, _in: in1, surfaceScale: surfaceScale,
|
|
351
|
-
specularConstant: specularConstant, specularExponent: specularExponent},
|
|
352
|
-
settings || {}));
|
|
353
|
-
},
|
|
354
|
-
|
|
355
|
-
/* Add a tile filter.
|
|
356
|
-
@param parent element - the parent node for the new filter
|
|
357
|
-
@param result string - the ID of this filter
|
|
358
|
-
@param in1 string - the source filter
|
|
359
|
-
@param x number - the left coordinate of the rectangle
|
|
360
|
-
@param y number - the top coordinate of the rectangle
|
|
361
|
-
@param width number - the width of the rectangle
|
|
362
|
-
@param height number - the height of the rectangle
|
|
363
|
-
@param settings object - additional settings for the filter (optional)
|
|
364
|
-
@return the new filter node */
|
|
365
|
-
tile: function(parent, result, in1, x, y, width, height, settings) {
|
|
366
|
-
return this._root._makeNode(parent, 'feTile', $.extend(
|
|
367
|
-
{result: result, _in: in1, x: x, y: y, width: width, height: height},
|
|
368
|
-
settings || {}));
|
|
369
|
-
},
|
|
370
|
-
|
|
371
|
-
/* Add a turbulence filter.
|
|
372
|
-
@param parent element - the parent node for the new filter
|
|
373
|
-
@param result string - the ID of this filter
|
|
374
|
-
@param type string - fractalNoise | turbulence
|
|
375
|
-
@param baseFreq number or 'number number' - the base frequency,
|
|
376
|
-
optionally separated into x- and y-components
|
|
377
|
-
@param octaves number - the amount of turbulence (optional)
|
|
378
|
-
@param settings object - additional settings for the filter (optional)
|
|
379
|
-
@return the new filter node */
|
|
380
|
-
turbulence: function(parent, result, type, baseFreq, octaves, settings) {
|
|
381
|
-
if (typeof octaves == 'object') {
|
|
382
|
-
settings = octaves;
|
|
383
|
-
octaves = null;
|
|
384
|
-
}
|
|
385
|
-
return this._root._makeNode(parent, 'feTurbulence', $.extend(
|
|
386
|
-
{result: result, type: type, baseFrequency: baseFreq, numOctaves: octaves},
|
|
387
|
-
settings || {}));
|
|
388
|
-
}
|
|
389
|
-
});
|
|
390
|
-
|
|
391
|
-
/* Determine whether an object is an array. */
|
|
392
|
-
function isArray(a) {
|
|
393
|
-
return (a.constructor && a.constructor.toString().match(/\Array\(\)/));
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
})(jQuery)
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/* http://keith-wood.name/svg.html
|
|
2
|
-
SVG filters for jQuery v1.0.1.
|
|
3
|
-
Written by Keith Wood (kbwood@iprimus.com.au) August 2007.
|
|
4
|
-
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
|
|
5
|
-
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
|
|
6
|
-
Please attribute the author if you use it. */
|
|
7
|
-
(function($){svgManager.addExtension('filters',SVGFilter);$.extend(svgManager._rootClass.prototype,{filter:function(a,b,x,y,c,d,e){return this._makeNode(a,'filter',$.extend({id:b,x:x,y:y,width:c,height:d},e||{}))}});function SVGFilter(a){this._root=a}$.extend(SVGFilter.prototype,{distantLight:function(a,b,c,d,e){return this._root._makeNode(a,'feDistantLight',$.extend({result:b,azimuth:c,elevantion:d},e||{}))},pointLight:function(a,b,x,y,z,c){return this._root._makeNode(a,'fePointLight',$.extend({result:b,x:x,y:y,z:z},c||{}))},spotLight:function(a,b,x,y,z,c,d,e,f){if(typeof c=='object'){f=c;c=null}var g=$.extend({result:b,x:x,y:y,z:z},(c!=null?{pointsAtX:c,pointsAtY:d,pointsAtZ:e}:{}));return this._root._makeNode(a,'feSpotLight',$.extend(g,f||{}))},blend:function(a,b,c,d,e,f){return this._root._makeNode(a,'feBlend',$.extend({result:b,mode:c,_in:d,in2:e},f||{}))},colorMatrix:function(a,b,c,d,e,f){if(isArray(e)){var g='';for(var i=0;i<e.length;i++){g+=(i==0?'':' ')+e[i].join(' ')}e=g}else if(typeof e=='object'){f=e;e=null}var h=$.extend({result:b,_in:c,type:d},(e!=null?{values:e}:{}));return this._root._makeNode(a,'feColorMatrix',$.extend(h,f||{}))},componentTransfer:function(a,b,c,d){var e=this._root._makeNode(a,'feComponentTransfer',$.extend({result:b},d||{}));var f=['R','G','B','A'];for(var i=0;i<Math.min(4,c.length);i++){var g=c[i];var h=$.extend({type:g[0]},(type=='table'||type=='discrete'?{table:g[1].join(' ')}:(type=='linear'?{slope:g[1],intercept:g[2]}:(type=='gamma'?{amplitude:g[1],exponent:g[2],offset:g[3]}:{}))));this._root._makeNode(e,'feFunc'+f[i],h)}return e},composite:function(a,b,c,d,e,f,g,h,i,j){if(typeof f=='object'){j=f;f=null}var k=$.extend({result:b,operator:c,_in:d,in2:e},(f!=null?{k1:f,k2:g,k3:h,k4:i}:{}));return this._root._makeNode(a,'feComposite',$.extend(k,j||{}))},convolveMatrix:function(a,b,c,d,e){var f='';for(var i=0;i<d.length;i++){f+=(i==0?'':' ')+d[i].join(' ')}d=f;return this._root._makeNode(a,'feConvolveMatrix',$.extend({result:b,order:c,kernelMatrix:d},e||{}))},diffuseLighting:function(a,b,c,d){if(typeof c=='object'){d=c;c=null}return this._root._makeNode(a,'feDiffuseLighting',$.extend($.extend({result:b},(c?{lighting_color:c}:{})),d||{}))},displacementMap:function(a,b,c,d,e){return this._root._makeNode(a,'feDisplacementMap',$.extend({result:b,_in:c,in2:d},e||{}))},flood:function(a,b,x,y,c,d,e,f,g){if(arguments.length<6){e=x;f=y;g=c;x=null}var h=$.extend({result:b,flood_color:e,flood_opacity:f},(x!=null?{x:x,y:y,width:c,height:d}:{}));return this._root._makeNode(a,'feFlood',$.extend(h,g||{}))},gaussianBlur:function(a,b,c,d,e,f){if(typeof e=='object'){f=e;e=null}return this._root._makeNode(a,'feGaussianBlur',$.extend({result:b,_in:c,stdDeviation:d+(e?' '+e:'')},f||{}))},image:function(a,b,c,d){var e=this._root._makeNode(a,'feImage',$.extend({result:b},d||{}));e.setAttributeNS(svgManager._xlinkNS,'href',c);return e},merge:function(a,b,c,d){var e=this._root._makeNode(a,'feMerge',$.extend({result:b},d||{}));for(var i=0;i<c.length;i++){this._root._makeNode(e,'feMergeNode',{_in:c[i]})}return e},morphology:function(a,b,c,d,e,f,g){if(typeof f=='object'){g=f;f=null}return this._root._makeNode(a,'feMorphology',$.extend({result:b,_in:c,operator:d,radius:e+(f?' '+f:'')},g||{}))},offset:function(a,b,c,d,e,f){return this._root._makeNode(a,'feOffset',$.extend({result:b,_in:c,dx:d,dy:e},f||{}))},specularLighting:function(a,b,c,d,e,f,g){if(typeof d=='object'){g=d;d=null}if(typeof e=='object'){g=e;e=null}if(typeof f=='object'){g=f;f=null}return this._root._makeNode(a,'feSpecularLighting',$.extend({result:b,_in:c,surfaceScale:d,specularConstant:e,specularExponent:f},g||{}))},tile:function(a,b,c,x,y,d,e,f){return this._root._makeNode(a,'feTile',$.extend({result:b,_in:c,x:x,y:y,width:d,height:e},f||{}))},turbulence:function(a,b,c,d,e,f){if(typeof e=='object'){f=e;e=null}return this._root._makeNode(a,'feTurbulence',$.extend({result:b,type:c,baseFrequency:d,numOctaves:e},f||{}))}});function isArray(a){return(a.constructor&&a.constructor.toString().match(/\Array\(\)/))}})(jQuery)
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/* http://keith-wood.name/svg.html
|
|
2
|
-
SVG filters for jQuery v1.0.1.
|
|
3
|
-
Written by Keith Wood (kbwood@iprimus.com.au) August 2007.
|
|
4
|
-
Dual licensed under the GPL (http://dev.jquery.com/browser/trunk/jquery/GPL-LICENSE.txt) and
|
|
5
|
-
MIT (http://dev.jquery.com/browser/trunk/jquery/MIT-LICENSE.txt) licenses.
|
|
6
|
-
Please attribute the author if you use it. */
|
|
7
|
-
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(7($){C.2d(\'1B\',H);$.5(C.2a.N,{J:7(a,b,x,y,c,d,e){m 8.l(a,\'J\',$.5({1s:b,x:x,y:y,E:c,F:d},e||{}))}});7 H(a){8.9=a}$.5(H.N,{1d:7(a,b,c,d,e){m 8.9.l(a,\'1a\',$.5({n:b,X:c,U:d},e||{}))},T:7(a,b,x,y,z,c){m 8.9.l(a,\'29\',$.5({n:b,x:x,y:y,z:z},c||{}))},1T:7(a,b,x,y,z,c,d,e,f){q(s c==\'r\'){f=c;c=p}o g=$.5({n:b,x:x,y:y,z:z},(c!=p?{1w:c,1r:d,1p:e}:{}));m 8.9.l(a,\'1o\',$.5(g,f||{}))},1l:7(a,b,c,d,e,f){m 8.9.l(a,\'1k\',$.5({n:b,1i:c,t:d,I:e},f||{}))},1c:7(a,b,c,d,e,f){q(M(e)){o g=\'\';w(o i=0;i<e.v;i++){g+=(i==0?\'\':\' \')+e[i].D(\' \')}e=g}Z q(s e==\'r\'){f=e;e=p}o h=$.5({n:b,t:c,u:d},(e!=p?{S:e}:{}));m 8.9.l(a,\'13\',$.5(h,f||{}))},Q:7(a,b,c,d){o e=8.9.l(a,\'15\',$.5({n:b},d||{}));o f=[\'R\',\'G\',\'B\',\'A\'];w(o i=0;i<1P.1M(4,c.v);i++){o g=c[i];o h=$.5({u:g[0]},(u==\'O\'||u==\'1K\'?{O:g[1].D(\' \')}:(u==\'1J\'?{1I:g[1],1G:g[2]}:(u==\'1D\'?{1C:g[1],1A:g[2],K:g[3]}:{}))));8.9.l(e,\'1t\'+f[i],h)}m e},1q:7(a,b,c,d,e,f,g,h,i,j){q(s f==\'r\'){j=f;f=p}o k=$.5({n:b,L:c,t:d,I:e},(f!=p?{1n:f,1m:g,1u:h,1v:i}:{}));m 8.9.l(a,\'1j\',$.5(k,j||{}))},1x:7(a,b,c,d,e){o f=\'\';w(o i=0;i<d.v;i++){f+=(i==0?\'\':\' \')+d[i].D(\' \')}d=f;m 8.9.l(a,\'1y\',$.5({n:b,1z:c,1h:d},e||{}))},1g:7(a,b,c,d){q(s c==\'r\'){d=c;c=p}m 8.9.l(a,\'1f\',$.5($.5({n:b},(c?{1e:c}:{})),d||{}))},1E:7(a,b,c,d,e){m 8.9.l(a,\'1F\',$.5({n:b,t:c,I:d},e||{}))},1b:7(a,b,x,y,c,d,e,f,g){q(1H.v<6){e=x;f=y;g=c;x=p}o h=$.5({n:b,19:e,18:f},(x!=p?{x:x,y:y,E:c,F:d}:{}));m 8.9.l(a,\'1L\',$.5(h,g||{}))},17:7(a,b,c,d,e,f){q(s e==\'r\'){f=e;e=p}m 8.9.l(a,\'16\',$.5({n:b,t:c,Y:d+(e?\' \'+e:\'\')},f||{}))},1O:7(a,b,c,d){o e=8.9.l(a,\'W\',$.5({n:b},d||{}));e.V(C.1Q,\'1R\',c);m e},10:7(a,b,c,d){o e=8.9.l(a,\'1S\',$.5({n:b},d||{}));w(o i=0;i<c.v;i++){8.9.l(e,\'11\',{t:c[i]})}m e},1U:7(a,b,c,d,e,f,g){q(s f==\'r\'){g=f;f=p}m 8.9.l(a,\'12\',$.5({n:b,t:c,L:d,1W:e+(f?\' \'+f:\'\')},g||{}))},K:7(a,b,c,d,e,f){m 8.9.l(a,\'1X\',$.5({n:b,t:c,1Y:d,14:e},f||{}))},1Z:7(a,b,c,d,e,f,g){q(s d==\'r\'){g=d;d=p}q(s e==\'r\'){g=e;e=p}q(s f==\'r\'){g=f;f=p}m 8.9.l(a,\'20\',$.5({n:b,t:c,21:d,23:e,22:f},g||{}))},1V:7(a,b,c,x,y,d,e,f){m 8.9.l(a,\'24\',$.5({n:b,t:c,x:x,y:y,E:d,F:e},f||{}))},25:7(a,b,c,d,e,f){q(s e==\'r\'){f=e;e=p}m 8.9.l(a,\'26\',$.5({n:b,u:c,27:d,28:e},f||{}))}});7 M(a){m(a.P&&a.P.1N().2b(/\\2c\\(\\)/))}})(2e)',62,139,'|||||extend||function|this|_root||||||||||||_makeNode|return|result|var|null|if|object|typeof|_in|type|length|for||||||svgManager|join|width|height||SVGFilter|in2|filter|offset|operator|isArray|prototype|table|constructor|componentTransfer||values|pointLight|elevantion|setAttributeNS|feImage|azimuth|stdDeviation|else|merge|feMergeNode|feMorphology|feColorMatrix|dy|feComponentTransfer|feGaussianBlur|gaussianBlur|flood_opacity|flood_color|feDistantLight|flood|colorMatrix|distantLight|lighting_color|feDiffuseLighting|diffuseLighting|kernelMatrix|mode|feComposite|feBlend|blend|k2|k1|feSpotLight|pointsAtZ|composite|pointsAtY|id|feFunc|k3|k4|pointsAtX|convolveMatrix|feConvolveMatrix|order|exponent|filters|amplitude|gamma|displacementMap|feDisplacementMap|intercept|arguments|slope|linear|discrete|feFlood|min|toString|image|Math|_xlinkNS|href|feMerge|spotLight|morphology|tile|radius|feOffset|dx|specularLighting|feSpecularLighting|surfaceScale|specularExponent|specularConstant|feTile|turbulence|feTurbulence|baseFrequency|numOctaves|fePointLight|_rootClass|match|Array|addExtension|jQuery'.split('|'),0,{}))
|