Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

removing the cells at zero

  • Loading branch information...
commit 07fa7de6ce83258f6094e6e356fa17b5f52063cc 1 parent 9780462
@twoerth authored
Showing with 18 additions and 16 deletions.
  1. +18 −16 mock/d3reach/script.js
View
34 mock/d3reach/script.js
@@ -98,22 +98,24 @@ $( function() {
}
json['data'].forEach( function( edge ) {
- edges.push({
- "type": "Feature",
- "properties": {
- 'weights': edge['weights']
- },
- "geometry": {
- "type":"Polygon",
- "coordinates": [[
- [ edge['ul_lon'], edge['ul_lat'] ],
- [ edge['lr_lon'], edge['ul_lat'] ],
- [ edge['lr_lon'], edge['lr_lat'] ],
- [ edge['ul_lon'], edge['lr_lat'] ],
- [ edge['ul_lon'], edge['ul_lat'] ]
- ]]
- }
- });
+ if( indexes( edge, 0 ) > 0 ) {
+ edges.push({
+ "type": "Feature",
+ "properties": {
+ 'weights': edge['weights']
+ },
+ "geometry": {
+ "type":"Polygon",
+ "coordinates": [[
+ [ edge['ul_lon'], edge['ul_lat'] ],
+ [ edge['lr_lon'], edge['ul_lat'] ],
+ [ edge['lr_lon'], edge['lr_lat'] ],
+ [ edge['ul_lon'], edge['lr_lat'] ],
+ [ edge['ul_lon'], edge['ul_lat'] ]
+ ]]
+ }
+ });
+ }
});
paths['connectivity'].selectAll('path')
.data( edges )
Please sign in to comment.
Something went wrong with that request. Please try again.