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

ReactionOverlay should require layout data

parent 29d802b4
No related branches found
No related tags found
1 merge request!5Frontend refactor
......@@ -36,15 +36,16 @@ function ReactionOverlay(layoutReaction, reactionData, map, customized, id) {
this.customized = customized;
if (layoutReaction === undefined || layoutReaction === null || reactionData === undefined || reactionData === null) {
if (reactionData === undefined || reactionData === null) {
throw new Error("Reaction must be defined");
}
if (layoutReaction.width) {
this.width = layoutReaction.width;
if (layoutReaction !== undefined && layoutReaction !== null) {
if (layoutReaction.width) {
this.width = layoutReaction.width;
}
this.color = functions.overlayToColor(layoutReaction);
}
this.color = functions.overlayToColor(layoutReaction);
this.init();
this._id = reactionData.getId();
}
......
......@@ -364,7 +364,7 @@ describe('CustomMap', function() {
assert.equal(1, markerCount);
}});
this.timeout(30000);
});
it("clearData", function() {
......
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