Skip to content

Commit

Permalink
Publish 1.4.4
Browse files Browse the repository at this point in the history
  • Loading branch information
simonwep committed Oct 15, 2019
1 parent 497e6f0 commit c575049
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 25 deletions.
4 changes: 2 additions & 2 deletions dist/pickr.es5.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pickr.es5.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/pickr.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pickr.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/themes/classic.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/themes/monolith.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/themes/nano.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@simonwep/pickr",
"version": "1.4.3",
"version": "1.4.4",
"license": "MIT",
"author": "Simon Reinisch <[email protected]>",
"description": "Flat, Simple, Hackable Color-Picker.",
Expand Down
16 changes: 7 additions & 9 deletions src/js/pickr.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// Import utils
import * as _ from './utils/utils';
import {version} from '../../package';
import {parseToHSVA} from './utils/color';

// Import classes
import {HSVaColor} from './utils/hsvacolor';
import Moveable from './libs/moveable';
import Selectable from './libs/selectable';
import Nanopop from './libs/nanopop';
import buildPickr from './template';
import {HSVaColor} from './utils/hsvacolor';
import Moveable from './libs/moveable';
import Selectable from './libs/selectable';
import Nanopop from './libs/nanopop';
import buildPickr from './template';

class Pickr {

Expand Down Expand Up @@ -886,5 +884,5 @@ Pickr.libs = {
Pickr.create = options => new Pickr(options);

// Assign version and export
Pickr.version = '1.4.3';
Pickr.version = version;
export default Pickr;
6 changes: 3 additions & 3 deletions src/js/utils/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ function standardizeColor(name) {

// Since invalid color's will be parsed as black, filter them out
if (name.toLowerCase() === 'black') {
return '#000000';
return '#000';
}

const ctx = document.createElement('canvas').getContext('2d');
ctx.fillStyle = name;
return ctx.fillStyle === '#000000' ? null : ctx.fillStyle;
return ctx.fillStyle === '#000' ? null : ctx.fillStyle;
}

/**
Expand Down Expand Up @@ -249,7 +249,7 @@ export function parseToHSVA(str) {
continue;

// match[2] does only contain a truly value if rgba, hsla, or hsla got matched
const alphaValid = a => (!!match[2] === (typeof a === 'number'))
const alphaValid = a => (!!match[2] === (typeof a === 'number'));

// Try to convert
switch (type) {
Expand Down
2 changes: 1 addition & 1 deletion src/js/utils/hsvacolor.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {hsvToHsl, hsvToRgb, hsvToCmyk, hsvToHex} from './color';
import {hsvToCmyk, hsvToHex, hsvToHsl, hsvToRgb} from './color';

/**
* Simple class which holds the properties
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = {
{
loader: MiniCssExtractPlugin.loader,
options: {
hmr: process.env.NODE_ENV === 'development',
hmr: true,
reloadAll: true
},
},
Expand Down

0 comments on commit c575049

Please sign in to comment.