Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
MUR Drupal
d3-library
Commits
cf4c17ad
Commit
cf4c17ad
authored
May 20, 2013
by
Mike Bostock
Browse files
Revert cache of projection stream.
parent
ab3149e9
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
19 deletions
+10
-19
d3.js
d3.js
+3
-9
d3.min.js
d3.min.js
+1
-1
src/geo/path.js
src/geo/path.js
+6
-9
No files found.
d3.js
View file @
cf4c17ad
...
...
@@ -3633,12 +3633,9 @@ d3 = function() {
return
stream
;
}
d3
.
geo
.
path
=
function
()
{
var
pointRadius
=
4.5
,
projection
,
context
,
projectStream
,
contextStream
,
objectStream
;
var
pointRadius
=
4.5
,
projection
,
context
,
projectStream
,
contextStream
;
function
path
(
object
)
{
if
(
object
)
{
if
(
typeof
pointRadius
===
"
function
"
)
contextStream
.
pointRadius
(
+
pointRadius
.
apply
(
this
,
arguments
));
d3
.
geo
.
stream
(
object
,
objectStream
);
}
if
(
object
)
d3
.
geo
.
stream
(
object
,
projectStream
(
contextStream
.
pointRadius
(
typeof
pointRadius
===
"
function
"
?
+
pointRadius
.
apply
(
this
,
arguments
)
:
pointRadius
)));
return
contextStream
.
result
();
}
path
.
area
=
function
(
object
)
{
...
...
@@ -3659,19 +3656,16 @@ d3 = function() {
path
.
projection
=
function
(
_
)
{
if
(
!
arguments
.
length
)
return
projection
;
projectStream
=
(
projection
=
_
)
?
_
.
stream
||
d3_geo_pathProjectStream
(
_
)
:
d3_identity
;
objectStream
=
projectStream
(
contextStream
);
return
path
;
};
path
.
context
=
function
(
_
)
{
if
(
!
arguments
.
length
)
return
context
;
contextStream
=
(
context
=
_
)
==
null
?
new
d3_geo_pathBuffer
()
:
new
d3_geo_pathContext
(
_
);
objectStream
=
projectStream
(
contextStream
);
return
path
;
};
path
.
pointRadius
=
function
(
_
)
{
if
(
!
arguments
.
length
)
return
pointRadius
;
pointRadius
=
typeof
_
===
"
function
"
?
_
:
(
_
=
+
_
,
contextStream
.
pointRadius
(
_
),
_
);
pointRadius
=
typeof
_
===
"
function
"
?
_
:
+
_
;
return
path
;
};
return
path
.
projection
(
d3
.
geo
.
albersUsa
()).
context
(
null
);
...
...
d3.min.js
View file @
cf4c17ad
This diff is collapsed.
Click to expand it.
src/geo/path.js
View file @
cf4c17ad
...
...
@@ -19,14 +19,13 @@ d3.geo.path = function() {
projection
,
context
,
projectStream
,
contextStream
,
objectStream
;
contextStream
;
function
path
(
object
)
{
if
(
object
)
{
if
(
typeof
pointRadius
===
"
function
"
)
contextStream
.
pointRadius
(
+
pointRadius
.
apply
(
this
,
arguments
));
d3
.
geo
.
stream
(
object
,
objectStream
);
}
if
(
object
)
d3
.
geo
.
stream
(
object
,
projectStream
(
contextStream
.
pointRadius
(
typeof
pointRadius
===
"
function
"
?
+
pointRadius
.
apply
(
this
,
arguments
)
:
pointRadius
)));
return
contextStream
.
result
();
}
...
...
@@ -51,20 +50,18 @@ d3.geo.path = function() {
path
.
projection
=
function
(
_
)
{
if
(
!
arguments
.
length
)
return
projection
;
projectStream
=
(
projection
=
_
)
?
_
.
stream
||
d3_geo_pathProjectStream
(
_
)
:
d3_identity
;
objectStream
=
projectStream
(
contextStream
);
return
path
;
};
path
.
context
=
function
(
_
)
{
if
(
!
arguments
.
length
)
return
context
;
contextStream
=
(
context
=
_
)
==
null
?
new
d3_geo_pathBuffer
:
new
d3_geo_pathContext
(
_
);
objectStream
=
projectStream
(
contextStream
);
return
path
;
};
path
.
pointRadius
=
function
(
_
)
{
if
(
!
arguments
.
length
)
return
pointRadius
;
pointRadius
=
typeof
_
===
"
function
"
?
_
:
(
_
=
+
_
,
contextStream
.
pointRadius
(
_
),
_
)
;
pointRadius
=
typeof
_
===
"
function
"
?
_
:
+
_
;
return
path
;
};
...
...
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