-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This removes the duplicate capitals.json and just references the file from the reprojection example. This adds a very basic test for the vtkjs point feature. It really only tests that the canvas is created.
- Loading branch information
Showing
9 changed files
with
75 additions
and
75 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
{ | ||
"title": "VTK.js", | ||
"title": "Use VTK.js along with GeoJS", | ||
"exampleJs": ["main.js"], | ||
"about": { | ||
"text": "Show state capitals as points using the vtkjs renderer." | ||
} | ||
"text": "Show national capitals as points using the vtkjs renderer." | ||
}, | ||
"disabled": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
var $ = require('jquery'); | ||
var createMap = require('../test-utils').createMap; | ||
var destroyMap = require('../test-utils').destroyMap; | ||
var waitForIt = require('../test-utils').waitForIt; | ||
|
||
/* This is a basic integration test of geo.gvtkjs.pointFeature. */ | ||
describe('geo.vtkjs.pointFeature', function () { | ||
var testPoints = [ | ||
{x: 20, y: 10}, {x: 25, y: 10}, {x: 30, y: 10}, {x: 35, y: 12}, | ||
{x: 32, y: 15}, {x: 30, y: 20}, {x: 35, y: 22}, {x: 32, y: 25}, | ||
{x: 30, y: 30}, {x: 35, y: 32}, {x: 32, y: 35}, {x: 30, y: 30}, | ||
{x: 40, y: 20, radius: 10}, {x: 42, y: 20, radius: 5}, | ||
{x: 44, y: 20, radius: 2}, {x: 46, y: 20, radius: 2}, | ||
{x: 50, y: 10}, {x: 50, y: 10}, {x: 60, y: 10} | ||
]; | ||
|
||
var map, layer, point, calledRadius; | ||
it('basic usage', function () { | ||
map = createMap(); | ||
layer = map.createLayer('feature', {renderer: 'vtkjs'}); | ||
point = layer.createFeature('point', { | ||
style: { | ||
strokeWidth: 2, | ||
radius: function (d) { | ||
calledRadius = true; | ||
return d.radius ? d.radius : 5; | ||
} | ||
} | ||
}).data(testPoints); | ||
point.draw(); | ||
expect($('#map div canvas').length).toBe(1); | ||
}); | ||
waitForIt('points to be generated', function () { | ||
return calledRadius; | ||
}); | ||
it('exit', function () { | ||
destroyMap(); | ||
expect(true).toBe(true); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters