Skip to content

Commit efe8533

Browse files
committed
Release 1.5.1
1 parent ec9b25b commit efe8533

File tree

7 files changed

+65
-20
lines changed

7 files changed

+65
-20
lines changed

CHANGELOG.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@ All notable changes to this project will be documented in this file. Dates are d
44

55
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

7+
#### [v1.5.1](https://github.com/toorshia/justgage/compare/v1.5.0...v1.5.1)
8+
9+
- fix: dtyle conflict with multiple gauges created using the "parentNode" method [`#367`](https://github.com/toorshia/justgage/pull/367)
10+
- chore: bump path-parse from 1.0.6 to 1.0.7 [`#366`](https://github.com/toorshia/justgage/pull/366)
11+
- chore: add release-it [`a7f66e6`](https://github.com/toorshia/justgage/commit/a7f66e671597fd18e9b6aa1815da027555cdf004)
12+
- chore: add auto-changelog and fix audit [`ec9b25b`](https://github.com/toorshia/justgage/commit/ec9b25b798e91222374968145b161185252880af)
13+
714
#### [v1.5.0](https://github.com/toorshia/justgage/compare/v1.4.3...v1.5.0)
815

916
> 11 June 2021
1017
1118
- chore: setup eslint with workflow [`#364`](https://github.com/toorshia/justgage/pull/364)
19+
- Release 1.5.0 [`f55d4b7`](https://github.com/toorshia/justgage/commit/f55d4b710f101ad272fea7c2485e62449bdc7948)
1220

1321
#### [v1.4.3](https://github.com/toorshia/justgage/compare/v1.4.2...v1.4.3)
1422

@@ -124,6 +132,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
124132
- [feat] Support for label in refresh method [`3eea1ac`](https://github.com/toorshia/justgage/commit/3eea1acfa767ab27441e94553579a7efa457a7eb)
125133
- [fix] Memory leak: Unbind events on destroy #296 [`e4993c0`](https://github.com/toorshia/justgage/commit/e4993c0f1b9182cb9f3b994db7df95df6947b9a7)
126134
- [feat] Refresh with min value support (back compatible fix) [`b51840c`](https://github.com/toorshia/justgage/commit/b51840c507e155d3982aa0a17b5b8e02b5687145)
135+
- Fixed refresh and other locations for displayRemaining [`e78d035`](https://github.com/toorshia/justgage/commit/e78d035ee46f5a7077cb240666b23437ce577569)
136+
- 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)
127137
- [refactor] Comments [`ca519ed`](https://github.com/toorshia/justgage/commit/ca519ed2461c9cce95b44b5917921dcb5e8f327d)
128138
- [fix] Eve not defined [`81cff4c`](https://github.com/toorshia/justgage/commit/81cff4cd1ef3a57df5575421730b67a2aa3207de)
129139
- [fix] Removed const [`2d1773a`](https://github.com/toorshia/justgage/commit/2d1773a92b508773bc5557fff78350a3fea9c3fe)
@@ -140,7 +150,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
140150
- [docs] Options [`c514faf`](https://github.com/toorshia/justgage/commit/c514faf80b2928654b65cfb37f82e018b446e716)
141151
- [build] Added gitignore and npmignore files [`c770b15`](https://github.com/toorshia/justgage/commit/c770b15af3305974661ea509eda6b8638eb6645a)
142152
- [docs] Updated readme [`b17651d`](https://github.com/toorshia/justgage/commit/b17651d8bb3670fe5c3c2362ba6372b3795cc4d4)
143-
- Update .refresh() to support min value [`29ab14f`](https://github.com/toorshia/justgage/commit/29ab14f0eb57037ce38ea9a160c49ebd44babbc0)
144153
- [docs] Fixed readme [`8c29fe9`](https://github.com/toorshia/justgage/commit/8c29fe9e3ac6e4e39d73693de42b1b70d8a99364)
145154
- Release 1.3.0 [`0b920d4`](https://github.com/toorshia/justgage/commit/0b920d40a1b15a34a9700ac83eafc7a86b101a08)
146155
- Round Human friendly numbers less than 1000 [`83c8a93`](https://github.com/toorshia/justgage/commit/83c8a93dc080bc82fc25a664374ba457ff1dcf45)
@@ -151,8 +160,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
151160
- justgauge.js now imports raphael and exports itself as a module [`9455c88`](https://github.com/toorshia/justgage/commit/9455c88b5d103609b035c0035fee2b6452adb21b)
152161
- [docs] Added GIF screenshot [`35b69ad`](https://github.com/toorshia/justgage/commit/35b69ad50a89d3c47ec1a0bb98cb95e977a18eb4)
153162
- Refactor and fix displayed value [`e236faa`](https://github.com/toorshia/justgage/commit/e236faaeba4d218c7d35254e4a82ad021d352759)
154-
- Fixed refresh and other locations for displayRemaining [`e78d035`](https://github.com/toorshia/justgage/commit/e78d035ee46f5a7077cb240666b23437ce577569)
155-
- 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)
156163
- export removed because it's now in index.js [`cb63f3f`](https://github.com/toorshia/justgage/commit/cb63f3f797ad243567e26d8562ec48b27ef7df7b)
157164
- Fix make function work with negative numbers too [`66c48c5`](https://github.com/toorshia/justgage/commit/66c48c5b1e058bee73dd82095a9caa8b41935e9b)
158165
- Fix issue with negative bounds [`f7f1071`](https://github.com/toorshia/justgage/commit/f7f10719c36393937be1cc650d3b94d8fa82af4c)
@@ -175,7 +182,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
175182

176183
#### [1.2.8](https://github.com/toorshia/justgage/compare/1.2.7...1.2.8)
177184

178-
> 25 September 2016
185+
> 26 September 2016
179186
180187
- Update README.md [`88325ab`](https://github.com/toorshia/justgage/commit/88325ab1755305d07d55677e65b469a854387c65)
181188

@@ -197,17 +204,19 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
197204

198205
#### [1.2.5](https://github.com/toorshia/justgage/compare/1.2.4...1.2.5)
199206

200-
> 22 September 2016
207+
> 23 September 2016
201208
202209
- https://github.com/toorshia/justgage/issues/245 [`87faeab`](https://github.com/toorshia/justgage/commit/87faeabae66aaa631de429b9a8db594e38deccb6)
203210

204211
#### [1.2.4](https://github.com/toorshia/justgage/compare/1.2.3...1.2.4)
205212

206-
> 22 September 2016
213+
> 23 September 2016
207214
208215
- Added prototype.destroy() [`b1b6f47`](https://github.com/toorshia/justgage/commit/b1b6f4700731c7cecef0a22ba7aec4e5bb287887)
216+
- filename change [`af9cc99`](https://github.com/toorshia/justgage/commit/af9cc990a7ba07940f3f94021b66c87959fc7da2)
209217
- Update README.md [`acb345a`](https://github.com/toorshia/justgage/commit/acb345a2eff7be5eb16d06294b1b425ff5958314)
210218
- Update README.md [`94ffb99`](https://github.com/toorshia/justgage/commit/94ffb992ab409b9f08a7bbdcb587b0e0b05fd8a1)
219+
- adding sample for object refresh [`7f6b250`](https://github.com/toorshia/justgage/commit/7f6b250481da4e5b18f0a02d797ac5bd82114f22)
211220

212221
#### [1.2.3](https://github.com/toorshia/justgage/compare/1.2.2...1.2.3)
213222

@@ -218,7 +227,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
218227
- #206 - maxTxt is used for both min and max when reverse is true [`#208`](https://github.com/toorshia/justgage/pull/208)
219228
- fix #194 [`#194`](https://github.com/toorshia/justgage/issues/194)
220229
- added onAnimationEnd event hook [`0bca41e`](https://github.com/toorshia/justgage/commit/0bca41e40931b979e3a80cbe4da80ac2b2c8d428)
221-
- filename change [`af9cc99`](https://github.com/toorshia/justgage/commit/af9cc990a7ba07940f3f94021b66c87959fc7da2)
222230
- Set min and max text [`73cbf1e`](https://github.com/toorshia/justgage/commit/73cbf1ec663a8e01cc2e04e6c10328ddb97f57e6)
223231
- minTxt & maxTxt params [`c0a34ec`](https://github.com/toorshia/justgage/commit/c0a34ec105dc1a092af30a5c599e8978a2c15233)
224232
- Fix param name [`d1bc47d`](https://github.com/toorshia/justgage/commit/d1bc47d6d3deef4dda8217c853473496e06897e4)
@@ -228,7 +236,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
228236
- Update README.md [`8bf0c21`](https://github.com/toorshia/justgage/commit/8bf0c216f614c705de72045cb69fb4e8b3633bf4)
229237
- Update README.md [`b0fc8e4`](https://github.com/toorshia/justgage/commit/b0fc8e427c95b3416e793dadb64723d9f3bbcbc2)
230238
- #193 [`5bffb51`](https://github.com/toorshia/justgage/commit/5bffb517255c12149e16b4a93cce0a47b106bfbb)
231-
- adding sample for object refresh [`7f6b250`](https://github.com/toorshia/justgage/commit/7f6b250481da4e5b18f0a02d797ac5bd82114f22)
232239

233240
#### [1.2.2](https://github.com/toorshia/justgage/compare/v1.2.1...1.2.2)
234241

@@ -245,6 +252,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
245252
> 5 January 2016
246253
247254
- added donut pointer feature [`30b92b8`](https://github.com/toorshia/justgage/commit/30b92b8cb68c24360774f0cad1ceaa6b7a9f81f0)
255+
- ... [`d859734`](https://github.com/toorshia/justgage/commit/d859734e5e3f7237d99d4e2009cb8e4727ad43ae)
248256

249257
#### [v1.2.0](https://github.com/toorshia/justgage/compare/v1.1.0...v1.2.0)
250258

@@ -263,7 +271,6 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
263271
- added license file [`c27622c`](https://github.com/toorshia/justgage/commit/c27622c9cbb22c12f92cd2e2439329a274ef7239)
264272
- minor examples fixes [`6c4c267`](https://github.com/toorshia/justgage/commit/6c4c2673629cfb3a33aeb6e6d9dda71974dc946c)
265273
- Update README.md [`ea6f003`](https://github.com/toorshia/justgage/commit/ea6f003767d3f5e158f4fdb7dd53e7be76dffe41)
266-
- ... [`d859734`](https://github.com/toorshia/justgage/commit/d859734e5e3f7237d99d4e2009cb8e4727ad43ae)
267274
- nothing important :) [`bebb787`](https://github.com/toorshia/justgage/commit/bebb787c9fb1bfa7aefb5b85936c569d8c89204b)
268275
- defaults feature [`d0e055e`](https://github.com/toorshia/justgage/commit/d0e055e9511ec5d9933ecc492ef506459518c347)
269276
- testing decimals [`b6b3554`](https://github.com/toorshia/justgage/commit/b6b355450876c25b040aa357c4c9b7ef437e538e)

dist/justgage.js

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
// this is container element id
6262
id: config.id,
6363

64+
// classId : string
65+
// this is the class id utilize when generating styles
66+
classId: uuid(),
67+
6468
// value : float
6569
// value gauge is showing
6670
value: kvLookup("value", config, dataset, 0, "float"),
@@ -1259,7 +1263,7 @@
12591263
*/
12601264
JustGage.prototype.generateShadow = function (svg, defs) {
12611265
const obj = this;
1262-
const sid = "inner-shadow-" + obj.config.id;
1266+
const sid = "inner-shadow-" + (obj.config.id || obj.config.classId);
12631267

12641268
// FILTER
12651269
const gaussFilter = document.createElementNS(svg, "filter");
@@ -1312,11 +1316,11 @@
13121316
if (obj.config.showInnerShadow) {
13131317
obj.canvas.canvas.childNodes[2].setAttribute(
13141318
"filter",
1315-
"url(" + window.location.pathname + "#" + sid + ")"
1319+
"url(#" + sid + ")"
13161320
);
13171321
obj.canvas.canvas.childNodes[3].setAttribute(
13181322
"filter",
1319-
"url(" + window.location.pathname + "#" + sid + ")"
1323+
"url(#" + sid + ")"
13201324
);
13211325
}
13221326
};
@@ -1573,5 +1577,20 @@
15731577
return n !== null && n !== undefined && !isNaN(n);
15741578
}
15751579

1580+
/**
1581+
* Generate UUID
1582+
* @returns UUID
1583+
*/
1584+
function uuid() {
1585+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
1586+
/[xy]/g,
1587+
function (c) {
1588+
const r = (Math.random() * 16) | 0;
1589+
const v = c === "x" ? r : (r & 0x3) | 0x8;
1590+
return v.toString(16);
1591+
}
1592+
);
1593+
}
1594+
15761595
return JustGage;
15771596
});

dist/justgage.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/justgage.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/justgage.js

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@
6161
// this is container element id
6262
id: config.id,
6363

64+
// classId : string
65+
// this is the class id utilize when generating styles
66+
classId: uuid(),
67+
6468
// value : float
6569
// value gauge is showing
6670
value: kvLookup("value", config, dataset, 0, "float"),
@@ -1259,7 +1263,7 @@
12591263
*/
12601264
JustGage.prototype.generateShadow = function (svg, defs) {
12611265
const obj = this;
1262-
const sid = "inner-shadow-" + obj.config.id;
1266+
const sid = "inner-shadow-" + (obj.config.id || obj.config.classId);
12631267

12641268
// FILTER
12651269
const gaussFilter = document.createElementNS(svg, "filter");
@@ -1312,11 +1316,11 @@
13121316
if (obj.config.showInnerShadow) {
13131317
obj.canvas.canvas.childNodes[2].setAttribute(
13141318
"filter",
1315-
"url(" + window.location.pathname + "#" + sid + ")"
1319+
"url(#" + sid + ")"
13161320
);
13171321
obj.canvas.canvas.childNodes[3].setAttribute(
13181322
"filter",
1319-
"url(" + window.location.pathname + "#" + sid + ")"
1323+
"url(#" + sid + ")"
13201324
);
13211325
}
13221326
};
@@ -1573,5 +1577,20 @@
15731577
return n !== null && n !== undefined && !isNaN(n);
15741578
}
15751579

1580+
/**
1581+
* Generate UUID
1582+
* @returns UUID
1583+
*/
1584+
function uuid() {
1585+
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(
1586+
/[xy]/g,
1587+
function (c) {
1588+
const r = (Math.random() * 16) | 0;
1589+
const v = c === "x" ? r : (r & 0x3) | 0x8;
1590+
return v.toString(16);
1591+
}
1592+
);
1593+
}
1594+
15761595
return JustGage;
15771596
});

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "justgage",
3-
"version": "1.5.0",
3+
"version": "1.5.1",
44
"description": "JustGage is a handy JavaScript plugin for generating and animating nice & clean gauges. It is based on Raphaël library for vector drawing, so it’s completely resolution independent and self-adjusting.",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)