Skip to content

Commit

Permalink
Release 1.3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Aug 6, 2019
1 parent 2d1773a commit d3615af
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 15 deletions.
38 changes: 32 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@ 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.1](https://github.com/toorshia/justgage/compare/v1.3.0...v1.3.1)

> 6 August 2019
- add displayRemaining property [`#275`](https://github.com/toorshia/justgage/pull/275)
- Update .refresh() to support min value [`#265`](https://github.com/toorshia/justgage/pull/265)
- [feat] Made JustGage AMD andCommonJS friendly [`8815ad8`](https://github.com/toorshia/justgage/commit/8815ad8af76fae52979b6ed8976d3cfe123c359b)
- [build] Dist files and updated release script [`4b235eb`](https://github.com/toorshia/justgage/commit/4b235ebc0849072abec169ca75d2f7b6e018ff56)
- [docs] Display remaining example and docs [`5af3d23`](https://github.com/toorshia/justgage/commit/5af3d239945209fb50a683d19bb9fe241524a11b)
- [fix] Reverse example customSectors [`350a7db`](https://github.com/toorshia/justgage/commit/350a7db1b72ab1a16ded0a83558317e2029cc9de)
- [feat] Raphael 2.2.8 [`5debfd6`](https://github.com/toorshia/justgage/commit/5debfd6fe975ab78779bef0ce12671e9da88fc78)
- [fix] Destroy event and example [`15f3c26`](https://github.com/toorshia/justgage/commit/15f3c269dd525cbd96c4a9a924df5e5bb6a6e7c5)
- [feat] Gruntfile for dist [`b6cd2cb`](https://github.com/toorshia/justgage/commit/b6cd2cb74afb2ee39efb762795bb7769a0c5080b)
- [docs] Methods section [`d6d28cf`](https://github.com/toorshia/justgage/commit/d6d28cf4294e0b62fbe87e5becca81433f8ba459)
- [feat] Support for label in refresh method [`3eea1ac`](https://github.com/toorshia/justgage/commit/3eea1acfa767ab27441e94553579a7efa457a7eb)
- [fix] Memory leak: Unbind events on destroy #296 [`e4993c0`](https://github.com/toorshia/justgage/commit/e4993c0f1b9182cb9f3b994db7df95df6947b9a7)
- [feat] Refresh with min value support (back compatible fix) [`b51840c`](https://github.com/toorshia/justgage/commit/b51840c507e155d3982aa0a17b5b8e02b5687145)
- [refactor] Comments [`ca519ed`](https://github.com/toorshia/justgage/commit/ca519ed2461c9cce95b44b5917921dcb5e8f327d)
- [fix] Eve not defined [`81cff4c`](https://github.com/toorshia/justgage/commit/81cff4cd1ef3a57df5575421730b67a2aa3207de)
- [docs] Added label to refresh [`7d21cb9`](https://github.com/toorshia/justgage/commit/7d21cb9b80d60c93210e8ff5e8465cedbc7aabe2)
- [fix] Removed const [`2d1773a`](https://github.com/toorshia/justgage/commit/2d1773a92b508773bc5557fff78350a3fea9c3fe)

#### [v1.3.0](https://github.com/toorshia/justgage/compare/1.2.9...v1.3.0)

> 5 August 2019
Expand All @@ -15,26 +37,30 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
- [docs] Options [`c514faf`](https://github.com/toorshia/justgage/commit/c514faf80b2928654b65cfb37f82e018b446e716)
- [build] Added gitignore and npmignore files [`c770b15`](https://github.com/toorshia/justgage/commit/c770b15af3305974661ea509eda6b8638eb6645a)
- [docs] Updated readme [`b17651d`](https://github.com/toorshia/justgage/commit/b17651d8bb3670fe5c3c2362ba6372b3795cc4d4)
- Update .refresh() to support min value [`29ab14f`](https://github.com/toorshia/justgage/commit/29ab14f0eb57037ce38ea9a160c49ebd44babbc0)
- [docs] Fixed readme [`8c29fe9`](https://github.com/toorshia/justgage/commit/8c29fe9e3ac6e4e39d73693de42b1b70d8a99364)
- Release 1.3.0 [`0b920d4`](https://github.com/toorshia/justgage/commit/0b920d40a1b15a34a9700ac83eafc7a86b101a08)
- Round Human friendly numbers less than 1000 [`83c8a93`](https://github.com/toorshia/justgage/commit/83c8a93dc080bc82fc25a664374ba457ff1dcf45)
- [build] Added changelog and release scripts [`afee0b8`](https://github.com/toorshia/justgage/commit/afee0b8d2ee95f9236a5cfeb0f4a3df3118179b6)
- removed silly typho [`a1674e3`](https://github.com/toorshia/justgage/commit/a1674e3a2c63d710d9367ff4afa7c80fea80fdae)
- actually I needed those exports [`1cf2444`](https://github.com/toorshia/justgage/commit/1cf2444ab38988720f885d35b57795d1fc1d8d38)
- justgauge.js now imports raphael and exports itself as a module [`9455c88`](https://github.com/toorshia/justgage/commit/9455c88b5d103609b035c0035fee2b6452adb21b)
- Fix custom sectors colors [`10dc1f9`](https://github.com/toorshia/justgage/commit/10dc1f93883e0024f8f6d495b53886f3fb4f517b)
- actually I needed those exports [`1cf2444`](https://github.com/toorshia/justgage/commit/1cf2444ab38988720f885d35b57795d1fc1d8d38)
- [docs] Added GIF screenshot [`35b69ad`](https://github.com/toorshia/justgage/commit/35b69ad50a89d3c47ec1a0bb98cb95e977a18eb4)
- Refactor and fix displayed value [`e236faa`](https://github.com/toorshia/justgage/commit/e236faaeba4d218c7d35254e4a82ad021d352759)
- Fixed refresh and other locations for displayRemaining [`e78d035`](https://github.com/toorshia/justgage/commit/e78d035ee46f5a7077cb240666b23437ce577569)
- Added a displayRemaining property which will show the difference between value and max (useful if you're more interested in how much is left, rather than how much has been used. [`904654b`](https://github.com/toorshia/justgage/commit/904654bb1635a434e37da423885e9258d69d24be)
- export removed because it's now in index.js [`cb63f3f`](https://github.com/toorshia/justgage/commit/cb63f3f797ad243567e26d8562ec48b27ef7df7b)
- Fix make function work with negative numbers too [`66c48c5`](https://github.com/toorshia/justgage/commit/66c48c5b1e058bee73dd82095a9caa8b41935e9b)
- Fix issue with negative bounds [`f7f1071`](https://github.com/toorshia/justgage/commit/f7f10719c36393937be1cc650d3b94d8fa82af4c)
- added raphael as a dependency in package.json [`a702f09`](https://github.com/toorshia/justgage/commit/a702f0941fe35cf35c775b073fa6ad987219bc28)
- index.js to standarize commonjs module [`5ab4013`](https://github.com/toorshia/justgage/commit/5ab4013584c1447dc1c326df1802df58f8cfbce8)
- [fix] Default pointerOptions value [`eae6844`](https://github.com/toorshia/justgage/commit/eae684440cae2375f207b1691224bfeebe11a7d3)
- fixed route [`7231c75`](https://github.com/toorshia/justgage/commit/7231c7517309334d71f2ac635a103f53a5e76f23)
- main: now references index.js [`d062a85`](https://github.com/toorshia/justgage/commit/d062a85b518aa4f1fa7bbe4be726ae12647db552)
- added raphael as a dependency in package.json [`a702f09`](https://github.com/toorshia/justgage/commit/a702f0941fe35cf35c775b073fa6ad987219bc28)
- [chore] Enabled npm publish on release-it [`ec2853f`](https://github.com/toorshia/justgage/commit/ec2853fd506cf9062a3d039223f7cd44dd5a15c5)
- [build] Fixed version in package.json [`f6b03b5`](https://github.com/toorshia/justgage/commit/f6b03b58631382a0cb47f7e8561ff86580c227e3)
- [build] Fix raphael dependencies [`f71c4a2`](https://github.com/toorshia/justgage/commit/f71c4a2045851ad7db259f793b1c8454e796839c)
- [chore] Enabled npm publish on release-it [`ec2853f`](https://github.com/toorshia/justgage/commit/ec2853fd506cf9062a3d039223f7cd44dd5a15c5)
- fixed route [`7231c75`](https://github.com/toorshia/justgage/commit/7231c7517309334d71f2ac635a103f53a5e76f23)
- main: now references index.js [`d062a85`](https://github.com/toorshia/justgage/commit/d062a85b518aa4f1fa7bbe4be726ae12647db552)
- [fix] Default pointerOptions value [`eae6844`](https://github.com/toorshia/justgage/commit/eae684440cae2375f207b1691224bfeebe11a7d3)
- [build] Ignore changelog old in npm release [`498d4af`](https://github.com/toorshia/justgage/commit/498d4afd563692c8a6b6aef7ab57c83470d4a207)

#### [1.2.9](https://github.com/toorshia/justgage/compare/1.2.8...1.2.9)
Expand Down
22 changes: 18 additions & 4 deletions dist/justgage.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@

JustGage = function (config) {

var obj = this;
var obj = this

obj.events = {}

// Helps in case developer wants to debug it. unobtrusive
if (config === null || config === undefined) {
Expand Down Expand Up @@ -734,7 +736,10 @@

if (obj.config.counter === true) {
//on each animation frame
eve.on("raphael.anim.frame." + (obj.level.id), function () {
Raphael.eve.on("raphael.anim.frame." + (obj.level.id), function () {

if(!obj.events["raphael.anim.frame." + (obj.level.id)]) obj.events["raphael.anim.frame." + (obj.level.id)] = this

var currentValue = obj.level.attr("pki")[0];
if (obj.config.reverse) {
currentValue = (obj.config.max * 1) + (obj.config.min * 1) - (obj.level.attr("pki")[0] * 1);
Expand All @@ -754,15 +759,21 @@
currentValue = null;
});
//on animation end
eve.on("raphael.anim.finish." + (obj.level.id), function () {
Raphael.eve.on("raphael.anim.finish." + (obj.level.id), function () {

if(!obj.events["raphael.anim.finish." + (obj.level.id)]) obj.events["raphael.anim.finish." + (obj.level.id)] = this

obj.txtValue.attr({
"text": obj.originalValue
});
setDy(obj.txtValue, obj.params.valueFontSize, obj.params.valueY);
});
} else {
//on animation start
eve.on("raphael.anim.start." + (obj.level.id), function () {
Raphael.eve.on("raphael.anim.start." + (obj.level.id), function () {

if(!obj.events["raphael.anim.start." + (obj.level.id)]) obj.events["raphael.anim.start." + (obj.level.id)] = this

obj.txtValue.attr({
"text": obj.originalValue
});
Expand Down Expand Up @@ -961,6 +972,9 @@
/** Destroy gauge object */
JustGage.prototype.destroy = function () {
if (this.node && this.node.parentNode) this.node.innerHTML = ''

for(var event in this.events)
Raphael.eve.off(event, this.events[event])
};

/** Generate shadow */
Expand Down
Loading

0 comments on commit d3615af

Please sign in to comment.