bootstrap-colorpicker
Advanced tools
Comparing version 3.0.3 to 3.1.0
{ | ||
"name": "bootstrap-colorpicker", | ||
"version": "3.0.3", | ||
"version": "3.1.0", | ||
"description": "Bootstrap Colorpicker is a modular color picker plugin for Bootstrap 4.", | ||
@@ -5,0 +5,0 @@ "main": "./dist/js/bootstrap-colorpicker.js", |
@@ -13,4 +13,2 @@ <a class="readme-logo" href="https://farbelous.io/bootstrap-colorpicker"> | ||
[![npm](https://img.shields.io/npm/v/bootstrap-colorpicker.svg?style=flat-square)](https://www.npmjs.com/package/bootstrap-colorpicker) | ||
[![Donate](https://img.shields.io/badge/%E2%9D%A4-Donate%20to%20this%20project-e0a61d.svg?longCache=true&style=flat-square)](https://github.com/itsjavi/itsjavi.github.io/blob/master/BACKERS.md#sponsors--backers) | ||
[![Supporters](https://img.shields.io/badge/%F0%9F%92%AA-Supporters-333333.svg?longCache=true&style=flat-square)](https://github.com/itsjavi/itsjavi.github.io/blob/master/BACKERS.md#sponsors) | ||
@@ -130,2 +128,2 @@ ## Install | ||
*Thanks to JetBrains for supporting this project.* | ||
*Thanks to JetBrains for supporting this project.* |
@@ -157,3 +157,4 @@ 'use strict'; | ||
if (!color.isValid()) { | ||
throw new Error('The fallback color is invalid.'); | ||
console.warn('The fallback color is invalid. Falling back to the previous color or black if any.'); | ||
return this.color ? this.color : new ColorItem('#000000', this.format); | ||
} | ||
@@ -160,0 +161,0 @@ |
@@ -102,4 +102,2 @@ /** | ||
replace(color, format = null) { | ||
let fallback = null; | ||
format = ColorItem.sanitizeFormat(format); | ||
@@ -123,3 +121,3 @@ | ||
if (this._color === null) { | ||
this._color = QixColor(fallback); | ||
this._color = QixColor(); | ||
this._original.valid = false; | ||
@@ -163,2 +161,6 @@ return; | ||
if (color === null) { | ||
return null; | ||
} | ||
if (Array.isArray(color)) { | ||
@@ -165,0 +167,0 @@ format = 'hsv'; |
@@ -49,5 +49,5 @@ 'use strict'; | ||
* @type {('rgb'|'hex'|'hsl'|'auto'|null)} | ||
* @default null | ||
* @default 'auto' | ||
*/ | ||
format: null, | ||
format: 'auto', | ||
/** | ||
@@ -54,0 +54,0 @@ * Horizontal mode layout. |
@@ -61,6 +61,6 @@ 'use strict'; | ||
if (slider.callLeft) { | ||
color[slider.callLeft].call(color, left / slider.maxLeft); | ||
color[slider.callLeft](left / slider.maxLeft); | ||
} | ||
if (slider.callTop) { | ||
color[slider.callTop].call(color, top / slider.maxTop); | ||
color[slider.callTop](top / slider.maxTop); | ||
} | ||
@@ -67,0 +67,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
6020188
190
51056
4
128
1