From 22aa97d399972fc240722a0d30c7558e67ac047d Mon Sep 17 00:00:00 2001 From: amrita.vishnoi Date: Thu, 22 Jun 2017 17:29:38 +0530 Subject: [PATCH] handled reset for mirror --- 400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+), 0 deletions(-) diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 5167829..ddd1fe9 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -2822,6 +2822,33 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo var prevBRID = 0; if ($rootScope.macthedTermList.length > 0) { + for(var i=0; i<$rootScope.grayImageDataList.length;i++){ + var grayCanvasID = 'imageCanvas' + parseInt(i+1); + var grayCanvas = document.getElementById(grayCanvasID); + + if (grayCanvas != null) { + var grayCanvasContext = grayCanvas.getContext("2d"); + + var canvasHeight = grayCanvas.height; + var canvasWidth = grayCanvas.width; + grayCanvasContext.clearRect(0, 0, canvasHeight, canvasWidth) + grayCanvasContext.putImageData($rootScope.grayImageDataList[parseInt(i)], 0, 0); + } + } + for (var i = 4; i <= $rootScope.grayImageMRDataList.length; i++) { + var grayCanvasMRID = 'imageCanvas' + i+'_MR'; + var grayCanvasMR = document.getElementById(grayCanvasMRID); + + if (grayCanvasMR != null) { + var grayCanvasContextMR = grayCanvasMR.getContext("2d"); + + var canvasHeight = grayCanvasMR.height; + var canvasWidth = grayCanvasMR.width; + grayCanvasContextMR.clearRect(0, 0, canvasHeight, canvasWidth) + grayCanvasContextMR.putImageData($rootScope.grayImageMRDataList[parseInt(i)], 0, 0); + } + } + angular.forEach($rootScope.macthedTermList, function (value, key) { -- libgit2 0.21.4