diff --git a/bower.json b/bower.json index c101216..07518c9 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "jfive-web-components", - "version": "0.0.7", + "version": "0.0.8", "description": "Web components for controlling hardware with the Johnny-Five JavaScript Robotics & IoT platform.", "authors": [ "Jordan Last " diff --git a/jfive-motor.html b/jfive-motor.html index 32aa7b6..76927e0 100644 --- a/jfive-motor.html +++ b/jfive-motor.html @@ -61,7 +61,7 @@ catch(error) { console.log(error); } - + this.onChanged(); } @@ -78,11 +78,15 @@ } speedChanged() { - this.refreshMotor(); + if (this.on) { + this.refreshMotor(); + } } reverseChanged() { - this.refreshMotor(); + if (this.on) { + this.refreshMotor(); + } } refreshMotor() { diff --git a/package.json b/package.json index 98693c6..aa6a950 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jfive-web-components", - "version": "0.0.7", + "version": "0.0.8", "description": "Web components for controlling hardware with the Johnny-Five JavaScript Robotics & IoT platform.", "scripts": { "test": "echo \"Error: no test specified\" && exit 1"