Commit 3888327eaf8867889a2edf14bb9db99d28c23401

Authored by Birendra
1 parent 7b369995

fix panel resize issue

400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
@@ -1062,7 +1062,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1062,7 +1062,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1062 theme: 'success', 1062 theme: 'success',
1063 currentController: 'CAController', 1063 currentController: 'CAController',
1064 parentSlug: $scope.GetCAwindowStoreData(windowviewid, 'parentSlugName'), 1064 parentSlug: $scope.GetCAwindowStoreData(windowviewid, 'parentSlugName'),
1065 - content: '<script src="' + playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo_' + windowviewid + '").pause();$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibityCA(event); });});</script>' + 1065 + content: '<script src="' + playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo_' + windowviewid + '").pause();$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");}else{$(this).text("Text Off");} GetTextVisibityCA(event); });});</script>' +
1066 '<div id="pid" class="row"><div id="divplayerinlineVideo_' + windowviewid + '" class="col-sm-12" align="center" width="640" height="480"><video width="100%" height="400"' + 1066 '<div id="pid" class="row"><div id="divplayerinlineVideo_' + windowviewid + '" class="col-sm-12" align="center" width="640" height="480"><video width="100%" height="400"' +
1067 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo_' + windowviewid + '" onloadstart="videoOnLoad(event)"' + 1067 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo_' + windowviewid + '" onloadstart="videoOnLoad(event)"' +
1068 ' poster="' + poster + '"' + 1068 ' poster="' + poster + '"' +
@@ -1078,7 +1078,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1078,7 +1078,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1078 ' kind="captions" srclang="en" label="On"><object width="640" height="360"' + 1078 ' kind="captions" srclang="en" label="On"><object width="640" height="360"' +
1079 ' type="application/x-shockwave-flash" data="//vjs.zencdn.net/3.2/video-js.swf"><param name="allowfullscreen" value="true">' + 1079 ' type="application/x-shockwave-flash" data="//vjs.zencdn.net/3.2/video-js.swf"><param name="allowfullscreen" value="true">' +
1080 ' <param name="allowscriptaccess" value="always"><param name="movie" value="//vjs.zencdn.net/3.2/video-js.swf">' + 1080 ' <param name="allowscriptaccess" value="always"><param name="movie" value="//vjs.zencdn.net/3.2/video-js.swf">' +
1081 - ' <param name="flashvars" ng-value="controls=true&amp;file=' + clickedCAVideo + '"><img ng-src="content/images/common/player/frameaccuracy_logo.jpg" style="height:80%;" alt="Here we are" title="No video playback capabilities"></object></video><div class="col-sm-12 well video-subtitle"><div id="sid_' + windowviewid + '" align="left" style="height:60px;overflow-y:scroll !important;-webkit-overflow-scrolling:touch !important;"><p>' + clickedCASummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right" style="position:relative;top:0px">Text Off</button></div></div></div>', 1081 + ' <param name="flashvars" ng-value="controls=true&amp;file=' + clickedCAVideo + '"><img ng-src="content/images/common/player/frameaccuracy_logo.jpg" style="height:80%;" alt="Here we are" title="No video playback capabilities"></object></video><div id="summary_' + windowviewid + '" class="well video-subtitle" style="position:relative;left:0px;height:125px;padding:2px!important;margin-bottom:5px!important;bottom:0px;width:100%""><div id="sid_' + windowviewid + '" align="left" style="height:80px;overflow-y:scroll !important;-webkit-overflow-scrolling:touch !important;"><p>' + clickedCASummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right" style="position:relative;top:2px">Text Off</button></div></div></div>',
  1082 +
1082 1083
1083 title: tittle, 1084 title: tittle,
1084 position: { 1085 position: {
@@ -1132,7 +1133,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1132,7 +1133,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1132 theme: 'success', 1133 theme: 'success',
1133 currentController: 'CAController', 1134 currentController: 'CAController',
1134 parentSlug: $scope.GetCAwindowStoreData(windowviewid, 'parentSlugName'), 1135 parentSlug: $scope.GetCAwindowStoreData(windowviewid, 'parentSlugName'),
1135 - content: '<script src="' + playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo_' + windowviewid + '").pause();$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibityCA(event); });});</script>' + 1136 + content: '<script src="' + playerScript + '"></script><script>$(document).ready(function(){videojs("#playerinlineVideo_' + windowviewid + '").pause();$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");}else{$(this).text("Text Off");} GetTextVisibityCA(event); });});</script>' +
1136 '<div id="pid" class="row"><div id="divplayerinlineVideo_' + windowviewid + '" class="col-sm-12" align="center" width="640" height="480"><video width="100%" height="400"' + 1137 '<div id="pid" class="row"><div id="divplayerinlineVideo_' + windowviewid + '" class="col-sm-12" align="center" width="640" height="480"><video width="100%" height="400"' +
1137 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo_' + windowviewid + '" onloadstart="videoOnLoad(event)"' + 1138 'class="ADAM_Video video-js vjs-default-skin vjs-big-play-centered" type="$videoType" id="playerinlineVideo_' + windowviewid + '" onloadstart="videoOnLoad(event)"' +
1138 ' poster="' + poster + '"' + 1139 ' poster="' + poster + '"' +
@@ -1148,7 +1149,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1148,7 +1149,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1148 ' kind="captions" srclang="en" label="On"><object width="640" height="360"' + 1149 ' kind="captions" srclang="en" label="On"><object width="640" height="360"' +
1149 ' type="application/x-shockwave-flash" data="//vjs.zencdn.net/3.2/video-js.swf"><param name="allowfullscreen" value="true">' + 1150 ' type="application/x-shockwave-flash" data="//vjs.zencdn.net/3.2/video-js.swf"><param name="allowfullscreen" value="true">' +
1150 ' <param name="allowscriptaccess" value="always"><param name="movie" value="//vjs.zencdn.net/3.2/video-js.swf">' + 1151 ' <param name="allowscriptaccess" value="always"><param name="movie" value="//vjs.zencdn.net/3.2/video-js.swf">' +
1151 - ' <param name="flashvars" ng-value="controls=true&amp;file=' + clickedCAVideo + '"><img ng-src="content/images/common/player/frameaccuracy_logo.jpg" style="height:80%;" alt="Here we are" title="No video playback capabilities"></object></video><div class="col-sm-12 well video-subtitle"><div id="sid_' + windowviewid + '" align="left" style="height:60px;overflow-y:scroll !important;-webkit-overflow-scrolling:touch !important;"><p>' + clickedCASummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right" style="position:relative;top:0px">Text Off</button></div></div></div>', 1152 + ' <param name="flashvars" ng-value="controls=true&amp;file=' + clickedCAVideo + '"><img ng-src="content/images/common/player/frameaccuracy_logo.jpg" style="height:80%;" alt="Here we are" title="No video playback capabilities"></object></video><div id="summary_' + windowviewid + '" class="well video-subtitle" style="position:relative;left:0px;height:125px;padding:2px!important;margin-bottom:5px!important;bottom:0px;width:100%""><div id="sid_' + windowviewid + '" align="left" style="height:80px;overflow-y:scroll !important;-webkit-overflow-scrolling:touch !important;"><p>' + clickedCASummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right" style="position:relative;top:2px">Text Off</button></div></div></div>',
1152 1153
1153 title: tittle, 1154 title: tittle,
1154 position: { 1155 position: {
@@ -1184,7 +1185,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1184,7 +1185,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1184 $scope.SetCAwindowStoreData(windowviewid, 'maximised',true); 1185 $scope.SetCAwindowStoreData(windowviewid, 'maximised',true);
1185 $scope.SetCAwindowStoreData(windowviewid, 'minimised',false); 1186 $scope.SetCAwindowStoreData(windowviewid, 'minimised',false);
1186 var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height(); 1187 var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height();
1187 - $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 ); 1188 + var summaryHeight = $('#summary_'+ windowviewid).height()+10;
  1189 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-summaryHeight );
1188 $rootScope.resetMenuOptionOnClick(pnlName); 1190 $rootScope.resetMenuOptionOnClick(pnlName);
1189 var $ua = navigator.userAgent; 1191 var $ua = navigator.userAgent;
1190 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { 1192 if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
@@ -1193,11 +1195,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1193,11 +1195,11 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1193 { 1195 {
1194 $("#caImagePanel_"+windowviewid).css('height',canvasDIvHeight+30-150); 1196 $("#caImagePanel_"+windowviewid).css('height',canvasDIvHeight+30-150);
1195 $('#caImagePanel_' + windowviewid+ " .jsPanel-content").css('height',canvasDIvHeight-150); 1197 $('#caImagePanel_' + windowviewid+ " .jsPanel-content").css('height',canvasDIvHeight-150);
1196 - $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-150-120 ); 1198 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-150-summaryHeight );
1197 } 1199 }
1198 else if(aodheight<1024) 1200 else if(aodheight<1024)
1199 { 1201 {
1200 - $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 ); 1202 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-summaryHeight );
1201 } 1203 }
1202 } 1204 }
1203 }, 1205 },
@@ -1213,7 +1215,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1213,7 +1215,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1213 $scope.SetCAwindowStoreData(windowviewid, 'minimised',false); 1215 $scope.SetCAwindowStoreData(windowviewid, 'minimised',false);
1214 $scope.SetCAwindowStoreData(windowviewid, 'maximised',false); 1216 $scope.SetCAwindowStoreData(windowviewid, 'maximised',false);
1215 var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height(); 1217 var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height();
1216 - $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 ); 1218 + var summaryHeight = $('#summary_'+ windowviewid).height()+10;
  1219 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-summaryHeight );
1217 $rootScope.resetMenuOptionOnClick(pnlName); 1220 $rootScope.resetMenuOptionOnClick(pnlName);
1218 }, 1221 },
1219 resizable: { 1222 resizable: {
@@ -1229,8 +1232,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1229,8 +1232,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1229 $scope.SetCAwindowStoreData(windowviewid, 'y', ui.position.top); 1232 $scope.SetCAwindowStoreData(windowviewid, 'y', ui.position.top);
1230 $scope.SetCAwindowStoreData(windowviewid, 'x', ui.position.left); 1233 $scope.SetCAwindowStoreData(windowviewid, 'x', ui.position.left);
1231 $rootScope.UnsaveCurriculum = true; 1234 $rootScope.UnsaveCurriculum = true;
1232 -  
1233 - $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 ); 1235 + var summaryHeight = $('#summary_'+ windowviewid).height()+10;
  1236 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-summaryHeight );
1234 $rootScope.resetMenuOptionOnClick(pnlName); 1237 $rootScope.resetMenuOptionOnClick(pnlName);
1235 } 1238 }
1236 1239
@@ -1248,28 +1251,27 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1248,28 +1251,27 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1248 } 1251 }
1249 }); 1252 });
1250 } 1253 }
1251 -  
1252 1254
1253 - var isMaximize = $scope.GetCAwindowStoreData(windowviewid, 'maximised');  
1254 - var isMinimize = $scope.GetCAwindowStoreData(windowviewid, 'minimised');  
1255 - if (isMaximize) {  
1256 - $scope.jsPanelCA.maximize();  
1257 - }  
1258 - else if (isMinimize) {  
1259 - $scope.jsPanelCA.minimize();  
1260 - }  
1261 - else {  
1262 - $scope.jsPanelCA.normalize();  
1263 - }  
1264 - $rootScope.AllPanelObject(windowviewid,$scope.jsPanelCA);  
1265 -  
1266 - $("#caImagePanel_"+windowviewid).css('overflow','hidden');  
1267 - // set false after initial call of min,max or normal  
1268 - $scope.SetCAwindowStoreData(windowviewid, 'minmaxAutoEvent', false);  
1269 - $scope.SetCAwindowStoreData(windowviewid, 'y', $scope.jsPanelTop);  
1270 - $scope.SetCAwindowStoreData(windowviewid, 'x', $scope.jsPanelLeft);  
1271 - $scope.SetCAwindowStoreData(windowviewid, 'width', $scope.jsPanelWidth);  
1272 - $scope.SetCAwindowStoreData(windowviewid, 'height', $scope.jsPanelHeight); 1255 + var isMaximize = $scope.GetCAwindowStoreData(windowviewid, 'maximised');
  1256 + var isMinimize = $scope.GetCAwindowStoreData(windowviewid, 'minimised');
  1257 + if (isMaximize) {
  1258 + $scope.jsPanelCA.maximize();
  1259 + }
  1260 + else if (isMinimize) {
  1261 + $scope.jsPanelCA.minimize();
  1262 + }
  1263 + else {
  1264 + $scope.jsPanelCA.normalize();
  1265 + }
  1266 + $rootScope.AllPanelObject(windowviewid,$scope.jsPanelCA);
  1267 +
  1268 + $("#caImagePanel_"+windowviewid).css('overflow','hidden');
  1269 + // set false after initial call of min,max or normal
  1270 + $scope.SetCAwindowStoreData(windowviewid, 'minmaxAutoEvent', false);
  1271 + $scope.SetCAwindowStoreData(windowviewid, 'y', $scope.jsPanelTop);
  1272 + $scope.SetCAwindowStoreData(windowviewid, 'x', $scope.jsPanelLeft);
  1273 + $scope.SetCAwindowStoreData(windowviewid, 'width', $scope.jsPanelWidth);
  1274 + $scope.SetCAwindowStoreData(windowviewid, 'height', $scope.jsPanelHeight);
1273 1275
1274 $scope.SetCAwindowStoreData(windowviewid, 'currentSlug', 'clinical-animations-detail'); 1276 $scope.SetCAwindowStoreData(windowviewid, 'currentSlug', 'clinical-animations-detail');
1275 $('html, body').animate({ scrollTop: 0 }); 1277 $('html, body').animate({ scrollTop: 0 });
@@ -1281,28 +1283,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1281,28 +1283,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1281 1283
1282 var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height(); 1284 var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height();
1283 1285
1284 - $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 );  
1285 -  
1286 - var videoHeight = $('#playerinlineVideo_'+ windowviewid ).height();  
1287 -  
1288 - var textH = $('.video-subtitle').height();  
1289 - textH = textH + 40;  
1290 - var blackBorderHeight = canvasDIvHeight - (videoHeight + textH);  
1291 -  
1292 - if ($('.jsPanel-content').length > 0) {  
1293 - $('.video-subtitle').css('margin-bottom', blackBorderHeight);  
1294 - $('#divplayerinlineVideo_'+ windowviewid ).css('background', '#fff');  
1295 - //Android > Clinical Animations > The animation does not fit to the screen in the Landscape mode.  
1296 - var $ua = navigator.userAgent;  
1297 - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { $('.jsPanel-content').css("width", "100%"); }  
1298 - }  
1299 -  
1300 - if(screen.height<=640)  
1301 - {  
1302 - $('#btnTxtOnOff_' + windowviewid).css("top", "-15px");  
1303 - }  
1304 - 1286 + var summaryHeight = $('#summary_'+ windowviewid).height();
1305 1287
  1288 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-summaryHeight);
1306 } 1289 }
1307 1290
1308 //Calling methode for save Js Panel Activity for SaveCB 1291 //Calling methode for save Js Panel Activity for SaveCB
@@ -1321,16 +1304,22 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1321,16 +1304,22 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1321 $scope.JsPanelclick(windowviewid); 1304 $scope.JsPanelclick(windowviewid);
1322 1305
1323 var isTextVisible = $scope.GetCAwindowStoreData(windowviewid, 'isTextVisible'); 1306 var isTextVisible = $scope.GetCAwindowStoreData(windowviewid, 'isTextVisible');
  1307 + var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height();
  1308 +
1324 if(isTextVisible) 1309 if(isTextVisible)
1325 { 1310 {
1326 - $("#btnTxtOnOff_" + windowviewid).text("Text Off");  
1327 - $("#sid_" + windowviewid).css("visibility", "visible"); 1311 + $("#sid_" + windowviewid).css("display", "block");
  1312 + $("#btnTxtOnOff_" + windowviewid).text("Text Off");
  1313 + $('#summary_'+ windowviewid ).css("height","125px");
  1314 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-125 );
1328 } 1315 }
1329 else 1316 else
1330 { 1317 {
  1318 + $("#sid_" + windowviewid).css("display", "none");
1331 $("#btnTxtOnOff_" + windowviewid).text("Text On"); 1319 $("#btnTxtOnOff_" + windowviewid).text("Text On");
1332 - $("#sid_" + windowviewid).css("visibility", "hidden");  
1333 - 1320 + $('#summary_'+ windowviewid ).css("height","40px");
  1321 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-40 );
  1322 +
1334 } 1323 }
1335 1324
1336 } 1325 }
@@ -1402,11 +1391,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1402,11 +1391,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1402 1391
1403 $scope.GetTextVisiblity = function (windowviewid, btnTextValue) { 1392 $scope.GetTextVisiblity = function (windowviewid, btnTextValue) {
1404 var isVisible; 1393 var isVisible;
  1394 + var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height();
1405 if (btnTextValue == "Text On") { 1395 if (btnTextValue == "Text On") {
1406 isVisible = false; 1396 isVisible = false;
  1397 + $("#sid_" + windowviewid).css("display", "none");
  1398 + $('#summary_'+ windowviewid ).css("height","40px");
  1399 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-40 );
1407 $scope.SetCAwindowStoreData(windowviewid, 'isTextVisible', isVisible); 1400 $scope.SetCAwindowStoreData(windowviewid, 'isTextVisible', isVisible);
1408 - } else { 1401 + } else
  1402 + {
1409 isVisible = true; 1403 isVisible = true;
  1404 + $("#sid_" + windowviewid).css("display", "block");
  1405 + $('#summary_'+ windowviewid ).css("height","125px");
  1406 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-125 );
1410 $scope.SetCAwindowStoreData(windowviewid, 'isTextVisible', isVisible); 1407 $scope.SetCAwindowStoreData(windowviewid, 'isTextVisible', isVisible);
1411 } 1408 }
1412 } 1409 }
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
@@ -974,9 +974,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -974,9 +974,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
974 '<div class="img-thumbnail" style="overflow: scroll;width:100%;position:relative" id="canvasDivCI_' + windowviewid + '"> <canvas id="canvasPaintCI_' + windowviewid + '" ng-click="FreeStylePaint($event)" width="2270" height="700" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas><canvas id="canvasCI_' + windowviewid + '" ng-click="onDrawingCanvasClick($event)" width="2270" height="700" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas>' + 974 '<div class="img-thumbnail" style="overflow: scroll;width:100%;position:relative" id="canvasDivCI_' + windowviewid + '"> <canvas id="canvasPaintCI_' + windowviewid + '" ng-click="FreeStylePaint($event)" width="2270" height="700" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas><canvas id="canvasCI_' + windowviewid + '" ng-click="onDrawingCanvasClick($event)" width="2270" height="700" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas>' +
975 //'<div class="col-sm-12 img-thumbnail" align="center">' + 975 //'<div class="col-sm-12 img-thumbnail" align="center">' +
976 '<img id="ciimage_' + windowviewid + '" alt="" title="" style="left:0px;top:0px;position:absolute;visibility:hidden">' + 976 '<img id="ciimage_' + windowviewid + '" alt="" title="" style="left:0px;top:0px;position:absolute;visibility:hidden">' +
977 - '<div id="summary_' + windowviewid + '" class="col-sm-12 well img-subtitle" style="position:absolute;bottom:0px;margin-bottom:0px;padding:5px;width:99%">' + 977 + '<div id="summary_' + windowviewid + '" class="col-sm-12 well img-subtitle" style="position:absolute;left:0px;bottom:0px;margin-bottom:0px;padding:5px;width:100%">' +
978 '<div id="sid_' + windowviewid + '" align="left" style="height:100px;overflow-y:scroll !important;-webkit-overflow-scrolling:touch !important;"><p>' + selectedImageCISummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right">Text Off</button>' + 978 '<div id="sid_' + windowviewid + '" align="left" style="height:100px;overflow-y:scroll !important;-webkit-overflow-scrolling:touch !important;"><p>' + selectedImageCISummary + '</p></div><button id="btnTxtOnOff_' + windowviewid + '" class="btn btn-primary pull-right">Text Off</button>' +
979 - '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { $(".jsPanel-content").css({ "width": "100%"});$("#' + $scope.jsPanelID + '").css("width", "100%"); }$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off"){$(this).text("Text On");$("#sid_' + windowviewid + '").css("visibility","hidden");}else{$(this).text("Text Off");$("#sid_' + windowviewid + '").css("visibility","visible");} GetTextVisibityCI(event);});});</script></div>' + 979 + '<script>$(document).ready(function(){ var $ua = navigator.userAgent;if(($ua.match(/(iPod|iPhone|iPad|android)/i))) { $(".jsPanel-content").css({ "width": "100%"});$("#' + $scope.jsPanelID + '").css("width", "100%"); }$("#btnTxtOnOff_' + windowviewid + '").click(function(){if($.trim($(this).text()) === "Text Off")'+
  980 + '{'+
  981 + '$(this).text("Text On");'+
  982 + '}'+
  983 + 'else{'+
  984 + '$(this).text("Text Off");'+
  985 + '} GetTextVisibityCI(event);});});</script></div>' +
980 '</div>'+ 986 '</div>'+
981 '</div></div></div>', 987 '</div></div></div>',
982 title: tittle, 988 title: tittle,
@@ -1140,27 +1146,23 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1140,27 +1146,23 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1140 $rootScope.SetCIwindowData(windowviewid, 'imgLeft',img.offsetLeft); 1146 $rootScope.SetCIwindowData(windowviewid, 'imgLeft',img.offsetLeft);
1141 1147
1142 $("#ciimage_"+windowviewid).css("visibility","visible"); 1148 $("#ciimage_"+windowviewid).css("visibility","visible");
1143 - var canvasZIndex = $("#canvasCI_" + windowviewid).css("z-index");  
1144 - var canvasPaintZIndex = $("#canvasPaintCI_" + windowviewid).css("z-index");  
1145 -  
1146 - if (parseInt(canvasZIndex) < parseInt(canvasPaintZIndex)) {  
1147 - canvasPaintZIndex = parseInt(canvasPaintZIndex) + 1;  
1148 - $('#summary_' + windowviewid).css("z-index", canvasPaintZIndex);  
1149 - }  
1150 - else {  
1151 - canvasZIndex = parseInt(canvasZIndex) + 1;  
1152 - $('#summary_' + windowviewid).css("z-index", canvasZIndex);  
1153 - }  
1154 - 1149 +
  1150 + $rootScope.SetPaintZindexforCISummary(windowviewid);
1155 $scope.JsPanelclick(windowviewid); 1151 $scope.JsPanelclick(windowviewid);
1156 1152
1157 var isTextVisible = $scope.GetCIwindowStoreData(windowviewid, 'isTextVisible'); 1153 var isTextVisible = $scope.GetCIwindowStoreData(windowviewid, 'isTextVisible');
1158 1154
1159 if (isTextVisible) { 1155 if (isTextVisible) {
1160 - $("#btnTxtOnOff_" + windowviewid).text("Text Off"); $("#sid_" + windowviewid).css("visibility", "visible"); 1156 + $("#btnTxtOnOff_" + windowviewid).text("Text Off");
  1157 + $("#sid_" + windowviewid).css("display", "block");
  1158 + // $('#summary_' + windowviewid).css({"width": "100%","left":"0px"});
1161 } 1159 }
1162 - else {  
1163 - $("#btnTxtOnOff_" + windowviewid).text("Text On"); $("#sid_" + windowviewid).css("visibility", "hidden"); 1160 + else
  1161 + {
  1162 + $("#btnTxtOnOff_" + windowviewid).text("Text On");
  1163 + $("#sid_" + windowviewid).css("display", "none");
  1164 + // var canvasWidth = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").width()-107;
  1165 + // $('#summary_' + windowviewid).css({"width": "87px","left":canvasWidth+'px'});
1164 } 1166 }
1165 if ($rootScope.isCallFromOtherModule) { 1167 if ($rootScope.isCallFromOtherModule) {
1166 var annotationData= $scope.ciOpenInOtherModules.annotationData; 1168 var annotationData= $scope.ciOpenInOtherModules.annotationData;
@@ -1178,7 +1180,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1178,7 +1180,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1178 } 1180 }
1179 } 1181 }
1180 //first draw shape and then store in object 1182 //first draw shape and then store in object
1181 - $rootScope.LoadCBSavedAnnotation(canvasDraw,canvasPaint,annotationData); 1183 + $rootScope.LoadCBSavedAnnotation(canvasDraw,canvasPaint,annotationData);
1182 1184
1183 } 1185 }
1184 } 1186 }
@@ -1276,11 +1278,20 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -1276,11 +1278,20 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
1276 var isVisible; 1278 var isVisible;
1277 if (btnTextValue == "Text On") { 1279 if (btnTextValue == "Text On") {
1278 isVisible = false; 1280 isVisible = false;
  1281 + $('#sid_' + windowviewid).css("display","none");
  1282 + // var canvasWidth =$('#ciImagePanel_' + windowviewid + ' .jsPanel-content').width()-107;
  1283 + // $('#summary_' + windowviewid).css({"width": "87px","left":canvasWidth+"px"});
1279 $scope.SetCIwindowStoreData(windowviewid, 'isTextVisible', isVisible); 1284 $scope.SetCIwindowStoreData(windowviewid, 'isTextVisible', isVisible);
1280 - } else { 1285 + }
  1286 + else
  1287 + {
1281 isVisible = true; 1288 isVisible = true;
  1289 + $('#sid_' + windowviewid).css("display","block");
  1290 + // $('#summary_' + windowviewid).css({"width": "100%","left":"0px"});
1282 $scope.SetCIwindowStoreData(windowviewid, 'isTextVisible', isVisible); 1291 $scope.SetCIwindowStoreData(windowviewid, 'isTextVisible', isVisible);
1283 } 1292 }
  1293 +
  1294 + $rootScope.SetPaintZindexforCISummary(windowviewid);
1284 } 1295 }
1285 1296
1286 $scope.RemoveJSPanel = function (panelid) { 1297 $scope.RemoveJSPanel = function (panelid) {
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
@@ -2546,7 +2546,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -2546,7 +2546,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2546 var canvasDraw='canvasDA_' + windowviewid; 2546 var canvasDraw='canvasDA_' + windowviewid;
2547 var canvasPaint='canvasPaintDA_' + windowviewid; 2547 var canvasPaint='canvasPaintDA_' + windowviewid;
2548 var bodyVid=$rootScope.GetDAwindowData(windowviewid,'voId'); 2548 var bodyVid=$rootScope.GetDAwindowData(windowviewid,'voId');
2549 - var demoData= {shapeStates:[],paintCanvasState:""}; 2549 + var demoData= {shapeStates:[],paintCanvasState:[]};
2550 var isCanvasReset = $scope.GetwindowStoreData(windowviewid, 'isCanvasReset'); 2550 var isCanvasReset = $scope.GetwindowStoreData(windowviewid, 'isCanvasReset');
2551 2551
2552 if(isCanvasReset) 2552 if(isCanvasReset)
@@ -2581,7 +2581,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -2581,7 +2581,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
2581 } 2581 }
2582 else 2582 else
2583 { 2583 {
2584 - console.log("loading canvas...."); 2584 + console.log("loading images on canvas....");
2585 } 2585 }
2586 }, 100); 2586 }, 100);
2587 2587
@@ -5030,6 +5030,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5030,6 +5030,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5030 var canDiv = document.getElementById('canvasDivDA_' + windowviewid); 5030 var canDiv = document.getElementById('canvasDivDA_' + windowviewid);
5031 if($rootScope.globalSetting.onLayerChange) 5031 if($rootScope.globalSetting.onLayerChange)
5032 { 5032 {
  5033 + $('#canvasDA_' + windowviewid).removeLayers();//remove all old shape
  5034 + //var sktch = $("#canvasPaintDA_" + windowviewid).sketch();
  5035 + $("#canvasPaintDA_" + windowviewid).sketch().actions = [];//remove old paint data
  5036 +
5033 var canDivChildCount = canDiv.childElementCount; 5037 var canDivChildCount = canDiv.childElementCount;
5034 if (canDivChildCount > 0) { 5038 if (canDivChildCount > 0) {
5035 canDiv.innerHTML = ''; 5039 canDiv.innerHTML = '';
@@ -5041,6 +5045,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -5041,6 +5045,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
5041 } 5045 }
5042 else 5046 else
5043 { 5047 {
  5048 + $scope.SetwindowStoreData(windowviewid, 'isCanvasReset',false);
5044 //remove all canvas except pait and drawing 5049 //remove all canvas except pait and drawing
5045 $('#'+'canvasDivDA_' + windowviewid+' canvas').not('#canvasDA_'+windowviewid).not('#canvasPaintDA_'+windowviewid).remove(); 5050 $('#'+'canvasDivDA_' + windowviewid+' canvas').not('#canvasDA_'+windowviewid).not('#canvasPaintDA_'+windowviewid).remove();
5046 } 5051 }
@@ -6473,23 +6478,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -6473,23 +6478,15 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6473 $('#btnIdentify_' + windowviewid).addClass('btn-primary'); 6478 $('#btnIdentify_' + windowviewid).addClass('btn-primary');
6474 6479
6475 // clear canvas before drawing transparency box 6480 // clear canvas before drawing transparency box
6476 - if ($rootScope.isAnnotationWindowOpen == true) {  
6477 - // $('#canvasDA_' + windowviewid).removeLayers();  
6478 - var paintCanvasObj = document.getElementById("canvasPaintDA_" + windowviewid);  
6479 - if (paintCanvasObj != null) {  
6480 - var ctx = paintCanvasObj.getContext("2d");  
6481 - ctx.clearRect(0, 0, paintCanvasObj.width, paintCanvasObj.height);  
6482 - }  
6483 - var CanvasObj = document.getElementById("canvasDA_" + windowviewid);  
6484 - if (CanvasObj != null) {  
6485 - var ctx1 = CanvasObj.getContext("2d");  
6486 - ctx1.clearRect(0, 0,CanvasObj.width, CanvasObj.height);  
6487 - }  
6488 - $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false);  
6489 - $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); 6481 + $('#canvasDA_' + windowviewid).removeLayers();//remove all old shape
  6482 + //var sktch = $("#canvasPaintDA_" + windowviewid).sketch();
  6483 + $("#canvasPaintDA_" + windowviewid).sketch().actions = [];//remove old paint data
  6484 +
  6485 + $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false);
  6486 + $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]});
6490 6487
6491 - var sktch = $("#canvasPaintDA_" + windowviewid).sketch();  
6492 - $("#canvasPaintDA_" + windowviewid).sketch().actions = []; 6488 + if ($rootScope.isAnnotationWindowOpen == true) {
  6489 +
6493 $("#annotationpaintbrushsize").removeClass("activebtncolor"); 6490 $("#annotationpaintbrushsize").removeClass("activebtncolor");
6494 $("#annotationpainteraser").removeClass("activebtncolor"); 6491 $("#annotationpainteraser").removeClass("activebtncolor");
6495 if ($("#DrawMode").hasClass("annotationtoolbartab")) { 6492 if ($("#DrawMode").hasClass("annotationtoolbartab")) {
@@ -6549,13 +6546,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -6549,13 +6546,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6549 if (drawCanvasZindex > paintCanvasZindex) { 6546 if (drawCanvasZindex > paintCanvasZindex) {
6550 $(".ui-wrapper").css("z-index", drawCanvasZindex); 6547 $(".ui-wrapper").css("z-index", drawCanvasZindex);
6551 $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', drawCanvasZindex); 6548 $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', drawCanvasZindex);
6552 - $('#canvasPaintDA_' + windowviewid).css("z-index", drawCanvasZindex+2);  
6553 } 6549 }
6554 else { 6550 else {
6555 $(".ui-wrapper").css("z-index", paintCanvasZindex); 6551 $(".ui-wrapper").css("z-index", paintCanvasZindex);
6556 - $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex);  
6557 - $('#canvasPaintDA_' + windowviewid).css("z-index", paintCanvasZindex+2);  
6558 - 6552 + $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex);
6559 } 6553 }
6560 6554
6561 } 6555 }
@@ -6841,6 +6835,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -6841,6 +6835,7 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
6841 } 6835 }
6842 } 6836 }
6843 6837
  6838 + //curriculum on slide load
6844 $scope.CalculateDimensionsAndDrawTBox = function (windowviewid) { 6839 $scope.CalculateDimensionsAndDrawTBox = function (windowviewid) {
6845 $scope.SetwindowStoreData(windowviewid, 'isTransparent', true); 6840 $scope.SetwindowStoreData(windowviewid, 'isTransparent', true);
6846 $scope.SetwindowStoreData(windowviewid, 'isTBDrawnOnBodyRegion', false); 6841 $scope.SetwindowStoreData(windowviewid, 'isTBDrawnOnBodyRegion', false);
@@ -7085,17 +7080,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -7085,17 +7080,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7085 7080
7086 // clear canvas before drawing transparency box 7081 // clear canvas before drawing transparency box
7087 if ($rootScope.isAnnotationWindowOpen == true) { 7082 if ($rootScope.isAnnotationWindowOpen == true) {
7088 - //$('#canvasDA_' + windowviewid).removeLayers();  
7089 - var paintCanvasObj = document.getElementById("canvasPaintDA_" + windowviewid);  
7090 - if (paintCanvasObj != null) {  
7091 - var ctx = paintCanvasObj.getContext("2d");  
7092 - ctx.clearRect(0, 0, paintCanvasObj.width, paintCanvasObj.height);  
7093 - }  
7094 - var CanvasObj = document.getElementById("canvasDA_" + windowviewid);  
7095 - if (CanvasObj != null) {  
7096 - var ctx1 = CanvasObj.getContext("2d");  
7097 - ctx1.clearRect(0, 0, CanvasObj.width, CanvasObj.height);  
7098 - }  
7099 $("#annotationpaintbrushsize").removeClass("activebtncolor"); 7083 $("#annotationpaintbrushsize").removeClass("activebtncolor");
7100 $("#annotationpainteraser").removeClass("activebtncolor"); 7084 $("#annotationpainteraser").removeClass("activebtncolor");
7101 if ($("#DrawMode").hasClass("annotationtoolbartab")) { 7085 if ($("#DrawMode").hasClass("annotationtoolbartab")) {
@@ -7139,7 +7123,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -7139,7 +7123,6 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
7139 $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex); 7123 $scope.SetwindowStoreData(windowviewid, 'UIWrapperZIndex', paintCanvasZindex);
7140 $('#canvasPaintDA_' + windowviewid).css("z-index", paintCanvasZindex+2); 7124 $('#canvasPaintDA_' + windowviewid).css("z-index", paintCanvasZindex+2);
7141 } 7125 }
7142 - //$rootScope.switchToTransparencycanvas("daImagePanel_"+windowviewid);  
7143 } 7126 }
7144 } 7127 }
7145 else 7128 else
@@ -9064,25 +9047,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -9064,25 +9047,12 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9064 $scope.removeAllTermTpClose(windowviewid); 9047 $scope.removeAllTermTpClose(windowviewid);
9065 9048
9066 // clear canvas on closing of transparency box 9049 // clear canvas on closing of transparency box
9067 - if ($rootScope.isAnnotationWindowOpen == true) {  
9068 - $('#canvasDA_'+windowviewid).removeLayers();  
9069 - var paintCanvasObj = document.getElementById('canvasPaintDA_'+windowviewid);  
9070 - if (paintCanvasObj != null) {  
9071 - var ctx = paintCanvasObj.getContext("2d");  
9072 - ctx.clearRect(0, 0, paintCanvasObj.width, paintCanvasObj.height);  
9073 -  
9074 - var CanvasObj = document.getElementById("canvasDA_" + windowviewid);  
9075 - if (CanvasObj != null) {  
9076 - var ctx1 = CanvasObj.getContext("2d");  
9077 - ctx1.clearRect(0, 0, CanvasObj.width, CanvasObj.height);  
9078 - }  
9079 - $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false);  
9080 - $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]});  
9081 -  
9082 - var sktch = $('#canvasPaintDA_'+windowviewid).sketch();  
9083 - $('#canvasPaintDA_'+windowviewid).sketch().actions = [];  
9084 - }  
9085 - } 9050 +
  9051 + $('#canvasDA_' + windowviewid).removeLayers();//remove all old shape
  9052 + // var sktch = $("#canvasPaintDA_" + windowviewid).sketch();
  9053 + $("#canvasPaintDA_" + windowviewid).sketch().actions = [];//remove old paint data
  9054 + $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false);
  9055 + $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]});
9086 9056
9087 var tBox = document.getElementById('transparencyCanvas_' + windowviewid); 9057 var tBox = document.getElementById('transparencyCanvas_' + windowviewid);
9088 if (tBox != null) { 9058 if (tBox != null) {
@@ -9163,6 +9133,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l @@ -9163,6 +9133,10 @@ AIA.controller(&quot;DAController&quot;, [&quot;$scope&quot;, &quot;$rootScope&quot;, &quot;$compile&quot;, &quot;$http&quot;, &quot;$l
9163 9133
9164 } 9134 }
9165 9135
  9136 + $scope.removeannotationShape = function (ClickByButton,windowviewid){
  9137 +
  9138 + }
  9139 +
9166 function positionTooltip(event, x, y) { 9140 function positionTooltip(event, x, y) {
9167 x = 100, 9141 x = 100,
9168 y = 200, 9142 y = 200,
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -3111,6 +3111,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3111,6 +3111,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3111 $rootScope.SetCIwindowData(MultiWinId,'height',520); 3111 $rootScope.SetCIwindowData(MultiWinId,'height',520);
3112 $rootScope.SetCIwindowData(MultiWinId,'y',pTop); 3112 $rootScope.SetCIwindowData(MultiWinId,'y',pTop);
3113 $rootScope.SetCIwindowData(MultiWinId,'x',pLeft); 3113 $rootScope.SetCIwindowData(MultiWinId,'x',pLeft);
  3114 +
3114 var canvasDiv='canvasDivCI_' + MultiWinId; 3115 var canvasDiv='canvasDivCI_' + MultiWinId;
3115 var canvasDraw='canvasCI_' + MultiWinId; 3116 var canvasDraw='canvasCI_' + MultiWinId;
3116 var canvasPaint='canvasPaintCI_' + MultiWinId; 3117 var canvasPaint='canvasPaintCI_' + MultiWinId;
@@ -3183,9 +3184,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3183,9 +3184,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3183 else if(paneld.match("caImagePanel")) 3184 else if(paneld.match("caImagePanel"))
3184 { 3185 {
3185 $("#"+paneld).css('height','520'); 3186 $("#"+paneld).css('height','520');
3186 - $("#"+paneld+' .jsPanel-content').css('height','490');  
3187 - $('#playerinlineVideo_'+ MultiWinId ).css("height",370 );  
3188 - 3187 + $("#"+paneld+' .jsPanel-content').css('height','490');
  3188 +
  3189 + var summaryHeight = $('#summary_'+ MultiWinId).height()+10;
  3190 + $('#playerinlineVideo_'+ MultiWinId ).css("height",490-summaryHeight );
  3191 +
3189 $rootScope.SetCAwindowData(MultiWinId,'width',resetWidth); 3192 $rootScope.SetCAwindowData(MultiWinId,'width',resetWidth);
3190 $rootScope.SetCAwindowData(MultiWinId,'height',520); 3193 $rootScope.SetCAwindowData(MultiWinId,'height',520);
3191 $rootScope.SetCAwindowData(MultiWinId,'y',pTop); 3194 $rootScope.SetCAwindowData(MultiWinId,'y',pTop);
@@ -3302,7 +3305,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3302,7 +3305,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3302 { 3305 {
3303 if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) 3306 if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0)
3304 { 3307 {
3305 - // image fixed no position changed 3308 + $('#' + CanvasDrawId).removeLayers();//remove all old shape
  3309 + $("#" + canvasPaintId).sketch().actions = [];//remove old paint data first
3306 //first draw shape and then store in object 3310 //first draw shape and then store in object
3307 $rootScope.ResizeCBSavedAnnotation(pnlName,CanvasDrawId,canvasPaintId,annotationData); 3311 $rootScope.ResizeCBSavedAnnotation(pnlName,CanvasDrawId,canvasPaintId,annotationData);
3308 } 3312 }
@@ -3343,19 +3347,27 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3343,19 +3347,27 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3343 canvas.width = img.width; 3347 canvas.width = img.width;
3344 canvasPaint.width = img.width; 3348 canvasPaint.width = img.width;
3345 } 3349 }
  3350 + if(pnlName.match("ciImagePanel"))
  3351 + {
  3352 + canvas.height = canvas.height-40;
  3353 + canvasPaint.height = canvasPaint.height-40;
  3354 + }
3346 3355
3347 if(annotationData!="" && annotationData!=undefined) 3356 if(annotationData!="" && annotationData!=undefined)
3348 - { 3357 + {
3349 if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) 3358 if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0)
3350 - { 3359 + {
  3360 + var modifiedData= {shapeStates:[],paintCanvasState:[]};
3351 var modifiedData=$rootScope.resetAnnotationData(imgName,oldleft,annotationData); 3361 var modifiedData=$rootScope.resetAnnotationData(imgName,oldleft,annotationData);
3352 if(modifiedData!="" && modifiedData!=undefined) 3362 if(modifiedData!="" && modifiedData!=undefined)
3353 { 3363 {
3354 if(modifiedData.shapeStates.length>0||modifiedData.paintCanvasState.length>0) 3364 if(modifiedData.shapeStates.length>0||modifiedData.paintCanvasState.length>0)
3355 { 3365 {
3356 - annotationData=modifiedData; 3366 + $('#' + CanvasDrawId).removeLayers();//remove all old shape
  3367 + $("#" + canvasPaintId).sketch().actions = [];//remove old paint data first
  3368 +
3357 //first draw shape and then store in object 3369 //first draw shape and then store in object
3358 - $rootScope.ResizeCBSavedAnnotation(pnlName,CanvasDrawId,canvasPaintId,annotationData); 3370 + $rootScope.ResizeCBSavedAnnotation(pnlName,CanvasDrawId,canvasPaintId,modifiedData);
3359 } 3371 }
3360 } 3372 }
3361 3373
@@ -3365,45 +3377,44 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3365,45 +3377,44 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3365 3377
3366 $rootScope.resetAnnotationData = function (imgName,oldleft,annotationData) 3378 $rootScope.resetAnnotationData = function (imgName,oldleft,annotationData)
3367 { 3379 {
3368 - // load annotation  
3369 - var modifiiedannotationData= {shapeStates:[],paintCanvasState:""};  
3370 - if(annotationData!="" && annotationData!=undefined)  
3371 - {  
3372 - if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0)  
3373 - {  
3374 - var img = document.getElementById(imgName);  
3375 - var newLeft=img.offsetLeft-oldleft;  
3376 - if(img.offsetLeft>=0)  
3377 - {  
3378 - var shapeStates=annotationData.shapeStates;  
3379 - var shapecount=shapeStates.length;  
3380 - for(var shapeindx=0;shapeindx<shapecount;shapeindx++)  
3381 - {  
3382 - var layerName = shapeStates[shapeindx].layerName;  
3383 - var shapetype = shapeStates[shapeindx].shapeType;  
3384 - if(shapetype=="line"||shapetype=="Arrow"||shapetype=="Pin")  
3385 - {  
3386 - var drawingPoints={  
3387 - "x1": Math.round(shapeStates[shapeindx].x1)+newLeft,  
3388 - "x2": Math.round(shapeStates[shapeindx].x2)+newLeft,  
3389 - }  
3390 - }  
3391 - else  
3392 - {  
3393 - var drawingPoints={  
3394 - "x": Math.round(shapeStates[shapeindx].x)+newLeft,  
3395 - }  
3396 - }  
3397 - modifiiedannotationData=$rootScope.ResizeUpdateShapeData(shapetype,layerName,drawingPoints,annotationData)  
3398 -  
3399 - } 3380 + // load annotation
  3381 + var img = document.getElementById(imgName);
  3382 + var newLeft=img.offsetLeft-oldleft;
  3383 + if(img.offsetLeft>=0)
  3384 + {
  3385 + var shapeStates=annotationData.shapeStates;
  3386 + var shapecount=shapeStates.length;
  3387 + for(var shapeindx=0;shapeindx<shapecount;shapeindx++)
  3388 + {
  3389 + // var layerName = shapeStates[shapeindx].layerName;
  3390 + var shapetype = shapeStates[shapeindx].shapeType;
  3391 + if(shapetype=="line"||shapetype=="Arrow"||shapetype=="Pin")
  3392 + {
  3393 + shapeStates[shapeindx].x1=shapeStates[shapeindx].x1+newLeft;
  3394 + shapeStates[shapeindx].x2=shapeStates[shapeindx].x2+newLeft;
  3395 + }
  3396 + else
  3397 + {
  3398 + shapeStates[shapeindx].x=shapeStates[shapeindx].x+newLeft;
  3399 + }
  3400 +
  3401 + }
3400 3402
  3403 + var paintCanvasState=annotationData.paintCanvasState;
  3404 + var paintCount=paintCanvasState.length;
  3405 + for(var paintindx=0;paintindx<paintCount;paintindx++)
  3406 + {
  3407 + var paintEvent=paintCanvasState[paintindx].events;
  3408 + for(var indx=0;indx<paintEvent.length;indx++)
  3409 + {
  3410 + paintEvent[indx].x= paintEvent[indx].x+newLeft
3401 } 3411 }
3402 -  
3403 - }  
3404 - } 3412 +
  3413 + }
3405 3414
3406 - return modifiiedannotationData; 3415 + }
  3416 +
  3417 + return annotationData;
3407 } 3418 }
3408 3419
3409 3420
@@ -3938,11 +3949,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3938,11 +3949,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3938 paintCanvasZindex = paintCanvasZindex + 1; 3949 paintCanvasZindex = paintCanvasZindex + 1;
3939 } 3950 }
3940 3951
3941 - $("#canvasPaintCI_" + MultiWinId).css("z-index", paintCanvasZindex); 3952 + $("#canvasPaintCI_" + MultiWinId).css("z-index", paintCanvasZindex);
  3953 + $('#summary_' + MultiWinId).css("z-index", paintCanvasZindex+1);
  3954 +
3942 } 3955 }
3943 -  
3944 - $('#summary_' + MultiWinId).css("z-index", paintCanvasZindex+1);  
3945 - 3956 +
3946 } 3957 }
3947 3958
3948 $rootScope.SetPaintZindexforCISummary = function (MultiWinId) 3959 $rootScope.SetPaintZindexforCISummary = function (MultiWinId)
@@ -3966,6 +3977,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -3966,6 +3977,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
3966 //clear sketch js event for paint and erase 3977 //clear sketch js event for paint and erase
3967 $.sketch = { tools: {}}; 3978 $.sketch = { tools: {}};
3968 $rootScope.RemoveSelectedShape(); 3979 $rootScope.RemoveSelectedShape();
  3980 + $rootScope.isAnnotationWindowOpen = false;
3969 $rootScope.isAnnotatiomToolBarPopupActive = false; 3981 $rootScope.isAnnotatiomToolBarPopupActive = false;
3970 $rootScope.isAnnotatiomToolBarPopupClosed = true; 3982 $rootScope.isAnnotatiomToolBarPopupClosed = true;
3971 $("#OnIdentify").removeClass("annotationtoolbartab"); 3983 $("#OnIdentify").removeClass("annotationtoolbartab");
@@ -4053,6 +4065,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -4053,6 +4065,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4053 if(paneld.match("ciImagePanel")) 4065 if(paneld.match("ciImagePanel"))
4054 { 4066 {
4055 $rootScope.SetPaintZindexforCI(MultiWinId); 4067 $rootScope.SetPaintZindexforCI(MultiWinId);
  4068 + $rootScope.SetPaintZindexforCISummary(MultiWinId);
4056 } 4069 }
4057 4070
4058 if(paneld.match("aiImagePanel")) 4071 if(paneld.match("aiImagePanel"))
@@ -4229,12 +4242,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -4229,12 +4242,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4229 for (var index = 0 ; index < modulePanel.length; index++) { 4242 for (var index = 0 ; index < modulePanel.length; index++) {
4230 var paneld = modulePanel[index].id; 4243 var paneld = modulePanel[index].id;
4231 if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) 4244 if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel"))
4232 - { 4245 + {
  4246 + var len = (paneld).split("_").length;
  4247 + var MultiWinId = (paneld).split("_")[len - 1];
4233 $rootScope.switchCanvas(paneld); 4248 $rootScope.switchCanvas(paneld);
4234 if(paneld.match("AAImagePanel")) 4249 if(paneld.match("AAImagePanel"))
4235 - {  
4236 - var len = (paneld).split("_").length;  
4237 - var MultiWinId = (paneld).split("_")[len - 1]; 4250 + {
4238 var canvasId="#canvasAA_" + MultiWinId; 4251 var canvasId="#canvasAA_" + MultiWinId;
4239 $rootScope.switchToAnnotationCanvas(paneld,MultiWinId); 4252 $rootScope.switchToAnnotationCanvas(paneld,MultiWinId);
4240 var aaPinDataArray=$rootScope.GetAAwindowData(MultiWinId,'aaPinData'); 4253 var aaPinDataArray=$rootScope.GetAAwindowData(MultiWinId,'aaPinData');
@@ -4444,11 +4457,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -4444,11 +4457,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
4444 var paneld = modulePanel[index].id; 4457 var paneld = modulePanel[index].id;
4445 if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) 4458 if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel"))
4446 { 4459 {
  4460 + var len = (paneld).split("_").length;
  4461 + var MultiWinId = (paneld).split("_")[len - 1];
4447 $rootScope.switchCanvas(paneld); 4462 $rootScope.switchCanvas(paneld);
4448 if(paneld.match("AAImagePanel")) 4463 if(paneld.match("AAImagePanel"))
4449 - {  
4450 - var len = (paneld).split("_").length;  
4451 - var MultiWinId = (paneld).split("_")[len - 1]; 4464 + {
4452 $rootScope.switchToAnnotationCanvas(paneld,MultiWinId); 4465 $rootScope.switchToAnnotationCanvas(paneld,MultiWinId);
4453 } 4466 }
4454 if(paneld.match("ciImagePanel")) 4467 if(paneld.match("ciImagePanel"))
@@ -5247,45 +5260,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5247,45 +5260,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5247 $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); 5260 $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" });
5248 } 5261 }
5249 5262
5250 - $rootScope.ResizeUpdateShapeData=function(shapetype,layerName,drawingPoints,annotationData)  
5251 - {  
5252 - var shapeStates = new jinqJs()  
5253 - .from(annotationData.shapeStates)  
5254 - .where('layerName == ' + layerName)  
5255 - .select();  
5256 - if(shapeStates.length>0)  
5257 - {  
5258 - if(shapetype=="line"||shapetype=="Arrow"||shapetype=="Pin")  
5259 - {  
5260 - annotationData.shapeStates = new jinqJs()  
5261 - .from(annotationData.shapeStates)  
5262 - .update(function (coll, index)  
5263 - {  
5264 - coll[index].x1= drawingPoints.x1;  
5265 - coll[index].x2 = drawingPoints.x2;  
5266 - })  
5267 - .at('layerName == ' + layerName)  
5268 - .select();  
5269 - }  
5270 - else if(shapetype=="rectangle"||shapetype=="ellipse" ||shapetype=="textArea")  
5271 - {  
5272 - annotationData.shapeStates = new jinqJs()  
5273 - .from(annotationData.shapeStates)  
5274 - .update(function (coll, index)  
5275 - {  
5276 - coll[index].x= drawingPoints.x;  
5277 - // coll[index].y = drawingPoints.y;  
5278 - })  
5279 - .at('layerName == ' + layerName)  
5280 - .select();  
5281 -  
5282 - }  
5283 -  
5284 - }  
5285 -  
5286 - return annotationData;  
5287 - }  
5288 -  
5289 $rootScope.ResizeCBSavedAnnotation = function (paneld,canvasId,canvasPaintId,annotationData) { 5263 $rootScope.ResizeCBSavedAnnotation = function (paneld,canvasId,canvasPaintId,annotationData) {
5290 var len = (paneld).split("_").length; 5264 var len = (paneld).split("_").length;
5291 var MultiWinId = (paneld).split("_")[len - 1]; 5265 var MultiWinId = (paneld).split("_")[len - 1];
@@ -5313,31 +5287,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5313,31 +5287,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5313 { 5287 {
5314 var shapeData=shapeStates[shapeindx]; 5288 var shapeData=shapeStates[shapeindx];
5315 var shapeName = shapeStates[shapeindx].layerName; 5289 var shapeName = shapeStates[shapeindx].layerName;
5316 - var shapetype = shapeStates[shapeindx].shapeType;  
5317 $rootScope.AutoDrawShapeByData(canvasId,shapeData); 5290 $rootScope.AutoDrawShapeByData(canvasId,shapeData);
5318 -  
5319 - if(shapetype=="Pin")  
5320 - {  
5321 - var spliLayer = shapeName.split("_");  
5322 - var pinArcName = "ArcPin_"+spliLayer[1];;  
5323 -  
5324 - $("#" + canvasId).removeLayer(shapeName).drawLayers();  
5325 - $("#" + canvasId).removeLayer(pinArcName).drawLayers();  
5326 - }  
5327 - else if(shapetype=="textArea")  
5328 - {  
5329 - var spliLayer = shapeName.split("_");  
5330 - var textareaName="TextArea_" +spliLayer[1];  
5331 -  
5332 - $("#" + canvasId).removeLayer(shapeName).drawLayers();  
5333 - $("#" + canvasId).removeLayer(textareaName).drawLayers();  
5334 -  
5335 - }  
5336 - else  
5337 - {  
5338 - $("#" + canvasId).removeLayer(shapeName).drawLayers();  
5339 - }  
5340 - 5291 +
5341 annotationData.shapeStates = new jinqJs() 5292 annotationData.shapeStates = new jinqJs()
5342 .from(annotationData.shapeStates) 5293 .from(annotationData.shapeStates)
5343 .delete().at("layerName == " + shapeName).select(); 5294 .delete().at("layerName == " + shapeName).select();
@@ -5350,11 +5301,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5350,11 +5301,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5350 $rootScope.switchCanvasToPaintCanvas(paneld); 5301 $rootScope.switchCanvasToPaintCanvas(paneld);
5351 var drawingPoints=paintCanvasState 5302 var drawingPoints=paintCanvasState
5352 //auto save last cb paint 5303 //auto save last cb paint
5353 - $scope.PaintEraseEvent();  
5354 - $scope.savePaintAnnotation(canvasPaintId,drawingPoints);  
5355 - $("#" + canvasPaintId).sketch({drawAction:drawingPoints}); 5304 +
  5305 + $scope.PaintEraseEvent();
  5306 + $scope.savePaintAnnotation(canvasPaintId,drawingPoints);
  5307 + $("#" + canvasPaintId).sketch({drawAction:drawingPoints});
5356 //clear sketch js event for paint and erase 5308 //clear sketch js event for paint and erase
5357 - $.sketch = { tools: {}}; 5309 + $.sketch = { tools: {}};
5358 } 5310 }
5359 5311
5360 $rootScope.CloseAnnotationTool(); 5312 $rootScope.CloseAnnotationTool();
@@ -5421,7 +5373,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5421,7 +5373,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5421 } 5373 }
5422 } 5374 }
5423 } 5375 }
5424 - var drawingPoints=paintCanvasState 5376 + var drawingPoints=paintCanvasState ;
  5377 +
5425 //auto save last cb paint 5378 //auto save last cb paint
5426 $scope.PaintEraseEvent(); 5379 $scope.PaintEraseEvent();
5427 $scope.savePaintAnnotation(canvasPaintId,drawingPoints); 5380 $scope.savePaintAnnotation(canvasPaintId,drawingPoints);
@@ -5733,7 +5686,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5733,7 +5686,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5733 name: 'Line_' + LineNumber, 5686 name: 'Line_' + LineNumber,
5734 layer: true, 5687 layer: true,
5735 type: 'line', 5688 type: 'line',
5736 - draggable: true, 5689 + draggable: false,
5737 strokeStyle: shapestyleborderColor, 5690 strokeStyle: shapestyleborderColor,
5738 strokeWidth: shapestyleborderWidth, 5691 strokeWidth: shapestyleborderWidth,
5739 rounded: true, 5692 rounded: true,
@@ -5925,7 +5878,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -5925,7 +5878,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
5925 name: 'Rect_' + RectNumber, 5878 name: 'Rect_' + RectNumber,
5926 fillStyle: shapestyleFillColor, 5879 fillStyle: shapestyleFillColor,
5927 type: 'rectangle', 5880 type: 'rectangle',
5928 - draggable: true, 5881 + draggable: false,
5929 strokeStyle: shapestyleborderColor, 5882 strokeStyle: shapestyleborderColor,
5930 opacity: shapestyleOpacity, 5883 opacity: shapestyleOpacity,
5931 strokeWidth: shapestyleborderWidth, 5884 strokeWidth: shapestyleborderWidth,
@@ -6140,7 +6093,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -6140,7 +6093,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
6140 name: 'Circle_' + CircleNumber, 6093 name: 'Circle_' + CircleNumber,
6141 type: 'ellipse', 6094 type: 'ellipse',
6142 opacity: shapestyleOpacity, 6095 opacity: shapestyleOpacity,
6143 - draggable: true, 6096 + draggable: false,
6144 strokeStyle: shapestyleborderColor, 6097 strokeStyle: shapestyleborderColor,
6145 strokeWidth: shapestyleborderWidth, 6098 strokeWidth: shapestyleborderWidth,
6146 fillStyle: shapestyleFillColor, 6099 fillStyle: shapestyleFillColor,
@@ -6347,7 +6300,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -6347,7 +6300,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
6347 layer: true, 6300 layer: true,
6348 type:'Arrow', 6301 type:'Arrow',
6349 name: 'Arrow_' + ArrowNumber, 6302 name: 'Arrow_' + ArrowNumber,
6350 - draggable: true, 6303 + draggable: false,
6351 strokeStyle: shapestyleborderColor, 6304 strokeStyle: shapestyleborderColor,
6352 strokeWidth: shapestyleborderWidth, 6305 strokeWidth: shapestyleborderWidth,
6353 rounded: true, 6306 rounded: true,
@@ -6543,8 +6496,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -6543,8 +6496,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
6543 }); 6496 });
6544 $("#"+canvasId).drawLine({ 6497 $("#"+canvasId).drawLine({
6545 panelCanvasId:canvasId, 6498 panelCanvasId:canvasId,
6546 - draggable: true,  
6547 layer: true, 6499 layer: true,
  6500 + draggable: false,
6548 type:'Pin', 6501 type:'Pin',
6549 name: "Pin_" + PinNumber, 6502 name: "Pin_" + PinNumber,
6550 groups: ["Pin_" + PinNumber], 6503 groups: ["Pin_" + PinNumber],
@@ -6563,6 +6516,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -6563,6 +6516,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
6563 mouseup: 'pointer' 6516 mouseup: 'pointer'
6564 }, 6517 },
6565 add: function (layer) { 6518 add: function (layer) {
  6519 + layer.draggable = false;
6566 var drawingPoints={ 6520 var drawingPoints={
6567 "layerName": layer.name,//for internal use 6521 "layerName": layer.name,//for internal use
6568 "shapeType":layer.type, 6522 "shapeType":layer.type,
@@ -6742,7 +6696,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -6742,7 +6696,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
6742 $("#" + layer.panelCanvasId).drawArc({ 6696 $("#" + layer.panelCanvasId).drawArc({
6743 panelCanvasId:layer.panelCanvasId, 6697 panelCanvasId:layer.panelCanvasId,
6744 layer: true, 6698 layer: true,
6745 - draggable: true, 6699 + draggable: false,
6746 name: pinArcName, 6700 name: pinArcName,
6747 groups: [layer.groups], 6701 groups: [layer.groups],
6748 dragGroups: [layer.dragGroups], 6702 dragGroups: [layer.dragGroups],
@@ -6865,10 +6819,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -6865,10 +6819,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
6865 } 6819 }
6866 }, 6820 },
6867 }).drawArc({ 6821 }).drawArc({
6868 - draggable: true,  
6869 panelCanvasId:canvasId, 6822 panelCanvasId:canvasId,
6870 name: "ArcPin_" + PinNumber, 6823 name: "ArcPin_" + PinNumber,
6871 layer: true, 6824 layer: true,
  6825 + draggable: false,
6872 groups: ["Pin_" + PinNumber], 6826 groups: ["Pin_" + PinNumber],
6873 dragGroups: ["Pin_" + PinNumber], 6827 dragGroups: ["Pin_" + PinNumber],
6874 strokeStyle: 'grey', 6828 strokeStyle: 'grey',
@@ -7281,7 +7235,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -7281,7 +7235,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
7281 groups: [rectDimension[0].groupName], 7235 groups: [rectDimension[0].groupName],
7282 dragGroups: [rectDimension[0].groupName], 7236 dragGroups: [rectDimension[0].groupName],
7283 layer: true, 7237 layer: true,
7284 - draggable: true, 7238 + draggable: false,
7285 type:'textArea', 7239 type:'textArea',
7286 opacity: rectDimension[0].shapestyle.opacity, 7240 opacity: rectDimension[0].shapestyle.opacity,
7287 strokeStyle: rectDimension[0].shapestyle.color, 7241 strokeStyle: rectDimension[0].shapestyle.color,
@@ -7304,7 +7258,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -7304,7 +7258,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
7304 // Revert cursor on mouseup 7258 // Revert cursor on mouseup
7305 mouseup: 'pointer' 7259 mouseup: 'pointer'
7306 }, 7260 },
7307 - add: function (layer) { 7261 + add: function (layer) {
  7262 + layer.draggable = false;
7308 var drawingPoints={ 7263 var drawingPoints={
7309 "layerName": layer.name,//for internal use 7264 "layerName": layer.name,//for internal use
7310 "shapeType":layer.type, 7265 "shapeType":layer.type,
@@ -7789,7 +7744,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -7789,7 +7744,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
7789 }).drawText({ 7744 }).drawText({
7790 panelCanvasId:canvasId, 7745 panelCanvasId:canvasId,
7791 layer: true, 7746 layer: true,
7792 - draggable: true, 7747 + draggable: false,
7793 name: textDimension[0].name, 7748 name: textDimension[0].name,
7794 groups: [rectDimension[0].groupName], 7749 groups: [rectDimension[0].groupName],
7795 dragGroups: [rectDimension[0].groupName], 7750 dragGroups: [rectDimension[0].groupName],
@@ -7813,7 +7768,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data @@ -7813,7 +7768,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
7813 mouseup: 'pointer' 7768 mouseup: 'pointer'
7814 }, 7769 },
7815 add: function (layer) { 7770 add: function (layer) {
7816 - layer.draggable = true; 7771 + layer.draggable = false;
7817 //remove temptext 7772 //remove temptext
7818 $("#" + canvasId).removeLayer('temptext').drawLayers(); 7773 $("#" + canvasId).removeLayer('temptext').drawLayers();
7819 }, 7774 },
400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js
@@ -437,23 +437,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout @@ -437,23 +437,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
437 }); 437 });
438 438
439 var canvasDIvHeight = $('#vidImagePanel_' + windowviewid+ " .jsPanel-content").height(); 439 var canvasDIvHeight = $('#vidImagePanel_' + windowviewid+ " .jsPanel-content").height();
440 - $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight);  
441 -  
442 - var videoHeight = $('#divplayerinlineVideo_'+ windowviewid +' div').height();  
443 - if (videoHeight <= 0)  
444 - videoHeight = 360;  
445 - var textH = $('.video-subtitle').height();  
446 - textH = textH + 40;  
447 - var blackBorderHeight = canvasDIvHeight - (videoHeight + textH);  
448 -  
449 - if ($('.jsPanel-content').length > 0) {  
450 - $('.video-subtitle').css('margin-bottom', blackBorderHeight);  
451 - $('#divplayerinlineVideo_'+ windowviewid ).css('background', '#fff');  
452 - //Android > Clinical Animations > The animation does not fit to the screen in the Landscape mode.  
453 - var $ua = navigator.userAgent;  
454 - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { $('.jsPanel-content').css("width", "100%"); }  
455 - }  
456 - 440 + $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight);
457 } 441 }
458 442
459 //Calling methode for save Js Panel Activity for SaveCB 443 //Calling methode for save Js Panel Activity for SaveCB
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -856,7 +856,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -856,7 +856,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
856 var canvasDraw='canvasAA_' + windowviewid; 856 var canvasDraw='canvasAA_' + windowviewid;
857 var canvasPaint='canvasPaintAA_' + windowviewid; 857 var canvasPaint='canvasPaintAA_' + windowviewid;
858 858
859 - var demoData= {shapeStates:[],paintCanvasState:""}; 859 + var demoData= {shapeStates:[],paintCanvasState:[]};
860 $rootScope.setAADAPanelCordinate(windowviewid,0,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,demoData); 860 $rootScope.setAADAPanelCordinate(windowviewid,0,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,demoData);
861 861
862 $timeout(function () { 862 $timeout(function () {
@@ -881,7 +881,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -881,7 +881,6 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
881 if ($rootScope.isCallFromOtherModule) { 881 if ($rootScope.isCallFromOtherModule) {
882 $scope.loadAAonCBData(windowviewid); 882 $scope.loadAAonCBData(windowviewid);
883 883
884 - //$rootScope.ShowAnnotationWindow(); //show tool if need  
885 var annotationData= $scope.aaOpenInOtherModules.annotationData; 884 var annotationData= $scope.aaOpenInOtherModules.annotationData;
886 // load annotation 885 // load annotation
887 if(annotationData!="" && annotationData!=undefined) 886 if(annotationData!="" && annotationData!=undefined)
@@ -1095,8 +1094,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1095,8 +1094,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1095 1094
1096 //get last zindex 1095 //get last zindex
1097 var zindex= $("#aaDetailViewCanvas_"+windowviewid).css("z-index"); 1096 var zindex= $("#aaDetailViewCanvas_"+windowviewid).css("z-index");
1098 - //remove all canvas  
1099 - $('#'+'canvasAADiv_' + windowviewid+' canvas').remove(); 1097 + $("#aaDetailViewCanvas_"+windowviewid).remove();
1100 1098
1101 //0.5 create canvas on the top of image so that I can draw a line over the canvas. 1099 //0.5 create canvas on the top of image so that I can draw a line over the canvas.
1102 var canvas = document.createElement('canvas'); 1100 var canvas = document.createElement('canvas');
@@ -1116,16 +1114,16 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1116,16 +1114,16 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1116 var canvasDraw='canvasAA_' + windowviewid; 1114 var canvasDraw='canvasAA_' + windowviewid;
1117 var canvasPaint='canvasPaintAA_' + windowviewid; 1115 var canvasPaint='canvasPaintAA_' + windowviewid;
1118 $scope.SetAAwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); 1116 $scope.SetAAwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]});
1119 -  
1120 - var ATBarHtml = $("#" + canvasDiv).append('<canvas id="' + canvasPaint + '" width="2277" height="3256" class="canvas-annotationStyle1" style="left:0px;position:absolute"></canvas><canvas id="' + canvasDraw + '" width="2277" height="3256" class="canvas-annotationStyle" style="left:0px;position:absolute"></canvas>');  
1121 - $compile(ATBarHtml)($scope); 1117 +
  1118 + $('#' + canvasDraw).removeLayers();//remove all old shape
  1119 + $("#" + canvasPaint).sketch().actions = [];//remove old paint data
1122 1120
1123 var extraheight=$('#aastickeyarea').height()+15; 1121 var extraheight=$('#aastickeyarea').height()+15;
1124 var extrawidth=$('.tools').width()+15; 1122 var extrawidth=$('.tools').width()+15;
1125 var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; 1123 var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight;
1126 var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; 1124 var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth;
1127 1125
1128 - var demoData= {shapeStates:[],paintCanvasState:""}; 1126 + var demoData= {shapeStates:[],paintCanvasState:[]};
1129 $rootScope.setAADAPanelCordinate(windowviewid,0,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,demoData); 1127 $rootScope.setAADAPanelCordinate(windowviewid,0,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,demoData);
1130 1128
1131 $scope.SetAAwindowStoreData(windowviewid,'isSliderChange',true); 1129 $scope.SetAAwindowStoreData(windowviewid,'isSliderChange',true);
400-SOURCECODE/AIAHTML5.Web/libs/sketch.js
@@ -20,10 +20,23 @@ var __slice = Array.prototype.slice; @@ -20,10 +20,23 @@ var __slice = Array.prototype.slice;
20 } else { 20 } else {
21 return $.error('Sketch.js did not recognize the given command.'); 21 return $.error('Sketch.js did not recognize the given command.');
22 } 22 }
23 - } else if (sketch) { 23 + }
  24 + else if (sketch)
  25 + {
  26 + if(key!=undefined)
  27 + {
  28 + // redraw action while resize panel
  29 + this.data('sketch', new Sketch(this.get(0), key));
  30 + return this;
  31 + }
  32 +
24 return sketch; 33 return sketch;
25 - } else { 34 + }
  35 + else
  36 + {
  37 +
26 this.data('sketch', new Sketch(this.get(0), key)); 38 this.data('sketch', new Sketch(this.get(0), key));
  39 +
27 return this; 40 return this;
28 } 41 }
29 }; 42 };
@@ -46,8 +59,12 @@ var __slice = Array.prototype.slice; @@ -46,8 +59,12 @@ var __slice = Array.prototype.slice;
46 if(opts!=undefined) 59 if(opts!=undefined)
47 { 60 {
48 this.actions= opts.drawAction; 61 this.actions= opts.drawAction;
49 - // Redraw image by using the data  
50 - this.redraw(); 62 + if(this.actions!=undefined)
  63 + {
  64 + // Redraw image by using the data
  65 + this.redraw();
  66 + }
  67 +
51 } 68 }
52 this.action = []; 69 this.action = [];
53 this.canvas.bind('click mousedown mouseup mousemove mouseleave mouseout touchstart touchmove touchend touchcancel', this.onEvent); 70 this.canvas.bind('click mousedown mouseup mousemove mouseleave mouseout touchstart touchmove touchend touchcancel', this.onEvent);