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
8fa2f326
authored
Feb 10, 2013
by
Tomas Alabes
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #667 from tomasAlabes/master
Clone and set construction fix
parents
2c36cf67
124b0646
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
raphael.js
+9
-3
No files found.
raphael.js
View file @
8fa2f326
...
...
@@ -425,6 +425,10 @@
text
:
function
(
el
)
{
var
bbox
=
el
.
_getBBox
();
return
rectPath
(
bbox
.
x
,
bbox
.
y
,
bbox
.
width
,
bbox
.
height
);
},
set
:
function
(
el
)
{
var
bbox
=
el
.
_getBBox
();
return
rectPath
(
bbox
.
x
,
bbox
.
y
,
bbox
.
width
,
bbox
.
height
);
}
},
...
...
@@ -1297,7 +1301,7 @@
var
pathDimensions
=
R
.
pathBBox
=
function
(
path
)
{
var
pth
=
paths
(
path
);
if
(
pth
.
bbox
)
{
return
pth
.
bbox
;
return
clone
(
pth
.
bbox
)
;
}
if
(
!
path
)
{
return
{
x
:
0
,
y
:
0
,
width
:
0
,
height
:
0
,
x2
:
0
,
y2
:
0
};
...
...
@@ -2504,6 +2508,8 @@
!
R
.
is
(
itemsArray
,
"array"
)
&&
(
itemsArray
=
Array
.
prototype
.
splice
.
call
(
arguments
,
0
,
arguments
.
length
));
var
out
=
new
Set
(
itemsArray
);
this
.
__set__
&&
this
.
__set__
.
push
(
out
);
out
[
"paper"
]
=
this
;
out
[
"type"
]
=
"set"
;
return
out
;
};
...
...
@@ -3547,7 +3553,7 @@
};
};
setproto
.
clone
=
function
(
s
)
{
s
=
new
Set
;
s
=
this
.
paper
.
set
()
;
for
(
var
i
=
0
,
ii
=
this
.
items
.
length
;
i
<
ii
;
i
++
)
{
s
.
push
(
this
.
items
[
i
].
clone
());
}
...
...
@@ -3557,7 +3563,7 @@
return
"Rapha\xebl\u2018s set"
;
};
R
.
registerFont
=
function
(
font
)
{
if
(
!
font
.
face
)
{
return
font
;
...
...
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