From 7e7a3c89c8c1950e4aae652c78082b68ad569332 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Tue, 5 Nov 2019 18:19:21 +0100 Subject: [PATCH] Release 1.3.3 --- CHANGELOG.md | 12 +++++++++++- dist/justgage.js | 2 +- dist/justgage.min.js | 2 +- dist/justgage.min.js.map | 2 +- docs/justgage.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 7 files changed, 17 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e743f8..456031f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v1.3.3](https://github.com/toorshia/justgage/compare/v1.3.2...v1.3.3) + +> 5 November 2019 + +- README npm example link [`#337`](https://github.com/toorshia/justgage/pull/337) +- [fix] JustGage is not defined #338 [`90b66c6`](https://github.com/toorshia/justgage/commit/90b66c622d5c2fafbeb860118536f82578d06428) +- docs: addition of link to sample repo that demonstrates npm/browserfy setup for justgage as a package [`0a0d960`](https://github.com/toorshia/justgage/commit/0a0d960eb0af4f68c2bf97f9f9652176c711ad18) +- chore: added link url [`b0f997c`](https://github.com/toorshia/justgage/commit/b0f997c89cb95296f8fa4914953d78c3cfc6c250) + #### [v1.3.2](https://github.com/toorshia/justgage/compare/v1.3.1...v1.3.2) > 9 October 2019 @@ -11,6 +20,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - [docs] Fixed examples [`585b0ff`](https://github.com/toorshia/justgage/commit/585b0ffdcde2186b6a5ff7507fe45ca65e729e69) - [docs] Moved justgage.com in docs for github pages [`38400c3`](https://github.com/toorshia/justgage/commit/38400c3ab2cf34b2481508988f85d47d837d78a9) - [docs] Added examples list to index [`1143a1d`](https://github.com/toorshia/justgage/commit/1143a1d9031f3316bb4dea7b9f36b88bd9c19808) +- Release 1.3.2 [`04d4986`](https://github.com/toorshia/justgage/commit/04d4986cfffd65ce178883dbb684cb033fc62d4e) - [fix] Cleaner events management [`d0af184`](https://github.com/toorshia/justgage/commit/d0af184ad7c9671c9fbf5ff1b01363a0d2bf9af5) - [docs] Added example with variable min max values [`22a5915`](https://github.com/toorshia/justgage/commit/22a591564305ce8b0f11d55bb40be2a64f467663) - [refactor] Cleaner code with isUndefined function [`3ac69cf`](https://github.com/toorshia/justgage/commit/3ac69cfcd92cdc7c0f9d0229d34616d56463ae9f) @@ -18,8 +28,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - [docs] Readme links and better list of examples names [`b364a1b`](https://github.com/toorshia/justgage/commit/b364a1b5eb5f65b10c3f7e26aa5fa2715f2b7ab8) - [fix] Moved level id to bindEvent function [`0a68463`](https://github.com/toorshia/justgage/commit/0a68463a82f837ee2745c14dcf3e6331a304fcf1) - [docs] Fixed examples links and style [`878bdc4`](https://github.com/toorshia/justgage/commit/878bdc4f59b2af43f2a0ab0109017d163f2792c3) -- [fix] Bug when min is not 0 [`80960ca`](https://github.com/toorshia/justgage/commit/80960ca3614aa8e4a098aed3b478866d675ba62d) - [docs] Updated readme [`b438b11`](https://github.com/toorshia/justgage/commit/b438b11c6ea8001300780ecb31a1dceba1a26976) +- [fix] Bug when min is not 0 [`80960ca`](https://github.com/toorshia/justgage/commit/80960ca3614aa8e4a098aed3b478866d675ba62d) - [docs] Fixed typo [`1fa000f`](https://github.com/toorshia/justgage/commit/1fa000f61645478f1368ea34e3d87d809a8f826b) - [docs] Typo on readme [`9de25b6`](https://github.com/toorshia/justgage/commit/9de25b6bbe15cf08f9d4a4e42276a8a5b08fc3cb) - [docs] Fixed regex replace for examples name [`abc1d40`](https://github.com/toorshia/justgage/commit/abc1d4051286230fa81786e3d740121943d765e3) diff --git a/dist/justgage.js b/dist/justgage.js index d7f2d3b..230f637 100644 --- a/dist/justgage.js +++ b/dist/justgage.js @@ -18,7 +18,7 @@ } }(this, function (Raphael) { - JustGage = function (config) { + var JustGage = function (config) { var obj = this diff --git a/dist/justgage.min.js b/dist/justgage.min.js index 838344b..774670c 100644 --- a/dist/justgage.min.js +++ b/dist/justgage.min.js @@ -1,2 +1,2 @@ -!function(n,e){"function"==typeof define&&define.amd?define(["raphael"],function(t){return n.JustGage=e(t)}):"object"==typeof module&&module.exports?module.exports=n.JustGage=e(require("raphael")):n.JustGage=e(Raphael)}(this,function(T){function C(t,n,e,i,a){var o=i,r=!1;if(!N(t)&&(!N(e)&&"object"==typeof e&&t in e?(o=e[t],r=!0):!N(n)&&"object"==typeof n&&t in n?(o=n[t],r=!0):o=i,!0===r&&!N(a)))switch(a){case"int":o=parseInt(o,10);break;case"float":o=parseFloat(o)}return o}function N(t){return null==t}function O(t,n,e,i,a){var o,r,l,c,m,f,g,s,u,d,p,x,h,v,b=a&&a.ranges&&0=a.ranges[y].lo&&t<=a.ranges[y].hi)return a.ranges[y].color}if(1===(o=e.length))return e[0];for(r=i?1/o:1/(o-1),l=[],y=0;y"),refreshAnimationTime:C("refreshAnimationTime",t,y,700),refreshAnimationType:C("refreshAnimationType",t,y,">"),donutStartAngle:C("donutStartAngle",t,y,90),valueMinFontSize:C("valueMinFontSize",t,y,16),labelMinFontSize:C("labelMinFontSize",t,y,10),minLabelMinFontSize:C("minLabelMinFontSize",t,y,10),maxLabelMinFontSize:C("maxLabelMinFontSize",t,y,10),hideValue:C("hideValue",t,y,!1),hideMinMax:C("hideMinMax",t,y,!1),showInnerShadow:C("showInnerShadow",t,y,!1),humanFriendly:C("humanFriendly",t,y,!1),noGradient:C("noGradient",t,y,!1),donut:C("donut",t,y,!1),relativeGaugeSize:C("relativeGaugeSize",t,y,!1),counter:C("counter",t,y,!1),decimals:C("decimals",t,y,0),customSectors:C("customSectors",t,y,{}),formatNumber:C("formatNumber",t,y,!1),pointer:C("pointer",t,y,!1),pointerOptions:C("pointerOptions",t,y,{}),displayRemaining:C("displayRemaining",t,y,!1)},A.config.value>A.config.max&&(A.config.value=A.config.max),A.config.valueA.config.valueMinFontSize?a/6.5:A.config.valueMinFontSize,m=r+i/2,f=l+a/1.275,g=a/16>A.config.labelMinFontSize?a/16:A.config.labelMinFontSize,s=r+i/2,u=f+c/2+5,d=a/16>A.config.minLabelMinFontSize?a/16:A.config.minLabelMinFontSize,p=r+i/10+i/6.666666666666667*A.config.gaugeWidthScale/2,x=u,a/16>A.config.maxLabelMinFontSize?a/16:A.config.maxLabelMinFontSize),r+i-i/10-i/6.666666666666667*A.config.gaugeWidthScale/2),u),A.params={canvasW:n,canvasH:e,widgetW:i,widgetH:a,dx:r,dy:l,valueFontSize:c,valueX:m,valueY:f,labelFontSize:g,labelX:s,labelY:u,minFontSize:d,minX:p,minY:x,maxFontSize:h,maxX:v,maxY:b},b=null,A.canvas.customAttributes.pki=function(t,n,e,i,a,o,r,l,c,m){var f,g,s,u,d,p;return n<0&&(e-=n,t-=n,n=0),c?(f=(1-2*(t-n)/(e-n))*Math.PI,p="M"+((u=i/2+o)-(s=(g=i/2-i/30)-i/6.666666666666667*l))+","+(d=a/2+r)+" ",p+="L"+(u-g)+","+d+" ",(e-n)/21*r.config.max&&(t=1*r.config.max),1*t<1*r.config.min&&(t=1*r.config.min),o=O(t,(t-r.config.min)/(r.config.max-r.config.min),r.config.levelColors,r.config.noGradient,r.config.customSectors),a=r.config.textRenderer?r.config.textRenderer(a):r.config.humanFriendly?W(a,r.config.humanFriendlyDecimal)+r.config.symbol:r.config.formatNumber?L((1*a).toFixed(r.config.decimals))+r.config.symbol:r.config.displayRemaining?(1*(r.config.max-a)).toFixed(r.config.decimals)+r.config.symbol:(1*a).toFixed(r.config.decimals)+r.config.symbol,r.originalValue=a,r.config.value=1*t,r.config.counter||(r.txtValue.attr({text:a}),E(r.txtValue,r.params.valueFontSize,r.params.valueY));var l=r.config.value;r.config.reverse&&(l=1*r.config.max+1*r.config.min-1*r.config.value),r.level.animate({pki:[l,r.config.min,r.config.max,r.params.widgetW,r.params.widgetH,r.params.dx,r.params.dy,r.config.gaugeWidthScale,r.config.donut,r.config.reverse],fill:o},r.config.refreshAnimationTime,r.config.refreshAnimationType,r.config.onAnimationEnd),r.config.pointer&&r.needle.animate({ndl:[l,r.config.min,r.config.max,r.params.widgetW,r.params.widgetH,r.params.dx,r.params.dy,r.config.gaugeWidthScale,r.config.donut]},r.config.refreshAnimationTime,r.config.refreshAnimationType),e=null},JustGage.prototype.destroy=function(){for(var t in this.node&&this.node.parentNode&&(this.node.innerHTML=""),this.events)T.eve.off(t,this.events[t]);this.events={}},JustGage.prototype.generateShadow=function(t,n){var e,i,a,o,r,l,c,m=this,f="inner-shadow-"+m.config.id;(e=document.createElementNS(t,"filter")).setAttribute("id",f),n.appendChild(e),(i=document.createElementNS(t,"feOffset")).setAttribute("dx",0),i.setAttribute("dy",m.config.shadowVerticalOffset),e.appendChild(i),(a=document.createElementNS(t,"feGaussianBlur")).setAttribute("result","offset-blur"),a.setAttribute("stdDeviation",m.config.shadowSize),e.appendChild(a),(o=document.createElementNS(t,"feComposite")).setAttribute("operator","out"),o.setAttribute("in","SourceGraphic"),o.setAttribute("in2","offset-blur"),o.setAttribute("result","inverse"),e.appendChild(o),(r=document.createElementNS(t,"feFlood")).setAttribute("flood-color","black"),r.setAttribute("flood-opacity",m.config.shadowOpacity),r.setAttribute("result","color"),e.appendChild(r),(l=document.createElementNS(t,"feComposite")).setAttribute("operator","in"),l.setAttribute("in","color"),l.setAttribute("in2","inverse"),l.setAttribute("result","shadow"),e.appendChild(l),(c=document.createElementNS(t,"feComposite")).setAttribute("operator","over"),c.setAttribute("in","shadow"),c.setAttribute("in2","SourceGraphic"),e.appendChild(c),m.config.showInnerShadow&&(m.canvas.canvas.childNodes[2].setAttribute("filter","url("+window.location.pathname+"#"+f+")"),m.canvas.canvas.childNodes[3].setAttribute("filter","url("+window.location.pathname+"#"+f+")")),c=null};var k=function(){for(var t=3,n=document.createElement("div"),e=n.getElementsByTagName("i");n.innerHTML="\x3c!--[if gt IE "+ ++t+"]>"),refreshAnimationTime:C("refreshAnimationTime",t,y,700),refreshAnimationType:C("refreshAnimationType",t,y,">"),donutStartAngle:C("donutStartAngle",t,y,90),valueMinFontSize:C("valueMinFontSize",t,y,16),labelMinFontSize:C("labelMinFontSize",t,y,10),minLabelMinFontSize:C("minLabelMinFontSize",t,y,10),maxLabelMinFontSize:C("maxLabelMinFontSize",t,y,10),hideValue:C("hideValue",t,y,!1),hideMinMax:C("hideMinMax",t,y,!1),showInnerShadow:C("showInnerShadow",t,y,!1),humanFriendly:C("humanFriendly",t,y,!1),noGradient:C("noGradient",t,y,!1),donut:C("donut",t,y,!1),relativeGaugeSize:C("relativeGaugeSize",t,y,!1),counter:C("counter",t,y,!1),decimals:C("decimals",t,y,0),customSectors:C("customSectors",t,y,{}),formatNumber:C("formatNumber",t,y,!1),pointer:C("pointer",t,y,!1),pointerOptions:C("pointerOptions",t,y,{}),displayRemaining:C("displayRemaining",t,y,!1)},A.config.value>A.config.max&&(A.config.value=A.config.max),A.config.valueA.config.valueMinFontSize?a/6.5:A.config.valueMinFontSize,m=r+e/2,f=l+a/1.275,g=a/16>A.config.labelMinFontSize?a/16:A.config.labelMinFontSize,s=r+e/2,u=f+c/2+5,d=a/16>A.config.minLabelMinFontSize?a/16:A.config.minLabelMinFontSize,p=r+e/10+e/6.666666666666667*A.config.gaugeWidthScale/2,x=u,a/16>A.config.maxLabelMinFontSize?a/16:A.config.maxLabelMinFontSize),r+e-e/10-e/6.666666666666667*A.config.gaugeWidthScale/2),u),A.params={canvasW:n,canvasH:i,widgetW:e,widgetH:a,dx:r,dy:l,valueFontSize:c,valueX:m,valueY:f,labelFontSize:g,labelX:s,labelY:u,minFontSize:d,minX:p,minY:x,maxFontSize:h,maxX:v,maxY:b},b=null,A.canvas.customAttributes.pki=function(t,n,i,e,a,o,r,l,c,m){var f,g,s,u,d,p;return n<0&&(i-=n,t-=n,n=0),c?(f=(1-2*(t-n)/(i-n))*Math.PI,p="M"+((u=e/2+o)-(s=(g=e/2-e/30)-e/6.666666666666667*l))+","+(d=a/2+r)+" ",p+="L"+(u-g)+","+d+" ",(i-n)/2=a.ranges[y].lo&&t<=a.ranges[y].hi)return a.ranges[y].color}if(1===(o=i.length))return i[0];for(r=e?1/o:1/(o-1),l=[],y=0;y1*r.config.max&&(t=1*r.config.max),1*t<1*r.config.min&&(t=1*r.config.min),o=O(t,(t-r.config.min)/(r.config.max-r.config.min),r.config.levelColors,r.config.noGradient,r.config.customSectors),a=r.config.textRenderer?r.config.textRenderer(a):r.config.humanFriendly?W(a,r.config.humanFriendlyDecimal)+r.config.symbol:r.config.formatNumber?L((1*a).toFixed(r.config.decimals))+r.config.symbol:r.config.displayRemaining?(1*(r.config.max-a)).toFixed(r.config.decimals)+r.config.symbol:(1*a).toFixed(r.config.decimals)+r.config.symbol,r.originalValue=a,r.config.value=1*t,r.config.counter||(r.txtValue.attr({text:a}),E(r.txtValue,r.params.valueFontSize,r.params.valueY));var l=r.config.value;r.config.reverse&&(l=1*r.config.max+1*r.config.min-1*r.config.value),r.level.animate({pki:[l,r.config.min,r.config.max,r.params.widgetW,r.params.widgetH,r.params.dx,r.params.dy,r.config.gaugeWidthScale,r.config.donut,r.config.reverse],fill:o},r.config.refreshAnimationTime,r.config.refreshAnimationType,r.config.onAnimationEnd),r.config.pointer&&r.needle.animate({ndl:[l,r.config.min,r.config.max,r.params.widgetW,r.params.widgetH,r.params.dx,r.params.dy,r.config.gaugeWidthScale,r.config.donut]},r.config.refreshAnimationTime,r.config.refreshAnimationType),i=null},t.prototype.destroy=function(){for(var t in this.node&&this.node.parentNode&&(this.node.innerHTML=""),this.events)T.eve.off(t,this.events[t]);this.events={}},t.prototype.generateShadow=function(t,n){var i,e,a,o,r,l,c,m=this,f="inner-shadow-"+m.config.id;(i=document.createElementNS(t,"filter")).setAttribute("id",f),n.appendChild(i),(e=document.createElementNS(t,"feOffset")).setAttribute("dx",0),e.setAttribute("dy",m.config.shadowVerticalOffset),i.appendChild(e),(a=document.createElementNS(t,"feGaussianBlur")).setAttribute("result","offset-blur"),a.setAttribute("stdDeviation",m.config.shadowSize),i.appendChild(a),(o=document.createElementNS(t,"feComposite")).setAttribute("operator","out"),o.setAttribute("in","SourceGraphic"),o.setAttribute("in2","offset-blur"),o.setAttribute("result","inverse"),i.appendChild(o),(r=document.createElementNS(t,"feFlood")).setAttribute("flood-color","black"),r.setAttribute("flood-opacity",m.config.shadowOpacity),r.setAttribute("result","color"),i.appendChild(r),(l=document.createElementNS(t,"feComposite")).setAttribute("operator","in"),l.setAttribute("in","color"),l.setAttribute("in2","inverse"),l.setAttribute("result","shadow"),i.appendChild(l),(c=document.createElementNS(t,"feComposite")).setAttribute("operator","over"),c.setAttribute("in","shadow"),c.setAttribute("in2","SourceGraphic"),i.appendChild(c),m.config.showInnerShadow&&(m.canvas.canvas.childNodes[2].setAttribute("filter","url("+window.location.pathname+"#"+f+")"),m.canvas.canvas.childNodes[3].setAttribute("filter","url("+window.location.pathname+"#"+f+")")),c=null};var k=function(){for(var t=3,n=document.createElement("div"),i=n.getElementsByTagName("i");n.innerHTML="\x3c!--[if gt IE "+ ++t+"]>