Skip to content

Commit

Permalink
Release 1.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Feb 15, 2021
1 parent 869d3b4 commit 57b1ad4
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 14 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,21 @@ 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.4.2](https://github.com/toorshia/justgage/compare/v1.4.1...v1.4.2)

> 15 February 2021
- fix: refresh with min/max 0 [`#360`](https://github.com/toorshia/justgage/pull/360)
- fix: refresh with min/max 0 (#360) [`#359`](https://github.com/toorshia/justgage/issues/359)

#### [v1.4.1](https://github.com/toorshia/justgage/compare/v1.4.0...v1.4.1)

> 10 February 2021
- feat: labelFontFamily [`#358`](https://github.com/toorshia/justgage/pull/358)
- chore: bump ini from 1.3.5 to 1.3.7 [`#357`](https://github.com/toorshia/justgage/pull/357)
- chore: bump lodash from 4.17.15 to 4.17.19 [`#353`](https://github.com/toorshia/justgage/pull/353)
- Release 1.4.1 [`9052a03`](https://github.com/toorshia/justgage/commit/9052a0385e2511e53cd083574a62438b60c40437)

#### [v1.4.0](https://github.com/toorshia/justgage/compare/v1.3.5...v1.4.0)

Expand Down
28 changes: 16 additions & 12 deletions docs/justgage.js
Original file line number Diff line number Diff line change
Expand Up @@ -609,14 +609,14 @@
obj.gauge = obj.canvas.path().attr({
"stroke": "none",
"fill": obj.config.gaugeColor,
pki: [ obj.config.max ]
pki: [obj.config.max]
});

// level
obj.level = obj.canvas.path().attr({
"stroke": "none",
"fill": getColor(obj.config.value, (obj.config.value - obj.config.min) / (obj.config.max - obj.config.min), obj.config.levelColors, obj.config.noGradient, obj.config.customSectors),
pki: [ obj.config.min ]
pki: [obj.config.min]
});
if (obj.config.donut) {
obj.level.transform("r" + obj.config.donutStartAngle + ", " + (obj.params.widgetW / 2 + obj.params.dx) + ", " + (obj.params.widgetH / 2 + obj.params.dy));
Expand All @@ -629,7 +629,7 @@
"stroke-width": !isUndefined(obj.config.pointerOptions.stroke_width) ? obj.config.pointerOptions.stroke_width : 0,
"stroke-linecap": !isUndefined(obj.config.pointerOptions.stroke_linecap) ? obj.config.pointerOptions.stroke_linecap : "square",
"fill": !isUndefined(obj.config.pointerOptions.color) ? obj.config.pointerOptions.color : "#000000",
ndl: [ obj.config.min ]
ndl: [obj.config.min]
});

if (obj.config.donut) {
Expand Down Expand Up @@ -787,12 +787,12 @@
rvl = (obj.config.max * 1) + (obj.config.min * 1) - (obj.config.value * 1);
}
obj.level.animate({
pki: [ rvl ]
pki: [rvl]
}, obj.config.startAnimationTime, obj.config.startAnimationType, obj.config.onAnimationEnd);

if (obj.config.pointer) {
obj.needle.animate({
ndl: [ rvl ]
ndl: [rvl]
}, obj.config.startAnimationTime, obj.config.startAnimationType);
}

Expand All @@ -816,7 +816,7 @@
eventName += '.' + this.level.id

//check for existing bind events
if(this.events[eventName])
if (this.events[eventName])
Raphael.eve.off(eventName, this.events[eventName])

Raphael.eve.on(eventName, func);
Expand All @@ -838,8 +838,8 @@
var obj = this;
var displayVal, color;

max = max || null;
min = min || null;
max = isNumber(max) ? max : null
min = isNumber(min) ? min : null
label = label || null;

// set label min
Expand Down Expand Up @@ -941,13 +941,13 @@
}

obj.level.animate({
pki: [ rvl ],
pki: [rvl],
"fill": color
}, obj.config.refreshAnimationTime, obj.config.refreshAnimationType, obj.config.onAnimationEnd);

if (obj.config.pointer) {
obj.needle.animate({
ndl: [ rvl ]
ndl: [rvl]
}, obj.config.refreshAnimationTime, obj.config.refreshAnimationType);
}

Expand All @@ -974,7 +974,7 @@
updateProp(obj, option, val);
}

// options as single option/val
// options as single option/val
} else {
updateProp(obj, options, val);
}
Expand Down Expand Up @@ -1030,7 +1030,7 @@
JustGage.prototype.destroy = function () {
if (this.node && this.node.parentNode) this.node.innerHTML = ''

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

Expand Down Expand Up @@ -1333,5 +1333,9 @@
return out;
};

function isNumber(n) {
return n !== null && n !== undefined && !isNaN(n)
}

return JustGage
}));
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "justgage",
"version": "1.4.1",
"version": "1.4.2",
"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.",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 57b1ad4

Please sign in to comment.