Skip to content

Commit

Permalink
Bumping to v3.4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
ruhley committed Oct 5, 2017
1 parent 8841af9 commit 21e95f2
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 50 deletions.
27 changes: 19 additions & 8 deletions CHANGELOG.md
Expand Up @@ -2,6 +2,17 @@

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

## v3.4.8

#### Breaking Changes
* None

#### New Features
* Feature #176 - Adding `dynamicHue`, `dynamicSaturation`, `dynamicLightness`, and `dynamicAlpha` options for the sliders

#### Bug Fixes
* None

## v3.4.7

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

#### Bug Fixes
* Fixing up clear and reset buttons for initial values that are not set when color picker is initialised
* Fixing up clear and reset buttons for initial values that are not set when color picker is initialised

## v3.4.6

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

#### Bug Fixes
* Bug #170 - Internal model not updating when changed programmatically
* Bug #170 - Internal model not updating when changed programmatically

## v3.4.5

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

#### Bug Fixes
* Bug #146 - Sliders no longer lose position when going to black or white
* Bug #173 - Unable to Use hexString Format with restrictToFormat
* Bug #174 - Clicking on swatch when disabled still opens popup
* Bug #146 - Sliders no longer lose position when going to black or white
* Bug #173 - Unable to Use hexString Format with restrictToFormat
* Bug #174 - Clicking on swatch when disabled still opens popup

## v3.4.4

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

#### Bug Fixes
* Bug #167 - Cannot read property 'updateOn' of undefined `ngModelOptions`
* Fixing up getterSetter = true setting internal ngModel to a function
* Bug #167 - Cannot read property 'updateOn' of undefined `ngModelOptions`
* Fixing up getterSetter = true setting internal ngModel to a function

## v3.4.2

Expand All @@ -71,7 +82,7 @@ This is a summary of the changes. For a full list of changes see https://github.
* 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

#### Bug Fixes
* Bug #161 - Format option is now case insensitive
* Bug #161 - Format option is now case insensitive

## v3.4.1

Expand Down
7 changes: 6 additions & 1 deletion README.md
Expand Up @@ -87,11 +87,16 @@ $scope.options = {
allowEmpty: [false, true],
// color
format: ['hsl', 'hsv', 'rgb', 'hex', 'hexString', 'hex8', 'hex8String', 'raw'],
case: ['upper', 'lower'],
// sliders
hue: [true, false],
saturation: [false, true],
lightness: [false, true], // Note: In the square mode this is HSV and in round mode this is HSL
alpha: [true, false],
case: ['upper', 'lower'],
dynamicHue: [true, false],
dynamicSaturation: [true, false],
dynamicLightness: [true, false],
dynamicAlpha: [true, false],
// swatch
swatch: [true, false],
swatchPos: ['left', 'right'],
Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -1,7 +1,7 @@
{
"name": "angular-color-picker",
"description": "Color Picker Directive For AngularJS",
"version": "3.4.7",
"version": "3.4.8",
"homepage": "https://github.com/ruhley/angular-color-picker",
"repository": {
"type": "git",
Expand Down
4 changes: 2 additions & 2 deletions dist/angularjs-color-picker.css
@@ -1,10 +1,10 @@
/*!
* angularjs-color-picker v3.4.7
* angularjs-color-picker v3.4.8
* https://github.com/ruhley/angular-color-picker/
*
* Copyright 2017 ruhley
*
* 2017-09-25 17:42:35
* 2017-10-06 09:52:03
*
*/
.color-picker-wrapper {
Expand Down
62 changes: 34 additions & 28 deletions dist/angularjs-color-picker.js
@@ -1,10 +1,10 @@
/*!
* angularjs-color-picker v3.4.7
* angularjs-color-picker v3.4.8
* https://github.com/ruhley/angular-color-picker/
*
* Copyright 2017 ruhley
*
* 2017-09-25 18:00:22
* 2017-10-06 09:51:57
*
*/

Expand Down Expand Up @@ -287,7 +287,7 @@ var AngularColorPickerController = function () {
}
});

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) {
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) {
if (newValue !== undefined) {
_this.initConfig();
_this.update();
Expand Down Expand Up @@ -829,13 +829,13 @@ var AngularColorPickerController = function () {
var el = this.find('.color-picker-hue .color-picker-overlay');
var direction = this.options.horizontal ? 'left' : 'top';

var zero_sixths = this.getColorValue();
var one_sixths = this.getColorValue();
var two_sixths = this.getColorValue();
var three_sixths = this.getColorValue();
var four_sixths = this.getColorValue();
var five_sixths = this.getColorValue();
var six_sixths = this.getColorValue();
var zero_sixths = this.getColorValue(this.options.dynamicHue);
var one_sixths = this.getColorValue(this.options.dynamicHue);
var two_sixths = this.getColorValue(this.options.dynamicHue);
var three_sixths = this.getColorValue(this.options.dynamicHue);
var four_sixths = this.getColorValue(this.options.dynamicHue);
var five_sixths = this.getColorValue(this.options.dynamicHue);
var six_sixths = this.getColorValue(this.options.dynamicHue);

zero_sixths.h = 0;
one_sixths.h = 60;
Expand Down Expand Up @@ -886,11 +886,11 @@ var AngularColorPickerController = function () {
value: function updateSaturationBackground(color) {
var el = this.find('.color-picker-saturation .color-picker-overlay');
var direction = this.options.horizontal ? 'right' : 'bottom';
var high = this.getColorValue();
var low = this.getColorValue();
var high = this.getColorValue(this.options.dynamicSaturation);
var low = this.getColorValue(this.options.dynamicSaturation);

high.s = 100;
low.s = 0;
high.s = '100%';
low.s = '0%';

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

if (this.options.round) {
bright.l = 100;
Expand Down Expand Up @@ -978,8 +978,8 @@ var AngularColorPickerController = function () {
value: function updateOpacityBackground(color) {
var el = this.find('.color-picker-opacity .color-picker-overlay');
var direction = this.options.horizontal ? 'right' : 'bottom';
var opaque = this.getColorValue();
var transparent = this.getColorValue();
var opaque = this.getColorValue(this.options.dynamicAlpha);
var transparent = this.getColorValue(this.options.dynamicAlpha);

opaque.a = 1;
transparent.a = 0;
Expand Down Expand Up @@ -1060,10 +1060,10 @@ var AngularColorPickerController = function () {
var background = this.getColorValue();

if (this.options.round) {
background.s = 0;
background.s = '0%';
} else {
background.s = 1;
background.v = 1;
background.s = '100%';
background.v = '100%';
background.a = 1;
}

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

var value = {
h: this.hue,
s: this.saturation + '%',
v: this.lightness + '%'
s: dynamicValues ? this.saturation + '%' : '100%',
v: dynamicValues ? this.lightness + '%' : '100%'
};

if (this.options.round) {
value = {
h: this.hue,
s: this.saturation + '%',
l: this.lightness + '%'
s: dynamicValues ? this.saturation + '%' : '100%',
l: dynamicValues ? this.lightness + '%' : '50%'
};
}

if (includeOpacity) {
value.a = this.opacity / 100;
value.a = dynamicValues ? this.opacity / 100 : 1;
}

return value;
Expand Down Expand Up @@ -1422,10 +1423,15 @@ var AngularColorPickerOptions = function AngularColorPickerOptions() {
// color
format: 'hsl',
case: 'upper',
// sliders
hue: true,
saturation: false,
lightness: false,
alpha: true,
dynamicHue: true,
dynamicSaturation: true,
dynamicLightness: true,
dynamicAlpha: true,
// picker
round: false,
pos: 'bottom left',
Expand Down
4 changes: 2 additions & 2 deletions dist/angularjs-color-picker.min.css

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/themes/angularjs-color-picker-bootstrap.css
@@ -1,10 +1,10 @@
/*!
* angularjs-color-picker v3.4.7
* angularjs-color-picker v3.4.8
* https://github.com/ruhley/angular-color-picker/
*
* Copyright 2017 ruhley
*
* 2017-09-25 17:42:35
* 2017-10-06 09:52:03
*
*/
.color-picker-wrapper .color-picker-input-wrapper {
Expand Down
4 changes: 2 additions & 2 deletions dist/themes/angularjs-color-picker-bootstrap.min.css
@@ -1,9 +1,9 @@
/*!
* angularjs-color-picker v3.4.7
* angularjs-color-picker v3.4.8
* https://github.com/ruhley/angular-color-picker/
*
* Copyright 2017 ruhley
*
* 2017-09-25 17:42:35
* 2017-10-06 09:52:03
*
*/.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}
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "angularjs-color-picker",
"description": "Color Picker Directive For AngularJS",
"version": "3.4.7",
"version": "3.4.8",
"license": "MIT",
"main": "dist/angularjs-color-picker.min.js",
"dependencies": {
Expand Down

0 comments on commit 21e95f2

Please sign in to comment.