From a59fcb7a5b8bb6a27bc4c3c8bac16dc1664bb8ad Mon Sep 17 00:00:00 2001 From: nikita Date: Mon, 20 Mar 2017 17:45:01 +0530 Subject: [PATCH] in some case colresImageSRC was undefind so its not removing childs. --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 18427f7..630a4ce 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -919,15 +919,19 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo .where('_ViewOrientationId == ' + viewOrientationId) .select(); + + + //remove existing body view + var canDiv = document.getElementById('canvasDiv'); + var canDivChildCount = canDiv.childElementCount; + if (canDivChildCount > 0) { + canDiv.innerHTML = ''; + } + if ($scope.ColoredImageSRC != null && $scope.ColoredImageSRC.length > 0) { $scope.ColoredImageSRC = null; $scope.ColoredImageSRC = []; - //remove existing body view - var canDiv = document.getElementById('canvasDiv'); - var canDivChildCount = canDiv.childElementCount; - if (canDivChildCount > 0) { - canDiv.innerHTML = ''; - } + // $scope.flushCanvas(); } else { -- libgit2 0.21.4