From 13c77858bc5c92e03790ac0a2cb239cccbb946c5 Mon Sep 17 00:00:00 2001 From: nikita Date: Thu, 8 Mar 2018 15:15:31 +0530 Subject: [PATCH] invisible issue is fixed --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js index 807cc2c..e46c749 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js @@ -539,11 +539,22 @@ function ($scope, $rootScope, pages, log, $http,$timeout, DataService, $filter, $.each(Options, function (inx, value2) { if (Options[inx].BoxName == id.split('-')[1]) { if ($scope.DraggedList != null) { - $.each($scope.DraggedList, function (inx1, value3) { - if ($scope.DraggedList[inx1].Value == dataText) { - $scope.DraggedList.splice(inx1, 1); + //$.each($scope.DraggedList, function (inx1, value3) { + // if ($scope.DraggedList[inx1].Value == dataText) { + // $scope.DraggedList.splice(inx1, 1); + // } + //}); + for (var i = 0; i <= $scope.DraggedList.length - 1; i++) { + + if ($scope.DraggedList[i].Value == undefined) { + i = 0; + continue; } - }); + + if ($scope.DraggedList[i].Value == dataText) { + $scope.DraggedList.splice(i, 1); + } + } } // $scope.UserAttempt.push({ "BlankBoxName": id.split('-')[1], "OptionName": $scope.dragableId.split('-')[1] }); //$scope.UserAttempt.push({ balnkBox: +$scope.dragableId.split('-')[1] }); -- libgit2 0.21.4