Commit d9e0fd1c47abd139ff481a44138876b3a22b730f
Merge branch 'Bug#13665' into Develop
Showing
1 changed file
with
14 additions
and
3 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -911,7 +911,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -911,7 +911,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
911 | if ($scope.ColoredImageSRC != null && $scope.ColoredImageSRC.length > 0) { | 911 | if ($scope.ColoredImageSRC != null && $scope.ColoredImageSRC.length > 0) { |
912 | $scope.ColoredImageSRC = null; | 912 | $scope.ColoredImageSRC = null; |
913 | $scope.ColoredImageSRC = []; | 913 | $scope.ColoredImageSRC = []; |
914 | - $scope.flushCanvas(); | 914 | + //remove existing body view |
915 | + var canDiv = document.getElementById('canvasDiv'); | ||
916 | + var canDivChildCount = canDiv.childElementCount; | ||
917 | + if (canDivChildCount > 0) { | ||
918 | + canDiv.innerHTML = ''; | ||
919 | + } | ||
920 | + // $scope.flushCanvas(); | ||
915 | } | 921 | } |
916 | else { | 922 | else { |
917 | $scope.ColoredImageSRC = []; | 923 | $scope.ColoredImageSRC = []; |
@@ -7874,8 +7880,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -7874,8 +7880,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
7874 | $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); | 7880 | $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); |
7875 | 7881 | ||
7876 | //8.remove current layer canavses | 7882 | //8.remove current layer canavses |
7877 | - $scope.flushCanvas(); | ||
7878 | - | 7883 | + // $scope.flushCanvas(); |
7884 | + //remove existing body view | ||
7885 | + var canDiv = document.getElementById('canvasDiv'); | ||
7886 | + var canDivChildCount = canDiv.childElementCount; | ||
7887 | + if (canDivChildCount > 0) { | ||
7888 | + canDiv.innerHTML = ''; | ||
7889 | + } | ||
7879 | 7890 | ||
7880 | //9. | 7891 | //9. |
7881 | $timeout(function () { | 7892 | $timeout(function () { |