Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Luc Didry
wemawema
Commits
34714c4b
Commit
34714c4b
authored
Oct 13, 2017
by
Luc Didry
Browse files
Fix bug in color selection
parent
2f4f5f97
Pipeline
#25494
passed with stage
in 19 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
js/wema_wema.js
View file @
34714c4b
...
...
@@ -736,7 +736,7 @@ function colorToRGBA(color, alpha) {
var
a
=
color
.
split
(
''
);
r
=
parseInt
(
''
+
a
[
1
]
+
a
[
2
],
16
);
g
=
parseInt
(
''
+
a
[
3
]
+
a
[
4
],
16
);
b
=
parseInt
(
''
+
a
[
4
]
+
a
[
6
],
16
);
b
=
parseInt
(
''
+
a
[
5
]
+
a
[
6
],
16
);
return
'
rgba(
'
+
r
+
'
,
'
+
g
+
'
,
'
+
b
+
'
,
'
+
(
100
-
alpha
/
100
)
+
'
)
'
;
}
...
...
js/wema_wema.min.js
View file @
34714c4b
...
...
@@ -54,7 +54,7 @@ else{var i={tl:0,tr:0,br:0,bl:0}
for
(
var
c
in
i
)
o
[
c
]
=
o
[
c
]
||
i
[
c
]}
e
.
beginPath
(),
e
.
moveTo
(
a
+
o
.
tl
,
t
),
e
.
lineTo
(
a
+
s
-
o
.
tr
,
t
),
e
.
quadraticCurveTo
(
a
+
s
,
t
,
a
+
s
,
t
+
o
.
tr
),
e
.
lineTo
(
a
+
s
,
t
+
r
-
o
.
br
),
e
.
quadraticCurveTo
(
a
+
s
,
t
+
r
,
a
+
s
-
o
.
br
,
t
+
r
),
e
.
lineTo
(
a
+
o
.
bl
,
t
+
r
),
e
.
quadraticCurveTo
(
a
,
t
+
r
,
a
,
t
+
r
-
o
.
bl
),
e
.
lineTo
(
a
,
t
+
o
.
tl
),
e
.
quadraticCurveTo
(
a
,
t
,
a
+
o
.
tl
,
t
),
e
.
closePath
(),
n
&&
e
.
fill
(),
l
&&
e
.
stroke
()}
function
show
(
e
){
var
a
=
$
(
"
#
"
+
e
)
a
.
hasClass
(
"
d-none
"
)
&&
a
.
removeClass
(
"
d-none
"
)}
function
hide
(
e
){
var
a
=
$
(
"
#
"
+
e
)
a
.
hasClass
(
"
d-none
"
)
||
a
.
addClass
(
"
d-none
"
)}
function
scalePreserveAspectRatio
(
e
,
a
,
t
,
s
){
return
Math
.
min
(
t
/
e
,
s
/
a
)}
function
colorToRGBA
(
e
,
a
){
var
t
=
e
.
split
(
""
)
return
r
=
parseInt
(
""
+
t
[
1
]
+
t
[
2
],
16
),
g
=
parseInt
(
""
+
t
[
3
]
+
t
[
4
],
16
),
b
=
parseInt
(
""
+
t
[
4
]
+
t
[
6
],
16
),
"
rgba(
"
+
r
+
"
,
"
+
g
+
"
,
"
+
b
+
"
,
"
+
(
100
-
a
/
100
)
+
"
)
"
}
function
createCookie
(
e
,
a
,
t
){
if
(
t
){
var
s
=
new
Date
return
r
=
parseInt
(
""
+
t
[
1
]
+
t
[
2
],
16
),
g
=
parseInt
(
""
+
t
[
3
]
+
t
[
4
],
16
),
b
=
parseInt
(
""
+
t
[
5
]
+
t
[
6
],
16
),
"
rgba(
"
+
r
+
"
,
"
+
g
+
"
,
"
+
b
+
"
,
"
+
(
100
-
a
/
100
)
+
"
)
"
}
function
createCookie
(
e
,
a
,
t
){
if
(
t
){
var
s
=
new
Date
s
.
setTime
(
s
.
getTime
()
+
24
*
t
*
60
*
60
*
1
e3
)
var
r
=
"
; expires=
"
+
s
.
toGMTString
()}
else
var
r
=
""
document
.
cookie
=
e
+
"
=
"
+
a
+
r
+
"
; path=/
"
}
function
readCookie
(
e
){
for
(
var
a
=
e
+
"
=
"
,
t
=
document
.
cookie
.
split
(
"
;
"
),
s
=
0
;
s
<
t
.
length
;
s
++
){
for
(
var
r
=
t
[
s
];
"
"
==
r
.
charAt
(
0
);)
r
=
r
.
substring
(
1
,
r
.
length
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment