Skip to content
Snippets Groups Projects
Commit 17d5c0e0 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

reponses from new API

parent 976bae88
No related branches found
No related tags found
No related merge requests found
Showing
with 18 additions and 18 deletions
......@@ -47,22 +47,22 @@ describe('OverviewDialog', function () {
describe('openLink', function () {
it('link to map', function () {
helper.setUrl("http://test/?id=complex_model_with_images");
var dialog;
return ServerConnector.getProject().then(function (project) {
var map = helper.createCustomMap(project);
var dialog = new OverviewDialog({
dialog = new OverviewDialog({
element: testDiv,
customMap: map
});
var link = project.getOverviewImages()[0].links[0];
assert.equal(link.type, "OverviewModelLink");
dialog.openLink({
type: "OverviewModelLink",
modelLinkId: map.getId(),
latLng: new google.maps.LatLng(1, 34)
});
dialog.openLink(link);
assert.equal(logger.getWarnings().length, 0);
assert.equal(1, map.getGoogleMap().getCenter().lat());
assert.equal(34, map.getGoogleMap().getCenter().lng());
assert.ok(link.modelPoint.x - ServerConnector.getSessionData().getCenter(map.getModel()).x < helper.EPSILON);
assert.ok(link.modelPoint.y - ServerConnector.getSessionData().getCenter(map.getModel()).y < helper.EPSILON);
}).finally(function () {
dialog.destroy();
});
});
......
{"version":"","disease":null,"organism":null,"idObject":18115,"status":"Ok","directory":"fbdbe43de73fe38f62889b89cb863adb","progress":100.0,"notifyEmail":"","warnings":true,"errors":false,"name":"UNKNOWN DISEASE MAP","projectId":"complex_model_with_images","overviewImageViews":[{"idObject":1261,"filename":"fbdbe43de73fe38f62889b89cb863adb/sub_image.png","width":963,"height":639,"links":[{"idObject":2369,"polygon":[{"x":200.0,"y":200.0},{"x":200.0,"y":400.0},{"x":400.0,"y":400.0},{"x":400.0,"y":200.0}],"zoomLevel":1,"latLng":{"lat":84.89177465079632,"lng":-161.8181818181818},"modelLinkId":19397,"imageLinkId":null,"query":null,"type":"OverviewModelLink"}]},{"idObject":1262,"filename":"fbdbe43de73fe38f62889b89cb863adb/test.png","width":963,"height":639,"links":[{"idObject":2370,"polygon":[{"x":10.0,"y":10.0},{"x":100.0,"y":10.0},{"x":100.0,"y":100.0},{"x":10.0,"y":100.0}],"zoomLevel":null,"latLng":null,"modelLinkId":null,"imageLinkId":1261,"query":null,"type":"OverviewImageLink"},{"idObject":2371,"polygon":[{"x":200.0,"y":200.0},{"x":200.0,"y":400.0},{"x":400.0,"y":400.0},{"x":400.0,"y":200.0}],"zoomLevel":0,"latLng":{"lat":84.89177465079632,"lng":-178.1818181818182},"modelLinkId":19397,"imageLinkId":null,"query":null,"type":"OverviewModelLink"}]}],"topOverviewImage":{"idObject":1262,"filename":"fbdbe43de73fe38f62889b89cb863adb/test.png","width":963,"height":639,"links":[{"idObject":2370,"polygon":[{"x":10.0,"y":10.0},{"x":100.0,"y":10.0},{"x":100.0,"y":100.0},{"x":10.0,"y":100.0}],"zoomLevel":null,"latLng":null,"modelLinkId":null,"imageLinkId":1261,"query":null,"type":"OverviewImageLink"},{"idObject":2371,"polygon":[{"x":200.0,"y":200.0},{"x":200.0,"y":400.0},{"x":400.0,"y":400.0},{"x":400.0,"y":200.0}],"zoomLevel":0,"latLng":{"lat":84.89177465079632,"lng":-178.1818181818182},"modelLinkId":19397,"imageLinkId":null,"query":null,"type":"OverviewModelLink"}]}}
\ No newline at end of file
{"version":"","disease":null,"organism":null,"idObject":18115,"status":"Ok","directory":"fbdbe43de73fe38f62889b89cb863adb","progress":100.0,"notifyEmail":"","warnings":true,"errors":false,"name":"UNKNOWN DISEASE MAP","projectId":"complex_model_with_images","overviewImageViews":[{"idObject":1261,"filename":"fbdbe43de73fe38f62889b89cb863adb/sub_image.png","width":963,"height":639,"links":[{"idObject":2369,"polygon":[{"x":200.0,"y":200.0},{"x":200.0,"y":400.0},{"x":400.0,"y":400.0},{"x":400.0,"y":200.0}],"zoomLevel":1,"modelPoint":{"x":100.0,"y":10.0},"modelLinkId":19397,"type":"OverviewModelLink"}]},{"idObject":1262,"filename":"fbdbe43de73fe38f62889b89cb863adb/test.png","width":963,"height":639,"links":[{"idObject":2370,"polygon":[{"x":10.0,"y":10.0},{"x":100.0,"y":10.0},{"x":100.0,"y":100.0},{"x":10.0,"y":100.0}],"imageLinkId":1261,"type":"OverviewImageLink"},{"idObject":2371,"polygon":[{"x":200.0,"y":200.0},{"x":200.0,"y":400.0},{"x":400.0,"y":400.0},{"x":400.0,"y":200.0}],"zoomLevel":0,"modelPoint":{"x":10.0,"y":10.0},"modelLinkId":19397,"type":"OverviewModelLink"}]}],"topOverviewImage":{"idObject":1262,"filename":"fbdbe43de73fe38f62889b89cb863adb/test.png","width":963,"height":639,"links":[{"idObject":2370,"polygon":[{"x":10.0,"y":10.0},{"x":100.0,"y":10.0},{"x":100.0,"y":100.0},{"x":10.0,"y":100.0}],"imageLinkId":1261,"type":"OverviewImageLink"},{"idObject":2371,"polygon":[{"x":200.0,"y":200.0},{"x":200.0,"y":400.0},{"x":400.0,"y":400.0},{"x":400.0,"y":200.0}],"zoomLevel":0,"modelPoint":{"x":10.0,"y":10.0},"modelLinkId":19397,"type":"OverviewModelLink"}]}}
\ No newline at end of file
source diff could not be displayed: it is too large. Options to address this: view the blob.
["nadh"]
\ No newline at end of file
[]
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment