Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
殷洪(管理员)
/
raphael
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Registry
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
087fe0fa
authored
Jul 31, 2015
by
Tomas Alabes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
@bjouhier - fixed rounding issue in RGB formatter
parent
dba301d0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
2 deletions
+9
-2
dev/raphael.core.js
+2
-1
history.md
+5
-0
raphael-min.js
+0
-0
raphael.js
+2
-1
No files found.
dev/raphael.core.js
View file @
087fe0fa
...
...
@@ -1002,7 +1002,8 @@
= (string) hex representation of the colour.
\*/
R
.
rgb
=
cacher
(
function
(
r
,
g
,
b
)
{
return
"#"
+
(
16777216
|
b
|
(
g
<<
8
)
|
(
r
<<
16
)).
toString
(
16
).
slice
(
1
);
function
round
(
x
)
{
return
(
x
+
0.5
)
|
0
;
}
return
"#"
+
(
16777216
|
round
(
b
)
|
(
round
(
g
)
<<
8
)
|
(
round
(
r
)
<<
16
)).
toString
(
16
).
slice
(
1
);
});
/*\
* Raphael.getColor
...
...
history.md
View file @
087fe0fa
2.1.5 • WIP
------------------
*
fixed rounding issue in RGB formatter
2.
1.4 • 2015-03-09
------------------
...
...
raphael-min.js
View file @
087fe0fa
This source diff could not be displayed because it is too large. You can
view the blob
instead.
raphael.js
View file @
087fe0fa
...
...
@@ -1381,7 +1381,8 @@
= (string) hex representation of the colour.
\*/
R
.
rgb
=
cacher
(
function
(
r
,
g
,
b
)
{
return
"#"
+
(
16777216
|
b
|
(
g
<<
8
)
|
(
r
<<
16
)).
toString
(
16
).
slice
(
1
);
function
round
(
x
)
{
return
(
x
+
0.5
)
|
0
;
}
return
"#"
+
(
16777216
|
round
(
b
)
|
(
round
(
g
)
<<
8
)
|
(
round
(
r
)
<<
16
)).
toString
(
16
).
slice
(
1
);
});
/*\
* Raphael.getColor
...
...
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