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
b1c60797
Commit
b1c60797
authored
Jun 21, 2013
by
Dmitry Baranovskiy
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #742 from unel/master
It needs some tweaking, I will fix it.
parents
e5048b7f
a2edf84f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
6 deletions
+30
-6
raphael.core.js
raphael.core.js
+30
-6
No files found.
raphael.core.js
View file @
b1c60797
...
...
@@ -3866,11 +3866,13 @@
= (number) length.
\*/
elproto
.
getTotalLength
=
function
()
{
if
(
this
.
type
!=
"path"
)
{
return
;}
var
path
=
this
.
getPath
();
if
(
!
path
){
return
;
}
if
(
this
.
node
.
getTotalLength
)
{
return
this
.
node
.
getTotalLength
();
}
return
getTotalLength
(
this
.
attrs
.
path
);
return
getTotalLength
(
path
);
};
/*\
* Element.getPointAtLength
...
...
@@ -3890,8 +3892,29 @@
o }
\*/
elproto
.
getPointAtLength
=
function
(
length
)
{
if
(
this
.
type
!=
"path"
)
{
return
;}
return
getPointAtLength
(
this
.
attrs
.
path
,
length
);
var
path
=
this
.
getPath
();
if
(
!
path
){
return
;
}
return
getPointAtLength
(
path
,
length
);
};
/*\
* Element.getPath
[ method ]
**
* Return path of element. Only works for element of "path" type and simple elements like "circle".
**
\*/
elproto
.
getPath
=
function
()
{
var
path
;
if
(
this
.
type
===
"path"
)
{
path
=
this
.
attrs
.
path
}
else
if
(
R
.
_getPath
[
this
.
type
]
instanceof
Function
)
{
path
=
R
.
_getPath
[
this
.
type
](
this
);
}
return
path
;
};
/*\
* Element.getSubpath
...
...
@@ -3907,8 +3930,9 @@
= (string) pathstring for the segment
\*/
elproto
.
getSubpath
=
function
(
from
,
to
)
{
if
(
this
.
type
!=
"path"
)
{
return
;}
return
R
.
getSubpath
(
this
.
attrs
.
path
,
from
,
to
);
var
path
=
this
.
getPath
();
if
(
!
path
){
return
;
}
return
R
.
getSubpath
(
path
,
from
,
to
);
};
/*\
* Raphael.easing_formulas
...
...
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