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
c5c0b6ea
authored
Aug 31, 2015
by
Tomas Alabes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Should I remove the stroke adjustments and relay on non-scaling-stroke?
parent
757b8285
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
19 deletions
+12
-19
dev/raphael.svg.js
+0
-15
dev/raphaelTest.html
+12
-4
No files found.
dev/raphael.svg.js
View file @
c5c0b6ea
...
...
@@ -474,9 +474,6 @@
}
break
;
case
"stroke-width"
:
if
(
o
.
_
.
sx
!=
1
||
o
.
_
.
sy
!=
1
)
{
value
/=
mmax
(
abs
(
o
.
_
.
sx
),
abs
(
o
.
_
.
sy
))
||
1
;
}
node
.
setAttribute
(
att
,
value
);
if
(
attrs
[
"stroke-dasharray"
])
{
addDashes
(
o
,
attrs
[
"stroke-dasharray"
],
params
);
...
...
@@ -864,11 +861,6 @@
this
.
pattern
&&
updatePosition
(
this
);
this
.
node
&&
$
(
this
.
node
,
{
transform
:
this
.
matrix
});
if
(
_
.
sx
!=
1
||
_
.
sy
!=
1
)
{
var
sw
=
this
.
attrs
[
has
](
"stroke-width"
)
?
this
.
attrs
[
"stroke-width"
]
:
1
;
this
.
attr
({
"stroke-width"
:
sw
});
}
//Reduce transform string
_
.
transform
=
this
.
matrix
.
toTransformString
();
...
...
@@ -1335,13 +1327,6 @@
viewBox
:
vb
,
preserveAspectRatio
:
aspectRatio
});
while
(
size
&&
top
)
{
sw
=
"stroke-width"
in
top
.
attrs
?
top
.
attrs
[
"stroke-width"
]
:
1
;
top
.
attr
({
"stroke-width"
:
sw
});
top
.
_
.
dirty
=
1
;
top
.
_
.
dirtyT
=
1
;
top
=
top
.
prev
;
}
this
.
_viewBox
=
[
x
,
y
,
w
,
h
,
!!
fit
];
return
this
;
};
...
...
dev/raphaelTest.html
View file @
c5c0b6ea
...
...
@@ -9,22 +9,30 @@
<!-- To work with full version -->
<!--<script type="text/javascript" src="../raphael.js"></script>-->
<script
type=
"text/javascript"
src=
"eve.js"
></script>
<script
type=
"text/javascript"
src=
"raphael.core.js"
></script>
<script
type=
"text/javascript"
src=
"raphael.vml.js"
></script>
<script
type=
"text/javascript"
src=
"raphael.svg.js"
></script>
<!-- To work with minified version -->
<!--<script type="text/javascript" src="../raphael-min.js"></script>-->
<!-- Comment this script tag if you are testing with AMD -->
<
!--<
script type="text/javascript">
<script
type=
"text/javascript"
>
// Initialize container when document is loaded
window
.
onload
=
function
()
{
paper
=
Raphael
(
0
,
0
,
640
,
720
,
"container"
);
paper.circle(100, 100, 100); //example
paper
.
circle
(
50
,
50
,
20
).
attr
({
'stroke-width'
:
2
});
//example
paper
.
circle
(
70
,
70
,
20
).
attr
({
'stroke-width'
:
2
}).
transform
(
"s2"
);
//example
paper
.
setViewBox
(
0
,
0
,
100
,
100
);
//Different strokes -> http://www.w3.org/TR/SVGTiny12/painting.html#NonScalingStroke
};
//Work here, in a separate script file or via command line
</script>
-->
</script>
<!-- Use amdDev.js to work with AMD and Raphael -->
<!-- You need to do a 'bower install -D' first to get requirejs -->
<
script
data-main=
"amdDev"
src=
"../bower_components/requirejs/require.js"
></script
>
<
!--<script data-main="amdDev" src="../bower_components/requirejs/require.js"></script>--
>
</head>
<body>
...
...
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