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

asynchronous data overlay visualization might cause problems due to data loading latency

parent 33246d8c
No related branches found
No related tags found
2 merge requests!805Merge 13.1.0 beta.1,!804Resolve "MINERVANET - Error Report 74"
Pipeline #10552 canceled
......@@ -31,6 +31,8 @@ minerva (12.3.1~beta.1) unstable; urgency=low
* Bug fix: pathways can be drawn using glyphs (#825)
* Bug fix: empty background overlay doesn't show glyphs, instead standard
visualization is used (#826)
* Bug fix: asynchronous cals on showing/hiding data overlays might cause
problems due to network latency (#830)
minerva (13.1.0~beta.0) unstable; urgency=low
* Feature: annotators are more flexible - you can define set of input and
......
......@@ -177,7 +177,11 @@ AliasSurface.prototype.setBoundsForAlias = function (startX, endX) {
var pointB = new Point(alias.getX() + endX * alias.getWidth(), alias.getY() + alias.getHeight());
var bounds = new Bounds(pointA, pointB);
this.getMapCanvasObjects()[0].setBounds(bounds);
var mapCanvasObjects = this.getMapCanvasObjects();
for (var i = 0; i < mapCanvasObjects.length; i++) {
mapCanvasObjects[i].setBounds(bounds);
}
};
/**
......
......@@ -61,11 +61,30 @@ describe('AliasSurface', function () {
var bounds = surface.getBounds();
surface.setBoundsForAlias(1, 3);
var bounds2 = surface.getBounds();
assert.equal(bounds.getRightBottom().y, bounds2.getRightBottom().y);
assert.equal(bounds.getRightBottom().y, bounds2.getRightBottom().y, helper.EPSILON);
assert.ok(bounds.getRightBottom().x !== bounds2.getRightBottom().x);
});
});
it("before alias init", function () {
var map;
var alias, surface;
return ServerConnector.getProject().then(function (project) {
map = helper.createCustomMap(project);
return map.getModel().getAliasById(329171);
}).then(function (result) {
alias = result;
surface = new AliasSurface({
alias: result,
overlayData: [helper.createLayoutAlias(alias)],
map: map
});
surface.setBoundsForAlias(1, 3);
var bounds = surface.getBounds();
assert.ok(bounds);
});
});
it("from element with data overlay", function () {
var map = helper.createCustomMap();
var alias = helper.createAlias(map);
......
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