Commit 1a00e9ce authored by Piotr Gawron's avatar Piotr Gawron
Browse files

click on reaction surface fixed

parent d00f7856
......@@ -634,6 +634,7 @@ AbstractCustomMap.prototype._showSelectedLayout = function (layoutId, index, len
return Promise.each(layoutReactions, function (layoutReaction) {
if (layoutReaction.getModelId() === self.getId()) {
return self.getModel().getReactionById(layoutReaction.getId()).then(function (reactionData) {
var surface;
var element = new IdentifiedElement(reactionData);
return ReactionSurface.create({
layoutReaction: layoutReaction,
......@@ -645,7 +646,8 @@ AbstractCustomMap.prototype._showSelectedLayout = function (layoutId, index, len
return self.getTopMap().callListeners("onBioEntityClick", element);
}],
customized: (length === 1)
}).then(function(surface){
}).then(function(result){
surface = result;
self.selectedLayoutOverlays[layoutId].push(surface);
surface.show();
});
......
......@@ -1324,7 +1324,8 @@ CustomMap.prototype.createSurfaceForDbOverlay = function (element, dbOverlay) {
}, function () {
return self.callListeners("onBioEntityClick", element);
}]
}).then(function(result){
}).then(function(surface){
result = surface;
result.show();
dbOverlay.mapOverlays[element.getType()][element.getId()] = result;
return result;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment