From 9fd106f2993a0f2205cacd219d09c7491058af72 Mon Sep 17 00:00:00 2001 From: nikita Date: Thu, 9 Feb 2017 15:28:11 +0530 Subject: [PATCH] removing everything from canavs div --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 275d64d..b18396d 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -911,7 +911,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo if ($scope.ColoredImageSRC != null && $scope.ColoredImageSRC.length > 0) { $scope.ColoredImageSRC = null; $scope.ColoredImageSRC = []; - $scope.flushCanvas(); + //remove existing body view + var canDiv = document.getElementById('canvasDiv'); + var canDivChildCount = canDiv.childElementCount; + if (canDivChildCount > 0) { + canDiv.innerHTML = ''; + } + // $scope.flushCanvas(); } else { $scope.ColoredImageSRC = []; @@ -7903,8 +7909,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.layerNumber)); //8.remove current layer canavses - $scope.flushCanvas(); - + // $scope.flushCanvas(); + //remove existing body view + var canDiv = document.getElementById('canvasDiv'); + var canDivChildCount = canDiv.childElementCount; + if (canDivChildCount > 0) { + canDiv.innerHTML = ''; + } //9. $timeout(function () { -- libgit2 0.21.4