Skip to content

Commit

Permalink
if id is not found in tableContent use element id
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Kruse committed Sep 20, 2017
1 parent 9e5fb4d commit c7f9a71
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion js/Map/MapDataSource.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,12 @@ MapDataSource.prototype = {
var newCircle = {};
newCircle["elements"] = [];
for (var element in circle["elements"]){
newCircle["elements"].push(circle["elements"][element]["tableContent"]["id"]);
var thisElement = circle["elements"][element];
var id = thisElement["tableContent"]["id"];
if (typeof id === "undefined"){
id = thisElement["id"];
}
newCircle["elements"].push(id);
}
newCircle.originX = circle.originX;
newCircle.originY = circle.originY;
Expand Down

0 comments on commit c7f9a71

Please sign in to comment.