Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions angularjs-color-picker.css

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

16 changes: 7 additions & 9 deletions angularjs-color-picker.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*!
* angular-color-picker v0.6.3
* angular-color-picker v0.6.4
* https://github.com/ruhley/angular-color-picker/
*
* Copyright 2015 ruhley
*
* 2015-07-24 09:07:56
* 2015-07-29 13:11:21
*
*/
(function() {
Expand Down Expand Up @@ -155,14 +155,12 @@
if (color.isValid()) {
var hsl = color.toHsv();

if ($scope.isValid) {
$scope.hue = hsl.h;
$scope.saturation = hsl.s * 100;
$scope.lightness = hsl.v * 100;
$scope.hue = hsl.h;
$scope.saturation = hsl.s * 100;
$scope.lightness = hsl.v * 100;

if ($scope.config.alpha) {
$scope.opacity = hsl.a * 100;
}
if ($scope.config.alpha) {
$scope.opacity = hsl.a * 100;
}

$scope.isValid = true;
Expand Down
4 changes: 2 additions & 2 deletions angularjs-color-picker.min.css

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions angularjs-color-picker.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion angularjs-color-picker.min.map

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

2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-color-picker",
"description": "Color Picker Directive For AngularJS",
"version": "0.6.3",
"version": "0.6.4",
"homepage": "https://github.com/ruhley/angular-color-picker",
"repository": {
"type": "git",
Expand Down
12 changes: 5 additions & 7 deletions lib/scripts/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,12 @@
if (color.isValid()) {
var hsl = color.toHsv();

if ($scope.isValid) {
$scope.hue = hsl.h;
$scope.saturation = hsl.s * 100;
$scope.lightness = hsl.v * 100;
$scope.hue = hsl.h;
$scope.saturation = hsl.s * 100;
$scope.lightness = hsl.v * 100;

if ($scope.config.alpha) {
$scope.opacity = hsl.a * 100;
}
if ($scope.config.alpha) {
$scope.opacity = hsl.a * 100;
}

$scope.isValid = true;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-color-picker",
"description": "Color Picker Directive For AngularJS",
"version": "0.6.3",
"version": "0.6.4",
"dependencies": {},
"repository": {
"type": "git",
Expand Down