a-simple-switch
Advanced tools
Comparing version 0.4.0 to 0.4.1
{ | ||
"name": "a-simple-switch", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Vanilla JS/CSS Switch UI element", | ||
@@ -34,2 +34,3 @@ "main": "src/javascript/index.js", | ||
"gulp-zip": "^4.0.0", | ||
"hephaestus": "^0.2.0", | ||
"webpack": "^2.6.1", | ||
@@ -36,0 +37,0 @@ "webpack-stream": "^3.2.0" |
@@ -6,3 +6,3 @@ export class Switch { | ||
this.isMaterial = typeof config.material !== 'undefined' ? config.material : false; | ||
this.checked = false; | ||
this.checked = !!this.element.checked; | ||
@@ -37,2 +37,6 @@ // override from property | ||
this.updateSize(); | ||
if(this.checked) { | ||
this.track.classList.add(Switch.CHECKED_CLASS_NAME); | ||
} | ||
} | ||
@@ -39,0 +43,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
23303
13
187
13