Skip to content

Commit 8ed8673

Browse files
committed
Bumping to v1.1.5
1 parent 11b3d42 commit 8ed8673

9 files changed

+54
-44
lines changed

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angular-color-picker",
33
"description": "Color Picker Directive For AngularJS",
4-
"version": "1.1.4",
4+
"version": "1.1.5",
55
"homepage": "https://github.com/ruhley/angular-color-picker",
66
"repository": {
77
"type": "git",

dist/angularjs-color-picker.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angularjs-color-picker.js

Lines changed: 36 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*!
2-
* angularjs-color-picker v1.1.4
2+
* angularjs-color-picker v1.1.5
33
* https://github.com/ruhley/angular-color-picker/
44
*
55
* Copyright 2016 ruhley
66
*
7-
* 2016-06-07 10:40:11
7+
* 2016-06-21 07:56:41
88
*
99
*/
1010
if (typeof module !== "undefined" && typeof exports !== "undefined" && module.exports === exports){
@@ -19,7 +19,7 @@ if (typeof module !== "undefined" && typeof exports !== "undefined" && module.ex
1919

2020
(function() {
2121
'use strict';
22-
console.log();
22+
2323
var colorPicker = function ($document, $timeout) {
2424
return {
2525
restrict: 'E',
@@ -378,57 +378,62 @@ console.log();
378378
//---------------------------
379379
// Update Positions And Colors On Elements
380380
//---------------------------
381+
381382
$scope.$watch('swatchColor', function() {
382383
$scope.updateSwatchBackground();
383384
});
384385

385-
$scope.$watch('huePos', function(newValue) {
386+
$scope.huePosUpdate = function() {
386387
var container = element[0].querySelector('.color-picker-hue');
387388
var el = angular.element(element[0].querySelector('.color-picker-hue .color-picker-slider'));
388389
var bounding = container.getBoundingClientRect();
389390

390391
el.css({
391-
'top': (bounding.height * newValue / 100) + 'px',
392+
'top': (bounding.height * $scope.huePos / 100) + 'px',
392393
});
393-
});
394+
};
394395

395-
$scope.$watch('opacityPos', function(newValue) {
396+
$scope.opacityPosUpdate = function() {
396397
var container = element[0].querySelector('.color-picker-opacity');
397398
var el = angular.element(element[0].querySelector('.color-picker-opacity .color-picker-slider'));
398399
var bounding = container.getBoundingClientRect();
399400

400401
el.css({
401-
'top': (bounding.height * newValue / 100) + 'px',
402+
'top': (bounding.height * $scope.opacityPos / 100) + 'px',
402403
});
403-
});
404+
};
404405

405-
$scope.$watch('lightnessPos', function(newValue) {
406-
var container = element[0].querySelector('.color-picker-grid');
407-
var el = angular.element(element[0].querySelector('.color-picker-grid .color-picker-picker'));
408-
var bounding = container.getBoundingClientRect();
406+
$scope.lightnessPosUpdate = function() {
407+
$timeout(function() {
408+
var container = element[0].querySelector('.color-picker-grid');
409+
var el = angular.element(element[0].querySelector('.color-picker-grid .color-picker-picker'));
410+
var bounding = container.getBoundingClientRect();
409411

410-
el.css({
411-
'top': (bounding.height * newValue / 100) + 'px',
412+
el.css({
413+
'top': (bounding.height * $scope.lightnessPos / 100) + 'px',
414+
});
412415
});
413-
});
416+
};
414417

415-
$scope.$watch('saturationPos', function(newValue) {
416-
var container = element[0].querySelector('.color-picker-grid');
417-
var el = angular.element(element[0].querySelector('.color-picker-grid .color-picker-picker'));
418-
var bounding = container.getBoundingClientRect();
418+
$scope.saturationPosUpdate = function() {
419+
$timeout(function() {
420+
var container = element[0].querySelector('.color-picker-grid');
421+
var el = angular.element(element[0].querySelector('.color-picker-grid .color-picker-picker'));
422+
var bounding = container.getBoundingClientRect();
419423

420-
el.css({
421-
'left': (bounding.width * newValue / 100) + 'px',
424+
el.css({
425+
'left': (bounding.width * $scope.saturationPos / 100) + 'px',
426+
});
422427
});
423-
});
428+
};
424429

425-
$scope.$watch('grid', function(newValue) {
430+
$scope.gridUpdate = function() {
426431
var el = angular.element(element[0].querySelector('.color-picker-grid'));
427432

428433
el.css({
429-
'background-color': newValue,
434+
'background-color': $scope.grid,
430435
});
431-
});
436+
};
432437

433438
//---------------------------
434439
// HUE
@@ -476,6 +481,8 @@ console.log();
476481
$scope.huePos = 100;
477482
}
478483

484+
$scope.huePosUpdate();
485+
$scope.gridUpdate();
479486
$scope.update();
480487
}
481488
};
@@ -529,6 +536,7 @@ console.log();
529536
$scope.opacityPos = 100;
530537
}
531538

539+
$scope.opacityPosUpdate();
532540
$scope.update();
533541
}
534542
};
@@ -591,6 +599,7 @@ console.log();
591599
$scope.saturationPos = 100;
592600
}
593601

602+
$scope.saturationPosUpdate();
594603
$scope.update();
595604
}
596605
};
@@ -610,6 +619,7 @@ console.log();
610619
$scope.lightnessPos = 100;
611620
}
612621

622+
$scope.lightnessPosUpdate();
613623
$scope.update();
614624
}
615625
};

dist/angularjs-color-picker.min.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/angularjs-color-picker.min.js

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/themes/angularjs-color-picker-bootstrap.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*!
2-
* angularjs-color-picker v1.1.4
2+
* angularjs-color-picker v1.1.5
33
* https://github.com/ruhley/angular-color-picker/
44
*
55
* Copyright 2016 ruhley
66
*
7-
* 2016-06-07 10:40:11
7+
* 2016-06-21 07:56:41
88
*
99
*/
1010
.color-picker-wrapper .color-picker-input-wrapper {
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/*!
2-
* angularjs-color-picker v1.1.4
2+
* angularjs-color-picker v1.1.5
33
* https://github.com/ruhley/angular-color-picker/
44
*
55
* Copyright 2016 ruhley
66
*
7-
* 2016-06-07 10:40:11
7+
* 2016-06-21 07:56:41
88
*
99
*/.color-picker-wrapper .color-picker-input-wrapper{width:100%}.color-picker-wrapper .color-picker-swatch:not(.input-group-addon){height:28px}.color-picker-wrapper.color-picker-swatch-only .input-group .input-group-addon{border-radius:4px}

lib/scripts/directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
$scope.hueMouse = false;
187187
$scope.opacityMouse = false;
188188
$scope.colorMouse = false;
189-
console.log('show');
189+
190190
// force the grid selection circle to redraw and fix its position
191191
$scope.saturationUpdate();
192192
$scope.lightnessUpdate();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "angularjs-color-picker",
33
"description": "Color Picker Directive For AngularJS",
4-
"version": "1.1.4",
4+
"version": "1.1.5",
55
"license": "MIT",
66
"main": "dist/angularjs-color-picker.min.js",
77
"dependencies": {

0 commit comments

Comments
 (0)