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 {