diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 1b20c90..e547bb0 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -854,15 +854,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.modestyImageInfo = []; // annotation toolbar canvas - //history code - - if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) { - var ATBarHtml = $("#canvasDiv").append(''); - $compile(ATBarHtml)($scope); - $scope.onDrawingCanvasClick(); - // $rootScope.FreeStylePaint(); - - } + $scope.terminateCurrentlyRunningWPs(); @@ -927,6 +919,16 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo $scope.ColoredImageSRC = []; } + //history code + + if ($("#canvasDiv").find("canvas[id='canvasPaint']").length == 0) { + var ATBarHtml = $("#canvasDiv").append(''); + $compile(ATBarHtml)($scope); + $scope.onDrawingCanvasClick(); + // $rootScope.FreeStylePaint(); + + } + if ($scope.bodyRegionCoordinates != null || $scope.bodyRegionCoordinates != undefined) { angular.forEach($scope.bodyRegionCoordinates, function (value, key) {