mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-03-21 03:07:47 +01:00
Remove color utility and tinycolor module
This commit is contained in:
parent
3bbc7a36f8
commit
c1d1ab6501
2 changed files with 0 additions and 24 deletions
|
@ -1,23 +0,0 @@
|
||||||
import tinycolor from 'tinycolor2'
|
|
||||||
|
|
||||||
window.doppler = (percentage, value, relative = false) ->
|
|
||||||
while percentage >= 1
|
|
||||||
percentage /= 10
|
|
||||||
tc_color = tinycolor(value).toRgb()
|
|
||||||
color = [tc_color.r, tc_color.g, tc_color.b]
|
|
||||||
if relative
|
|
||||||
for _c, i in color
|
|
||||||
x = (255 - color[i]) * percentage
|
|
||||||
if x == 0
|
|
||||||
x = color[i] * percentage
|
|
||||||
color[i] -= x
|
|
||||||
else
|
|
||||||
color[i] += x
|
|
||||||
else
|
|
||||||
adj = 255 * percentage
|
|
||||||
for _c, i in color
|
|
||||||
if color[i] + adj > 255
|
|
||||||
color[i] -= adj
|
|
||||||
else
|
|
||||||
color[i] += adj
|
|
||||||
'#' + color.map((x) -> Math.floor(Math.max(0, Math.min(255, x))).toString(16)).join ''
|
|
|
@ -6,7 +6,6 @@ import 'popper.js'
|
||||||
import 'bootstrap'
|
import 'bootstrap'
|
||||||
|
|
||||||
import '../legacy/pagination'
|
import '../legacy/pagination'
|
||||||
import '../legacy/util'
|
|
||||||
|
|
||||||
_ready = ->
|
_ready = ->
|
||||||
$('[data-toggle="tooltip"]').tooltip()
|
$('[data-toggle="tooltip"]').tooltip()
|
||||||
|
|
Loading…
Reference in a new issue