Skip to content

Commit 21e95f2

Browse files
committed
Bumping to v3.4.8
1 parent 8841af9 commit 21e95f2

10 files changed

+72
-50
lines changed

CHANGELOG.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,17 @@
22

33
This is a summary of the changes. For a full list of changes see https://github.com/ruhley/angular-color-picker/releases.
44

5+
## v3.4.8
6+
7+
#### Breaking Changes
8+
* None
9+
10+
#### New Features
11+
* Feature #176 - Adding `dynamicHue`, `dynamicSaturation`, `dynamicLightness`, and `dynamicAlpha` options for the sliders
12+
13+
#### Bug Fixes
14+
* None
15+
516
## v3.4.7
617

718
#### Breaking Changes
@@ -11,7 +22,7 @@ This is a summary of the changes. For a full list of changes see https://github.
1122
* None
1223

1324
#### Bug Fixes
14-
* Fixing up clear and reset buttons for initial values that are not set when color picker is initialised
25+
* Fixing up clear and reset buttons for initial values that are not set when color picker is initialised
1526

1627
## v3.4.6
1728

@@ -22,7 +33,7 @@ This is a summary of the changes. For a full list of changes see https://github.
2233
* None
2334

2435
#### Bug Fixes
25-
* Bug #170 - Internal model not updating when changed programmatically
36+
* Bug #170 - Internal model not updating when changed programmatically
2637

2738
## v3.4.5
2839

@@ -34,9 +45,9 @@ This is a summary of the changes. For a full list of changes see https://github.
3445
* Rewrote some sections to reduce code duplication and file size by over 10%
3546

3647
#### Bug Fixes
37-
* Bug #146 - Sliders no longer lose position when going to black or white
38-
* Bug #173 - Unable to Use hexString Format with restrictToFormat
39-
* Bug #174 - Clicking on swatch when disabled still opens popup
48+
* Bug #146 - Sliders no longer lose position when going to black or white
49+
* Bug #173 - Unable to Use hexString Format with restrictToFormat
50+
* Bug #174 - Clicking on swatch when disabled still opens popup
4051

4152
## v3.4.4
4253

@@ -58,8 +69,8 @@ This is a summary of the changes. For a full list of changes see https://github.
5869
* None
5970

6071
#### Bug Fixes
61-
* Bug #167 - Cannot read property 'updateOn' of undefined `ngModelOptions`
62-
* Fixing up getterSetter = true setting internal ngModel to a function
72+
* Bug #167 - Cannot read property 'updateOn' of undefined `ngModelOptions`
73+
* Fixing up getterSetter = true setting internal ngModel to a function
6374

6475
## v3.4.2
6576

@@ -71,7 +82,7 @@ This is a summary of the changes. For a full list of changes see https://github.
7182
* Feature #164 - Add `preserveInputFormat` option to control whether or not a valid input color of a different format should change to the configured format. For a visual explanation see https://github.com/ruhley/angular-color-picker/pull/164
7283

7384
#### Bug Fixes
74-
* Bug #161 - Format option is now case insensitive
85+
* Bug #161 - Format option is now case insensitive
7586

7687
## v3.4.1
7788

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,16 @@ $scope.options = {
8787
allowEmpty: [false, true],
8888
// color
8989
format: ['hsl', 'hsv', 'rgb', 'hex', 'hexString', 'hex8', 'hex8String', 'raw'],
90+
case: ['upper', 'lower'],
91+
// sliders
9092
hue: [true, false],
9193
saturation: [false, true],
9294
lightness: [false, true], // Note: In the square mode this is HSV and in round mode this is HSL
9395
alpha: [true, false],
94-
case: ['upper', 'lower'],
96+
dynamicHue: [true, false],
97+
dynamicSaturation: [true, false],
98+
dynamicLightness: [true, false],
99+
dynamicAlpha: [true, false],
95100
// swatch
96101
swatch: [true, false],
97102
swatchPos: ['left', 'right'],

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": "3.4.7",
4+
"version": "3.4.8",
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
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*!
2-
* angularjs-color-picker v3.4.7
2+
* angularjs-color-picker v3.4.8
33
* https://github.com/ruhley/angular-color-picker/
44
*
55
* Copyright 2017 ruhley
66
*
7-
* 2017-09-25 17:42:35
7+
* 2017-10-06 09:52:03
88
*
99
*/
1010
.color-picker-wrapper {

dist/angularjs-color-picker.js

Lines changed: 34 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/*!
2-
* angularjs-color-picker v3.4.7
2+
* angularjs-color-picker v3.4.8
33
* https://github.com/ruhley/angular-color-picker/
44
*
55
* Copyright 2017 ruhley
66
*
7-
* 2017-09-25 18:00:22
7+
* 2017-10-06 09:51:57
88
*
99
*/
1010

@@ -287,7 +287,7 @@ var AngularColorPickerController = function () {
287287
}
288288
});
289289

290-
this.$scope.$watchGroup(['AngularColorPickerController.options.format', 'AngularColorPickerController.options.alpha', 'AngularColorPickerController.options.case', 'AngularColorPickerController.options.round', 'AngularColorPickerController.options.restrictToFormat', 'AngularColorPickerController.options.preserveInputFormat', 'AngularColorPickerController.options.allowEmpty', 'AngularColorPickerController.options.horizontal'], function (newValue) {
290+
this.$scope.$watchGroup(['AngularColorPickerController.options.format', 'AngularColorPickerController.options.alpha', 'AngularColorPickerController.options.case', 'AngularColorPickerController.options.round', 'AngularColorPickerController.options.restrictToFormat', 'AngularColorPickerController.options.preserveInputFormat', 'AngularColorPickerController.options.allowEmpty', 'AngularColorPickerController.options.horizontal', 'AngularColorPickerController.options.dynamicHue', 'AngularColorPickerController.options.dynamicSaturation', 'AngularColorPickerController.options.dynamicLightness', 'AngularColorPickerController.options.dynamicAlpha'], function (newValue) {
291291
if (newValue !== undefined) {
292292
_this.initConfig();
293293
_this.update();
@@ -829,13 +829,13 @@ var AngularColorPickerController = function () {
829829
var el = this.find('.color-picker-hue .color-picker-overlay');
830830
var direction = this.options.horizontal ? 'left' : 'top';
831831

832-
var zero_sixths = this.getColorValue();
833-
var one_sixths = this.getColorValue();
834-
var two_sixths = this.getColorValue();
835-
var three_sixths = this.getColorValue();
836-
var four_sixths = this.getColorValue();
837-
var five_sixths = this.getColorValue();
838-
var six_sixths = this.getColorValue();
832+
var zero_sixths = this.getColorValue(this.options.dynamicHue);
833+
var one_sixths = this.getColorValue(this.options.dynamicHue);
834+
var two_sixths = this.getColorValue(this.options.dynamicHue);
835+
var three_sixths = this.getColorValue(this.options.dynamicHue);
836+
var four_sixths = this.getColorValue(this.options.dynamicHue);
837+
var five_sixths = this.getColorValue(this.options.dynamicHue);
838+
var six_sixths = this.getColorValue(this.options.dynamicHue);
839839

840840
zero_sixths.h = 0;
841841
one_sixths.h = 60;
@@ -886,11 +886,11 @@ var AngularColorPickerController = function () {
886886
value: function updateSaturationBackground(color) {
887887
var el = this.find('.color-picker-saturation .color-picker-overlay');
888888
var direction = this.options.horizontal ? 'right' : 'bottom';
889-
var high = this.getColorValue();
890-
var low = this.getColorValue();
889+
var high = this.getColorValue(this.options.dynamicSaturation);
890+
var low = this.getColorValue(this.options.dynamicSaturation);
891891

892-
high.s = 100;
893-
low.s = 0;
892+
high.s = '100%';
893+
low.s = '0%';
894894

895895
el.css({
896896
'background': 'linear-gradient(to ' + direction + ', ' + tinycolor(high).toRgbString() + ' 0%, ' + tinycolor(low).toRgbString() + ' 100%)'
@@ -933,9 +933,9 @@ var AngularColorPickerController = function () {
933933
value: function updateLightnessBackground(color) {
934934
var el = this.find('.color-picker-lightness .color-picker-overlay');
935935
var direction = this.options.horizontal ? 'right' : 'bottom';
936-
var bright = this.getColorValue();
937-
var middle = this.getColorValue();
938-
var dark = this.getColorValue();
936+
var bright = this.getColorValue(this.options.dynamicLightness);
937+
var middle = this.getColorValue(this.options.dynamicLightness);
938+
var dark = this.getColorValue(this.options.dynamicLightness);
939939

940940
if (this.options.round) {
941941
bright.l = 100;
@@ -978,8 +978,8 @@ var AngularColorPickerController = function () {
978978
value: function updateOpacityBackground(color) {
979979
var el = this.find('.color-picker-opacity .color-picker-overlay');
980980
var direction = this.options.horizontal ? 'right' : 'bottom';
981-
var opaque = this.getColorValue();
982-
var transparent = this.getColorValue();
981+
var opaque = this.getColorValue(this.options.dynamicAlpha);
982+
var transparent = this.getColorValue(this.options.dynamicAlpha);
983983

984984
opaque.a = 1;
985985
transparent.a = 0;
@@ -1060,10 +1060,10 @@ var AngularColorPickerController = function () {
10601060
var background = this.getColorValue();
10611061

10621062
if (this.options.round) {
1063-
background.s = 0;
1063+
background.s = '0%';
10641064
} else {
1065-
background.s = 1;
1066-
background.v = 1;
1065+
background.s = '100%';
1066+
background.v = '100%';
10671067
background.a = 1;
10681068
}
10691069

@@ -1131,24 +1131,25 @@ var AngularColorPickerController = function () {
11311131
}, {
11321132
key: 'getColorValue',
11331133
value: function getColorValue() {
1134-
var includeOpacity = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
1134+
var dynamicValues = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
1135+
var includeOpacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
11351136

11361137
var value = {
11371138
h: this.hue,
1138-
s: this.saturation + '%',
1139-
v: this.lightness + '%'
1139+
s: dynamicValues ? this.saturation + '%' : '100%',
1140+
v: dynamicValues ? this.lightness + '%' : '100%'
11401141
};
11411142

11421143
if (this.options.round) {
11431144
value = {
11441145
h: this.hue,
1145-
s: this.saturation + '%',
1146-
l: this.lightness + '%'
1146+
s: dynamicValues ? this.saturation + '%' : '100%',
1147+
l: dynamicValues ? this.lightness + '%' : '50%'
11471148
};
11481149
}
11491150

11501151
if (includeOpacity) {
1151-
value.a = this.opacity / 100;
1152+
value.a = dynamicValues ? this.opacity / 100 : 1;
11521153
}
11531154

11541155
return value;
@@ -1422,10 +1423,15 @@ var AngularColorPickerOptions = function AngularColorPickerOptions() {
14221423
// color
14231424
format: 'hsl',
14241425
case: 'upper',
1426+
// sliders
14251427
hue: true,
14261428
saturation: false,
14271429
lightness: false,
14281430
alpha: true,
1431+
dynamicHue: true,
1432+
dynamicSaturation: true,
1433+
dynamicLightness: true,
1434+
dynamicAlpha: true,
14291435
// picker
14301436
round: false,
14311437
pos: 'bottom left',

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: 3 additions & 3 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 v3.4.7
2+
* angularjs-color-picker v3.4.8
33
* https://github.com/ruhley/angular-color-picker/
44
*
55
* Copyright 2017 ruhley
66
*
7-
* 2017-09-25 17:42:35
7+
* 2017-10-06 09:52:03
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 v3.4.7
2+
* angularjs-color-picker v3.4.8
33
* https://github.com/ruhley/angular-color-picker/
44
*
55
* Copyright 2017 ruhley
66
*
7-
* 2017-09-25 17:42:35
7+
* 2017-10-06 09:52:03
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}

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": "3.4.7",
4+
"version": "3.4.8",
55
"license": "MIT",
66
"main": "dist/angularjs-color-picker.min.js",
77
"dependencies": {

0 commit comments

Comments
 (0)