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
a48052fb
authored
Nov 21, 2008
by
Dmitry Baranovskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIxed bug in VML for arcTo method, rgb2hsb and getColor
parent
88b0d031
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
raphael-packed.js
+0
-0
raphael.js
+7
-7
No files found.
raphael-packed.js
View file @
a48052fb
This diff is collapsed.
Click to expand it.
raphael.js
View file @
a48052fb
/*
* Raphael 0.5.
8
b - JavaScript Vector Library
* Raphael 0.5.
9
b - JavaScript Vector Library
*
* Copyright (c) 2008 Dmitry Baranovskiy (raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
...
...
@@ -8,7 +8,7 @@ var Raphael = (function (type) {
var
r
=
function
()
{
return
r
.
_create
.
apply
(
r
,
arguments
);
};
r
.
version
=
"0.5.
8
b"
;
r
.
version
=
"0.5.
9
b"
;
r
.
type
=
type
;
var
C
=
{};
function
Matrix
(
m11
,
m12
,
m21
,
m22
,
dx
,
dy
)
{
...
...
@@ -118,7 +118,7 @@ var Raphael = (function (type) {
_getY
=
this
.
isAbsolute
?
VML
.
_getY
:
VML
.
_getH
,
left
=
Math
.
round
(
cx
-
rx
),
top
=
Math
.
round
(
cy
-
ry
);
d
+=
[
left
,
top
,
left
+
rx
*
2
,
top
+
ry
*
2
,
x1
,
y1
,
Math
.
round
(
_getX
(
parseFloat
(
x2
,
10
))),
Math
.
round
(
_getX
(
parseFloat
(
y2
,
10
)))].
join
(
", "
);
d
+=
[
left
,
top
,
Math
.
round
(
left
+
rx
*
2
),
Math
.
round
(
top
+
ry
*
2
),
Math
.
round
(
x1
),
Math
.
round
(
y1
)
,
Math
.
round
(
_getX
(
parseFloat
(
x2
,
10
))),
Math
.
round
(
_getX
(
parseFloat
(
y2
,
10
)))].
join
(
", "
);
this
[
0
].
path
=
this
.
Path
+=
d
;
this
.
last
.
x
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
x
)
+
_getX
(
parseFloat
(
x2
,
10
));
this
.
last
.
y
=
(
this
.
isAbsolute
?
0
:
this
.
last
.
y
)
+
_getY
(
parseFloat
(
y2
,
10
));
...
...
@@ -1122,8 +1122,8 @@ var Raphael = (function (type) {
if
(
attr
==
"stroke-dasharray"
)
{
this
[
0
].
setAttribute
(
attr
,
params
[
attr
].
replace
(
" "
,
","
));
}
else
if
(
attr
==
"text"
&&
this
.
type
==
"text"
)
{
this
[
0
].
removeChild
(
this
[
0
].
firstChild
);
this
[
0
].
appendChild
(
document
.
createTextNode
(
params
[
attr
]
));
this
[
0
].
childNodes
.
length
&&
this
[
0
].
removeChild
(
this
[
0
].
firstChild
);
this
[
0
].
appendChild
(
document
.
createTextNode
(
params
.
text
));
}
else
{
var
cssrule
=
attr
.
replace
(
/
(\-
.
)
/g
,
function
(
w
)
{
return
w
.
substring
(
1
).
toUpperCase
();
...
...
@@ -1574,7 +1574,7 @@ Raphael.rgb2hsb = function (red, green, blue) {
green
=
red
.
g
;
red
=
red
.
r
;
}
if
(
red
.
charAt
(
0
)
==
"#"
)
{
if
(
typeof
red
==
"string"
&&
red
.
charAt
(
0
)
==
"#"
)
{
if
(
red
.
length
==
4
)
{
blue
=
parseInt
(
red
.
substring
(
3
),
16
);
green
=
parseInt
(
red
.
substring
(
2
,
3
),
16
);
...
...
@@ -1625,7 +1625,7 @@ Raphael.getColor = function (value) {
start
.
h
=
0
;
start
.
s
-=
.
2
;
if
(
start
.
s
<=
0
)
{
start
=
{
h
:
0
,
s
:
1
,
b
:
start
.
b
};
arguments
.
callee
.
start
=
{
h
:
0
,
s
:
1
,
b
:
start
.
b
};
}
}
return
rgb
.
hex
;
...
...
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