Skip to content

Commit

Permalink
DROTH-3109 improvements based on comments
Browse files Browse the repository at this point in the history
  • Loading branch information
SWJPTulijoki committed Apr 27, 2022
1 parent 660d603 commit 9df78c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion UI/src/model/selectedLaneModelling.js
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@

//expiredLane could be modified by the user so we need to fetch the original
var originalExpiredLane = _.find(lanesFetched, {'id': expiredLane.id});
if (linksSelected.length > 1 && marker === undefined) {
if (linksSelected.length > 1 && _.isUndefined(marker)) {
var expiredGroup = collection.getGroup(originalExpiredLane);
expiredGroup.forEach(function (lane) {
lane.isExpired = true;
Expand Down
1 change: 1 addition & 0 deletions UI/src/view/linear_asset/laneModellingLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

var LinearAssetCutter = function(eventListener, vectorLayer) {
var scissorFeatures = [];
//Max euclidean distance in geometry points allowed between mouse point and the closest linear asset point (the planned cut point).
var CUT_THRESHOLD = 5;
var vectorSource = vectorLayer.getSource();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,7 @@ trait LaneOperations {
}

//Get multiple lanes in one link
val resultWithMultiLanesInLink = newLanes.filter(lane => lane.isExpired != true && lane.id == 0).foldLeft(resultWithDeleteActions) {
val resultWithMultiLanesInLink = newLanes.filter(_.id == 0).foldLeft(resultWithDeleteActions) {
(result, newLane) =>
val newLaneCode: Int = getPropertyValue(newLane.properties, "lane_code").toString.toInt

Expand Down

0 comments on commit 9df78c7

Please sign in to comment.