Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
raphael
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nhn
raphael
Commits
2d5839be
Commit
2d5839be
authored
Jan 08, 2009
by
Dmitry Baranovskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IE7 bugfix
parent
c9efb352
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
16 deletions
+14
-16
raphael-packed.js
raphael-packed.js
+2
-2
raphael.js
raphael.js
+12
-14
No files found.
raphael-packed.js
View file @
2d5839be
This diff is collapsed.
Click to expand it.
raphael.js
View file @
2d5839be
/*
/*
* Raphael 0.6 - JavaScript Vector Library
* Raphael 0.6
.1
- JavaScript Vector Library
*
*
* Copyright (c) 2008 Dmitry Baranovskiy (http://raphaeljs.com)
* Copyright (c) 2008 Dmitry Baranovskiy (http://raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
...
@@ -8,7 +8,7 @@ var Raphael = (function (type) {
...
@@ -8,7 +8,7 @@ var Raphael = (function (type) {
var
r
=
function
()
{
var
r
=
function
()
{
return
r
.
_create
.
apply
(
r
,
arguments
);
return
r
.
_create
.
apply
(
r
,
arguments
);
};
};
r
.
version
=
"0.6"
;
r
.
version
=
"0.6
.1
"
;
r
.
type
=
type
;
r
.
type
=
type
;
var
availableAttrs
=
{
cx
:
0
,
cy
:
0
,
fill
:
"#fff"
,
"fill-opacity"
:
1
,
font
:
'16px "Arial"'
,
"font-family"
:
'"Arial"'
,
"font-size"
:
"16"
,
gradient
:
0
,
height
:
0
,
opacity
:
1
,
path
:
"M0,0"
,
r
:
0
,
rotation
:
0
,
rx
:
0
,
ry
:
0
,
scale
:
"1 1"
,
stroke
:
"#000"
,
"stroke-dasharray"
:
""
,
"stroke-linecap"
:
"butt"
,
"stroke-linejoin"
:
"butt"
,
"stroke-miterlimit"
:
0
,
"stroke-opacity"
:
1
,
"stroke-width"
:
1
,
translation
:
"0 0"
,
width
:
0
,
x
:
0
,
y
:
0
},
var
availableAttrs
=
{
cx
:
0
,
cy
:
0
,
fill
:
"#fff"
,
"fill-opacity"
:
1
,
font
:
'16px "Arial"'
,
"font-family"
:
'"Arial"'
,
"font-size"
:
"16"
,
gradient
:
0
,
height
:
0
,
opacity
:
1
,
path
:
"M0,0"
,
r
:
0
,
rotation
:
0
,
rx
:
0
,
ry
:
0
,
scale
:
"1 1"
,
stroke
:
"#000"
,
"stroke-dasharray"
:
""
,
"stroke-linecap"
:
"butt"
,
"stroke-linejoin"
:
"butt"
,
"stroke-miterlimit"
:
0
,
"stroke-opacity"
:
1
,
"stroke-width"
:
1
,
translation
:
"0 0"
,
width
:
0
,
x
:
0
,
y
:
0
},
availableAnimAttrs
=
{
cx
:
"number"
,
cy
:
"number"
,
fill
:
"colour"
,
"fill-opacity"
:
"number"
,
"font-size"
:
"number"
,
height
:
"number"
,
opacity
:
"number"
,
path
:
"path"
,
r
:
"number"
,
rotation
:
"number"
,
rx
:
"number"
,
ry
:
"number"
,
scale
:
"csv"
,
stroke
:
"colour"
,
"stroke-opacity"
:
"number"
,
"stroke-width"
:
"number"
,
translation
:
"csv"
,
width
:
"number"
,
x
:
"number"
,
y
:
"number"
},
availableAnimAttrs
=
{
cx
:
"number"
,
cy
:
"number"
,
fill
:
"colour"
,
"fill-opacity"
:
"number"
,
"font-size"
:
"number"
,
height
:
"number"
,
opacity
:
"number"
,
path
:
"path"
,
r
:
"number"
,
rotation
:
"number"
,
rx
:
"number"
,
ry
:
"number"
,
scale
:
"csv"
,
stroke
:
"colour"
,
"stroke-opacity"
:
"number"
,
"stroke-width"
:
"number"
,
translation
:
"csv"
,
width
:
"number"
,
x
:
"number"
,
y
:
"number"
},
...
@@ -273,7 +273,7 @@ var Raphael = (function (type) {
...
@@ -273,7 +273,7 @@ var Raphael = (function (type) {
params
[
"font"
]
&&
(
s
.
font
=
params
[
"font"
]);
params
[
"font"
]
&&
(
s
.
font
=
params
[
"font"
]);
params
[
"font-weight"
]
&&
(
s
.
fontWeight
=
params
[
"font-weight"
]);
params
[
"font-weight"
]
&&
(
s
.
fontWeight
=
params
[
"font-weight"
]);
if
(
typeof
params
.
opacity
!=
"undefined"
||
typeof
params
[
"stroke-width"
]
!=
"undefined"
||
typeof
params
.
fill
!=
"undefined"
||
typeof
params
.
stroke
!=
"undefined"
)
{
if
(
typeof
params
.
opacity
!=
"undefined"
||
typeof
params
[
"stroke-width"
]
!=
"undefined"
||
typeof
params
.
fill
!=
"undefined"
||
typeof
params
.
stroke
!=
"undefined"
)
{
o
=
o
.
shape
||
o
[
0
]
;
o
=
o
.
shape
||
o
.
node
;
var
fill
=
(
o
.
getElementsByTagName
(
"fill"
)
&&
o
.
getElementsByTagName
(
"fill"
)[
0
])
||
document
.
createElement
(
"rvml:fill"
);
var
fill
=
(
o
.
getElementsByTagName
(
"fill"
)
&&
o
.
getElementsByTagName
(
"fill"
)[
0
])
||
document
.
createElement
(
"rvml:fill"
);
if
(
"fill-opacity"
in
params
||
"opacity"
in
params
)
{
if
(
"fill-opacity"
in
params
||
"opacity"
in
params
)
{
fill
.
opacity
=
((
params
[
"fill-opacity"
]
+
1
||
2
)
-
1
)
*
((
params
.
opacity
+
1
||
2
)
-
1
);
fill
.
opacity
=
((
params
[
"fill-opacity"
]
+
1
||
2
)
-
1
)
*
((
params
.
opacity
+
1
||
2
)
-
1
);
...
@@ -437,11 +437,15 @@ var Raphael = (function (type) {
...
@@ -437,11 +437,15 @@ var Raphael = (function (type) {
this
.
textpath
.
v
=
[
"m"
,
Math
.
round
(
attr
.
x
),
", "
,
Math
.
round
(
attr
.
y
-
2
),
"l"
,
Math
.
round
(
attr
.
x
)
+
1
,
", "
,
Math
.
round
(
attr
.
y
-
2
)].
join
(
""
);
this
.
textpath
.
v
=
[
"m"
,
Math
.
round
(
attr
.
x
),
", "
,
Math
.
round
(
attr
.
y
-
2
),
"l"
,
Math
.
round
(
attr
.
x
)
+
1
,
", "
,
Math
.
round
(
attr
.
y
-
2
)].
join
(
""
);
return
;
return
;
case
"path"
:
case
"path"
:
var
dim
=
Raphael
.
pathDimensions
(
this
.
attrs
.
path
),
if
(
!
this
.
attrs
.
path
)
{
x
=
dim
.
x
;
x
=
y
=
w
=
h
=
0
;
y
=
dim
.
y
;
}
else
{
w
=
dim
.
width
;
var
dim
=
Raphael
.
pathDimensions
(
this
.
attrs
.
path
),
h
=
dim
.
height
;
x
=
dim
.
x
;
y
=
dim
.
y
;
w
=
dim
.
width
;
h
=
dim
.
height
;
}
break
;
break
;
default
:
default
:
x
=
0
;
x
=
0
;
...
@@ -1456,12 +1460,6 @@ var Raphael = (function (type) {
...
@@ -1456,12 +1460,6 @@ var Raphael = (function (type) {
C
.
group
=
function
()
{
C
.
group
=
function
()
{
return
theGroup
(
this
);
return
theGroup
(
this
);
};
};
C
.
linerect
=
function
(
x
,
y
,
w
,
h
,
r
)
{
if
(
r
&&
parseInt
(
r
,
10
))
{
return
this
.
path
({
stroke
:
"#000"
}).
moveTo
(
x
+
r
,
y
).
lineTo
(
x
+
w
-
r
,
y
).
addRoundedCorner
(
r
,
"rd"
).
lineTo
(
x
+
w
,
y
+
h
-
r
).
addRoundedCorner
(
r
,
"dl"
).
lineTo
(
x
+
r
,
y
+
h
).
addRoundedCorner
(
r
,
"lu"
).
lineTo
(
x
,
y
+
r
).
addRoundedCorner
(
r
,
"ur"
).
andClose
();
}
return
this
.
path
({
stroke
:
"#000"
}).
moveTo
(
x
,
y
).
lineTo
(
x
+
w
,
y
).
lineTo
(
x
+
w
,
y
+
h
).
lineTo
(
x
,
y
+
h
).
andClose
();
};
C
.
drawGrid
=
function
(
x
,
y
,
w
,
h
,
wv
,
hv
,
color
)
{
C
.
drawGrid
=
function
(
x
,
y
,
w
,
h
,
wv
,
hv
,
color
)
{
color
=
color
||
"#000"
;
color
=
color
||
"#000"
;
var
p
=
this
.
path
({
stroke
:
color
,
"stroke-width"
:
1
})
var
p
=
this
.
path
({
stroke
:
color
,
"stroke-width"
:
1
})
...
...
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