Skip to content

Commit

Permalink
fixed separator check bug (removed separator check)
Browse files Browse the repository at this point in the history
  • Loading branch information
inorganik committed Aug 24, 2017
1 parent 6eb3487 commit 6fd5d4e
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 44 deletions.
12 changes: 3 additions & 9 deletions countUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
var CountUp = function(target, startVal, endVal, decimals, duration, options) {

var self = this;
self.version = function () { return '1.9.0'; };
self.version = function () { return '1.9.1'; };

// default options
self.options = {
Expand Down Expand Up @@ -117,14 +117,8 @@ var CountUp = function(target, startVal, endVal, decimals, duration, options) {
self.duration = Number(duration) * 1000 || 2000;
self.countDown = (self.startVal > self.endVal);
self.frameVal = self.startVal;
if (isNaN(self.options.separator)) {
self.initialized = true;
return true;
}
else {
self.error = '[CountUp] separator cannot be a number: '+self.options.separator;
return false;
}
self.initialized = true;
return true;
}
else {
self.error = '[CountUp] startVal ('+startVal+') or endVal ('+endVal+') is not a number';
Expand Down
12 changes: 3 additions & 9 deletions dist/countUp.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
var CountUp = function(target, startVal, endVal, decimals, duration, options) {

var self = this;
self.version = function () { return '1.9.0'; };
self.version = function () { return '1.9.1'; };

// default options
self.options = {
Expand Down Expand Up @@ -128,14 +128,8 @@ var CountUp = function(target, startVal, endVal, decimals, duration, options) {
self.duration = Number(duration) * 1000 || 2000;
self.countDown = (self.startVal > self.endVal);
self.frameVal = self.startVal;
if (isNaN(self.options.separator)) {
self.initialized = true;
return true;
}
else {
self.error = '[CountUp] separator cannot be a number: '+self.options.separator;
return false;
}
self.initialized = true;
return true;
}
else {
self.error = '[CountUp] startVal ('+startVal+') or endVal ('+endVal+') is not a number';
Expand Down
2 changes: 1 addition & 1 deletion dist/countUp.min.js

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

4 changes: 0 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<title>CountUp.js</title>

<link rel="stylesheet" type="text/css" href="../inorganik.github.io/assets/css/style.css?v=20140820">
<!--<link rel="stylesheet" type="text/css" href="../assets/css/style.css?v=20141210"> -->
<!--<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>-->
<script src="countUp.js"></script>
<!--<script type="text/javascript" src="angular-countUp.js"></script>-->
Expand Down Expand Up @@ -301,7 +300,6 @@ <h4 class="inlineLeft noMargin weight300">Custom:</h4>
updateCodeVisualizer();
}
function toggleEasing(checkbox) {

useEasing = checkbox.checked
easingFnsDropdown.disabled = !useEasing
if (useEasing) {
Expand All @@ -311,9 +309,7 @@ <h4 class="inlineLeft noMargin weight300">Custom:</h4>
updateCodeVisualizer();
}
function toggleGrouping(checkbox) {

useGrouping = checkbox.checked;
document.getElementById('separator').disabled = !useGrouping
updateCodeVisualizer();
}
function methodToCallOnComplete() {
Expand Down
42 changes: 21 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"name": "countup.js",
"description": "Animates a numerical value by counting to it",
"version": "1.9.0",
"license": "MIT",
"main": "./dist/countUp.min.js",
"repository": {
"type": "git",
"url": "git+https://github.com/inorganik/countUp.js.git"
},
"dependencies": {},
"devDependencies": {
"del": "~0.1.3",
"gulp": "~3.8.10",
"gulp-rename": "~1.2.0",
"gulp-uglify": "^1.4.2",
"gulp-wrap-umd": "~0.2.1"
},
"scripts": {
"build": "gulp",
"clean": "gulp clean"
}
"name": "countup.js",
"description": "Animates a numerical value by counting to it",
"version": "1.9.1",
"license": "MIT",
"main": "./dist/countUp.min.js",
"repository": {
"type": "git",
"url": "git+https://github.com/inorganik/countUp.js.git"
},
"dependencies": {},
"devDependencies": {
"del": "~0.1.3",
"gulp": "~3.8.10",
"gulp-rename": "~1.2.0",
"gulp-uglify": "^1.4.2",
"gulp-wrap-umd": "~0.2.1"
},
"scripts": {
"build": "gulp",
"clean": "gulp clean"
}
}

0 comments on commit 6fd5d4e

Please sign in to comment.