@easylogic/colorpicker
Advanced tools
Comparing version 1.10.9 to 1.10.10
{ | ||
"name": "@easylogic/colorpicker", | ||
"version": "1.10.9", | ||
"version": "1.10.10", | ||
"description": "simple colorpicker used anywhere", | ||
@@ -5,0 +5,0 @@ "main": "./dist/colorpicker.js", |
@@ -283,6 +283,13 @@ | ||
var prev = list.filter(it => it.offset.value <= percent).pop(); | ||
var next = list.filter(it => it.offset.value >= percent).shift(); | ||
var next = list.filter(it => it.offset.value > percent).shift(); | ||
let targetIndex = 0; | ||
if (prev && next) { | ||
// if color and offset are same, dont change index | ||
if (prev.offset.value === percent) { | ||
return; | ||
} | ||
this.colorsteps.splice(next.index, 0, { | ||
@@ -295,2 +302,3 @@ cut: false, | ||
} else if (prev) { | ||
const colorstep = { | ||
@@ -297,0 +305,0 @@ cut: false, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
2132430
32137