Commit 9fd106f2993a0f2205cacd219d09c7491058af72

Authored by Nikita Kulshreshtha
1 parent bdc1e0e0

removing everything from canavs div

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -911,7 +911,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
911 911 if ($scope.ColoredImageSRC != null && $scope.ColoredImageSRC.length > 0) {
912 912 $scope.ColoredImageSRC = null;
913 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 922 else {
917 923 $scope.ColoredImageSRC = [];
... ... @@ -7903,8 +7909,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo
7903 7909 $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber));
7904 7910  
7905 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 7920 //9.
7910 7921 $timeout(function () {
... ...