Commit 9fd106f2993a0f2205cacd219d09c7491058af72
1 parent
bdc1e0e0
removing everything from canavs div
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 = []; |
@@ -7903,8 +7909,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -7903,8 +7909,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
7903 | $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); | 7909 | $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); |
7904 | 7910 | ||
7905 | //8.remove current layer canavses | 7911 | //8.remove current layer canavses |
7906 | - $scope.flushCanvas(); | ||
7907 | - | 7912 | + // $scope.flushCanvas(); |
7913 | + //remove existing body view | ||
7914 | + var canDiv = document.getElementById('canvasDiv'); | ||
7915 | + var canDivChildCount = canDiv.childElementCount; | ||
7916 | + if (canDivChildCount > 0) { | ||
7917 | + canDiv.innerHTML = ''; | ||
7918 | + } | ||
7908 | 7919 | ||
7909 | //9. | 7920 | //9. |
7910 | $timeout(function () { | 7921 | $timeout(function () { |