Commit 7b36999561b38547ae1e3917dab07e1fd0c67fc2
1 parent
26ccbd94
making module responsive and redrawing annotations on resize panels
Showing
18 changed files
with
1331 additions
and
721 deletions
400-SOURCECODE/AIAHTML5.API/Models/Users.cs
... | ... | @@ -677,6 +677,9 @@ namespace AIAHTML5.API.Models |
677 | 677 | |
678 | 678 | } |
679 | 679 | |
680 | + // add editon number for provide CA link | |
681 | + userInfo.StudentEdition = GetStudentEdition(userInfo.LicenseId); | |
682 | + | |
680 | 683 | // get edition features details |
681 | 684 | userInfo.objEditionFeatures = objDBModel.GetEditionFeatures((Byte)intEditionId); |
682 | 685 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/3dAController.js
... | ... | @@ -504,16 +504,19 @@ function ($scope, $rootScope, pages, log, $http, DataService, $filter, $location |
504 | 504 | $rootScope.resetMenuOptionOnClick(pnlName); |
505 | 505 | }, |
506 | 506 | resizable: { |
507 | + minWidth: 600, | |
508 | + minHeight: 500, | |
507 | 509 | stop: function (event, ui) { |
508 | 510 | var pnlName=event.currentTarget.id; |
509 | 511 | var len = (pnlName).split("_").length; |
510 | 512 | var windowviewid = (pnlName).split("_")[len - 1]; |
513 | + var canvasDIvHeight = $('#ThreeDImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
511 | 514 | $scope.Set3DwindowStoreData(windowviewid, 'width', ui.size.width); |
512 | - $scope.Set3DwindowStoreData(windowviewid, 'height', ui.size.height); | |
515 | + $scope.Set3DwindowStoreData(windowviewid, 'height', canvasDIvHeight); | |
513 | 516 | $scope.Set3DwindowStoreData(windowviewid, 'y', ui.position.top); |
514 | 517 | $scope.Set3DwindowStoreData(windowviewid, 'x', ui.position.left); |
515 | 518 | $rootScope.UnsaveCurriculum = true; |
516 | - var canvasDIvHeight = $('#ThreeDImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
519 | + | |
517 | 520 | $('#thContentDiv_'+ windowviewid ).css("height",canvasDIvHeight); |
518 | 521 | $rootScope.resetMenuOptionOnClick(pnlName); |
519 | 522 | } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
... | ... | @@ -80,6 +80,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
80 | 80 | 'maximised': true, |
81 | 81 | 'minmaxAutoEvent':true, |
82 | 82 | 'annotationData':{shapeStates:[],paintCanvasState:[]}, |
83 | + 'imgLeft': 0, | |
83 | 84 | }; |
84 | 85 | return windata; |
85 | 86 | } |
... | ... | @@ -1082,6 +1083,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1082 | 1083 | var imageId = $scope.aiOpenInOtherModules.id; |
1083 | 1084 | |
1084 | 1085 | $scope.SetAIwindowStoreData(windowviewid, 'imageId', imageId); |
1086 | + var imgLeft = $scope.aiOpenInOtherModules.imgLeft!=undefined?$scope.aiOpenInOtherModules.imgLeft:0; | |
1087 | + $scope.SetAIwindowStoreData(windowviewid, 'imgLeft', imgLeft); | |
1085 | 1088 | |
1086 | 1089 | var selectedTileData = []; |
1087 | 1090 | selectedTileData = new jinqJs() |
... | ... | @@ -1184,7 +1187,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1184 | 1187 | content: '<div>'+ |
1185 | 1188 | ' <div class="container-fluid">'+ |
1186 | 1189 | ' <div class="row">'+ |
1187 | - '<div class="img-thumbnail" style="overflow: scroll;width:100%;position:relative" id="canvasDivAI_' + windowviewid + '" ><canvas id="canvasPaintAI_' + windowviewid + '" ng-click="FreeStylePaint($event)" width="2270" height="1000" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px"></canvas><canvas id="canvasAI_' + windowviewid + '" ng-click="onDrawingCanvasClick($event)" width="2270" height="1000" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas>' + | |
1190 | + '<div class="img-thumbnail" style="overflow: scroll;width:100%;position:relative" id="canvasDivAI_' + windowviewid + '" ><canvas id="canvasPaintAI_' + windowviewid + '" ng-click="FreeStylePaint($event)" width="2270" height="1000" class="canvas-annotationStyle1" style="position: absolute;z-index:0;left:0px "></canvas><canvas id="canvasAI_' + windowviewid + '" ng-click="onDrawingCanvasClick($event)" width="2270" height="1000" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1;left:0px "></canvas>' + | |
1188 | 1191 | '<img id="aimage_' + windowviewid + '" alt="" title="" style="left:0px;top:0px;position:absolute;visibility:hidden">' + |
1189 | 1192 | '</div>'+ |
1190 | 1193 | '</div></div></div>', |
... | ... | @@ -1215,46 +1218,77 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1215 | 1218 | var pnlName=panel[0].id; |
1216 | 1219 | var len = (pnlName).split("_").length; |
1217 | 1220 | var windowviewid = (pnlName).split("_")[len - 1]; |
1221 | + | |
1222 | + $scope.SetAIwindowStoreData(windowviewid, 'maximised',true); | |
1223 | + $scope.SetAIwindowStoreData(windowviewid, 'minimised',false); | |
1224 | + var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height()-5; | |
1225 | + var canvasDIvWidth = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
1226 | + var canvasDiv='canvasDivAI_' + windowviewid; | |
1227 | + var canvasDraw='canvasAI_' + windowviewid; | |
1228 | + var canvasPaint='canvasPaintAI_' + windowviewid; | |
1229 | + var imgName='aimage_' + windowviewid; | |
1218 | 1230 | var isAutoCalled = $scope.GetAIwindowStoreData(windowviewid, 'minmaxAutoEvent'); |
1219 | 1231 | if(!isAutoCalled) |
1220 | 1232 | { |
1221 | 1233 | $rootScope.UnsaveCurriculum = true; |
1222 | - } | |
1223 | - $scope.SetAIwindowStoreData(windowviewid, 'maximised',true); | |
1224 | - $scope.SetAIwindowStoreData(windowviewid, 'minimised',false); | |
1225 | - var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1226 | - $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5); | |
1227 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
1234 | + var oldleft= $rootScope.GetAIwindowData(windowviewid, 'imgLeft'); | |
1235 | + var annotationData=$rootScope.GetAIwindowData(windowviewid,'annotationData'); | |
1236 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight,canvasDIvWidth,annotationData); | |
1237 | + var img = document.getElementById(imgName); | |
1238 | + $rootScope.SetAIwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
1239 | + } | |
1228 | 1240 | |
1229 | 1241 | }, |
1230 | 1242 | onnormalized:function (panel) { |
1231 | 1243 | var pnlName=panel[0].id; |
1232 | 1244 | var len = (pnlName).split("_").length; |
1233 | 1245 | var windowviewid = (pnlName).split("_")[len - 1]; |
1246 | + | |
1247 | + $scope.SetAIwindowStoreData(windowviewid, 'minimised',false); | |
1248 | + $scope.SetAIwindowStoreData(windowviewid, 'maximised',false); | |
1249 | + var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height()-5; | |
1250 | + var canvasDIvWidth = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
1251 | + var canvasDiv='canvasDivAI_' + windowviewid; | |
1252 | + var canvasDraw='canvasAI_' + windowviewid; | |
1253 | + var canvasPaint='canvasPaintAI_' + windowviewid; | |
1254 | + var imgName='aimage_' + windowviewid; | |
1234 | 1255 | var isAutoCalled = $scope.GetAIwindowStoreData(windowviewid, 'minmaxAutoEvent'); |
1235 | 1256 | if(!isAutoCalled) |
1236 | 1257 | { |
1237 | 1258 | $rootScope.UnsaveCurriculum = true; |
1238 | - } | |
1239 | - $scope.SetAIwindowStoreData(windowviewid, 'minimised',false); | |
1240 | - $scope.SetAIwindowStoreData(windowviewid, 'maximised',false); | |
1241 | - var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1242 | - $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5); | |
1243 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
1259 | + var oldleft= $rootScope.GetAIwindowData(windowviewid, 'imgLeft'); | |
1260 | + var annotationData=$rootScope.GetAIwindowData(windowviewid,'annotationData'); | |
1261 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight,canvasDIvWidth,annotationData); | |
1262 | + var img = document.getElementById(imgName); | |
1263 | + $rootScope.SetAIwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
1264 | + } | |
1244 | 1265 | }, |
1245 | 1266 | resizable: { |
1267 | + minWidth: 600, | |
1268 | + minHeight: 500, | |
1246 | 1269 | stop: function (event, ui) { |
1247 | 1270 | var pnlName=event.currentTarget.id; |
1248 | 1271 | var len = (pnlName).split("_").length; |
1249 | 1272 | var windowviewid = (pnlName).split("_")[len - 1]; |
1273 | + $rootScope.UnsaveCurriculum = true; | |
1274 | + var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1275 | + var canvasDIvWidth = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
1250 | 1276 | $scope.SetAIwindowStoreData(windowviewid, 'width', ui.size.width); |
1251 | - $scope.SetAIwindowStoreData(windowviewid, 'height', ui.size.height); | |
1277 | + $scope.SetAIwindowStoreData(windowviewid, 'height', canvasDIvHeight); | |
1252 | 1278 | $scope.SetAIwindowStoreData(windowviewid, 'y', ui.position.top); |
1253 | 1279 | $scope.SetAIwindowStoreData(windowviewid, 'x', ui.position.left); |
1254 | - $rootScope.UnsaveCurriculum = true; | |
1255 | - var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1256 | - $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5); | |
1257 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
1280 | + | |
1281 | + var canvasDiv='canvasDivAI_' + windowviewid; | |
1282 | + var canvasDraw='canvasAI_' + windowviewid; | |
1283 | + var canvasPaint='canvasPaintAI_' + windowviewid; | |
1284 | + var imgName='aimage_' + windowviewid; | |
1285 | + var oldleft= $rootScope.GetAIwindowData(windowviewid, 'imgLeft'); | |
1286 | + var annotationData=$rootScope.GetAIwindowData(windowviewid,'annotationData'); | |
1287 | + | |
1288 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight-5,canvasDIvWidth,annotationData); | |
1289 | + var img = document.getElementById(imgName); | |
1290 | + $rootScope.SetAIwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
1291 | + | |
1258 | 1292 | } |
1259 | 1293 | |
1260 | 1294 | }, |
... | ... | @@ -1297,36 +1331,26 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1297 | 1331 | $timeout(function () { |
1298 | 1332 | |
1299 | 1333 | $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important') |
1300 | - var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1301 | - | |
1302 | - $('#canvasDivAI_' + windowviewid).css('height', canvasDIvHeight-5); | |
1303 | - | |
1304 | - | |
1305 | - var canvas = document.getElementById("canvasAI_" + windowviewid); | |
1306 | - var canvasPaint = document.getElementById("canvasPaintAI_" + windowviewid); | |
1307 | - | |
1308 | - var $ua = navigator.userAgent; | |
1309 | - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
1310 | - canvas.width = screen.width-20; | |
1311 | - canvasPaint.width = screen.width-20; | |
1312 | - canvas.height = screen.height-130; | |
1313 | - canvasPaint.height = screen.height-130; | |
1314 | - } | |
1315 | - else | |
1316 | - { | |
1317 | - canvas.height = screen.height-280; | |
1318 | - canvasPaint.height = screen.height-280; | |
1319 | - canvas.width = screen.width-40; | |
1320 | - canvasPaint.width = screen.width-40; | |
1321 | - } | |
1322 | - | |
1334 | + var canvasDIvHeight = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").height()-5; | |
1335 | + var canvasDIvWidth = $('#aiImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
1336 | + | |
1323 | 1337 | $scope.SetAIwindowStoreData(windowviewid, 'currentSlug', 'adam-images-detail'); |
1338 | + | |
1324 | 1339 | var openedImage = document.getElementById('aimage_' + windowviewid ); |
1325 | 1340 | openedImage.src = selectedAIImage; |
1326 | 1341 | openedImage.onload = function () { |
1327 | - if (!$rootScope.isCallFromOtherModule) { | |
1328 | - $("#aimage_"+windowviewid).css("left", (screen.width-this.width-70)/2 + "px"); | |
1329 | - } | |
1342 | + var pnlName='aiImagePanel_' + windowviewid; | |
1343 | + var canvasDiv='canvasDivAI_' + windowviewid; | |
1344 | + var canvasDraw='canvasAI_' + windowviewid; | |
1345 | + var canvasPaint='canvasPaintAI_' + windowviewid; | |
1346 | + var imgName='aimage_' + windowviewid; | |
1347 | + | |
1348 | + var demoData= {shapeStates:[],paintCanvasState:""}; | |
1349 | + var oldleft= $rootScope.GetAIwindowData(windowviewid, 'imgLeft'); | |
1350 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight,canvasDIvWidth,demoData); | |
1351 | + var img = document.getElementById(imgName); | |
1352 | + $rootScope.SetAIwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
1353 | + | |
1330 | 1354 | $("#aimage_"+windowviewid).css("visibility","visible"); |
1331 | 1355 | |
1332 | 1356 | $scope.JsPanelclick(windowviewid); |
... | ... | @@ -1338,8 +1362,16 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1338 | 1362 | { |
1339 | 1363 | if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) |
1340 | 1364 | { |
1365 | + var modifiedData=$rootScope.resetAnnotationData(imgName,oldleft,annotationData); | |
1366 | + if(modifiedData!="" && modifiedData!=undefined) | |
1367 | + { | |
1368 | + if(modifiedData.shapeStates.length>0||modifiedData.paintCanvasState.length>0) | |
1369 | + { | |
1370 | + annotationData=modifiedData; | |
1371 | + } | |
1372 | + } | |
1341 | 1373 | //first draw shape and then store in object |
1342 | - $rootScope.LoadCBSavedAnnotation("canvasAI_"+windowviewid,"canvasPaintAI_"+windowviewid,annotationData); | |
1374 | + $rootScope.LoadCBSavedAnnotation(canvasDraw,canvasPaint,annotationData); | |
1343 | 1375 | } |
1344 | 1376 | } |
1345 | 1377 | |
... | ... | @@ -1356,6 +1388,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1356 | 1388 | } |
1357 | 1389 | |
1358 | 1390 | } |
1391 | + | |
1359 | 1392 | $rootScope.aiAnnotationToolEvent = function (windowviewid) { |
1360 | 1393 | |
1361 | 1394 | $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(255,255,255)") | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CAController.js
... | ... | @@ -390,7 +390,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
390 | 390 | promise.then( |
391 | 391 | function (result) { |
392 | 392 | |
393 | - if($rootScope.userData.Id>1 && $rootScope.userData.LicenseInfo!= null && $rootScope.userData.EditionId<=2 && $rootScope.userData.StudentEdition!= null && $rootScope.userData.StudentEdition.length>0) | |
393 | + if($rootScope.userData.LicenseInfo!= null && $rootScope.userData.EditionId<=2 && $rootScope.userData.StudentEdition!= null && $rootScope.userData.StudentEdition.length>0) | |
394 | 394 | { |
395 | 395 | $scope.islinkActive = true; |
396 | 396 | var AnimationData = new jinqJs() |
... | ... | @@ -435,7 +435,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
435 | 435 | angular.forEach($scope.selectedCAListViewData, function (value, key) { |
436 | 436 | var imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; |
437 | 437 | |
438 | - if($rootScope.userData.Id>1 && $rootScope.userData.LicenseInfo!= null && $rootScope.userData.EditionId<=2 && $rootScope.userData.StudentEdition!= null && $rootScope.userData.StudentEdition.length>0) | |
438 | + if($rootScope.userData.LicenseInfo!= null && $rootScope.userData.EditionId<=2 && $rootScope.userData.StudentEdition!= null && $rootScope.userData.StudentEdition.length>0) | |
439 | 439 | { |
440 | 440 | var $el = $('<div class="col-sm-3 col-lg-2">' |
441 | 441 | +'<div id="' + value._id + '" title = "'+ value._Title + '" data-ng-click="openView($event)">' |
... | ... | @@ -676,7 +676,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
676 | 676 | |
677 | 677 | if (selectimg === true && count >= filtercount) { |
678 | 678 | var imagePath = "~/../content/images/ca/thumbnails/" + value._ThumbnailImage; |
679 | - if($rootScope.userData.Id>1 && $rootScope.userData.LicenseInfo!= null && $rootScope.userData.EditionId<=2 && $rootScope.userData.StudentEdition!= null && $rootScope.userData.StudentEdition.length>0) | |
679 | + if($rootScope.userData.LicenseInfo!= null && $rootScope.userData.EditionId<=2 && $rootScope.userData.StudentEdition!= null && $rootScope.userData.StudentEdition.length>0) | |
680 | 680 | { |
681 | 681 | var $el = $('<div class="col-sm-3 col-lg-2">' |
682 | 682 | +'<div id="' + value._id + '" title = "'+ value._Title + '" data-ng-click="openView($event)">' |
... | ... | @@ -1217,16 +1217,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1217 | 1217 | $rootScope.resetMenuOptionOnClick(pnlName); |
1218 | 1218 | }, |
1219 | 1219 | resizable: { |
1220 | + minWidth: 600, | |
1221 | + minHeight: 500, | |
1220 | 1222 | stop: function (event, ui) { |
1221 | 1223 | var pnlName=event.currentTarget.id; |
1222 | 1224 | var len = (pnlName).split("_").length; |
1223 | 1225 | var windowviewid = (pnlName).split("_")[len - 1]; |
1226 | + var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1224 | 1227 | $scope.SetCAwindowStoreData(windowviewid, 'width', ui.size.width); |
1225 | - $scope.SetCAwindowStoreData(windowviewid, 'height', ui.size.height); | |
1228 | + $scope.SetCAwindowStoreData(windowviewid, 'height', canvasDIvHeight); | |
1226 | 1229 | $scope.SetCAwindowStoreData(windowviewid, 'y', ui.position.top); |
1227 | 1230 | $scope.SetCAwindowStoreData(windowviewid, 'x', ui.position.left); |
1228 | 1231 | $rootScope.UnsaveCurriculum = true; |
1229 | - var canvasDIvHeight = $('#caImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1232 | + | |
1230 | 1233 | $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight-120 ); |
1231 | 1234 | $rootScope.resetMenuOptionOnClick(pnlName); |
1232 | 1235 | } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CIController.js
... | ... | @@ -76,6 +76,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
76 | 76 | 'maximised': true, |
77 | 77 | 'minmaxAutoEvent':true, |
78 | 78 | 'annotationData':{shapeStates:[],paintCanvasState:[]}, |
79 | + 'imgLeft': 0, | |
79 | 80 | |
80 | 81 | }; |
81 | 82 | return windata; |
... | ... | @@ -859,6 +860,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
859 | 860 | var imageId = $scope.ciOpenInOtherModules.id; |
860 | 861 | |
861 | 862 | $scope.SetCIwindowStoreData(windowviewid, 'imageId', imageId); |
863 | + var imgLeft = $scope.ciOpenInOtherModules.imgLeft!=undefined?$scope.ciOpenInOtherModules.imgLeft:0; | |
864 | + $scope.SetCIwindowStoreData(windowviewid, 'imgLeft', imgLeft); | |
862 | 865 | |
863 | 866 | var selectedTileData = []; |
864 | 867 | selectedTileData = new jinqJs() |
... | ... | @@ -971,7 +974,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
971 | 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>' + |
972 | 975 | //'<div class="col-sm-12 img-thumbnail" align="center">' + |
973 | 976 | '<img id="ciimage_' + windowviewid + '" alt="" title="" style="left:0px;top:0px;position:absolute;visibility:hidden">' + |
974 | - '<div id="summary_' + windowviewid + '" class="col-sm-12 well img-subtitle" style="position:absolute;margin-bottom:0px;padding:5px;width:99%">' + | |
977 | + '<div id="summary_' + windowviewid + '" class="col-sm-12 well img-subtitle" style="position:absolute;bottom:0px;margin-bottom:0px;padding:5px;width:99%">' + | |
975 | 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>' + |
976 | 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>' + |
977 | 980 | '</div>'+ |
... | ... | @@ -1001,58 +1004,80 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1001 | 1004 | onmaximized:function (panel) { |
1002 | 1005 | var pnlName=panel[0].id; |
1003 | 1006 | var len = (pnlName).split("_").length; |
1004 | - var windowviewid = (pnlName).split("_")[len - 1]; | |
1005 | - var isAutoCalled = $scope.GetCIwindowStoreData(windowviewid, 'minmaxAutoEvent'); | |
1006 | - if(!isAutoCalled) | |
1007 | - { | |
1008 | - $rootScope.UnsaveCurriculum = true; | |
1009 | - } | |
1007 | + var windowviewid = (pnlName).split("_")[len - 1]; | |
1010 | 1008 | $scope.SetCIwindowStoreData(windowviewid, 'maximised',true); |
1011 | 1009 | $scope.SetCIwindowStoreData(windowviewid, 'minimised',false); |
1012 | - var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1013 | - $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight); | |
1014 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
1010 | + var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height()-5; | |
1011 | + var canvasDIvWidth = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
1012 | + var canvasDiv='canvasDivCI_' + windowviewid; | |
1013 | + var canvasDraw='canvasCI_' + windowviewid; | |
1014 | + var canvasPaint='canvasPaintCI_' + windowviewid; | |
1015 | + var imgName='ciimage_' + windowviewid; | |
1015 | 1016 | |
1017 | + var isAutoCalled = $scope.GetCIwindowStoreData(windowviewid, 'minmaxAutoEvent'); | |
1018 | + if(!isAutoCalled) | |
1019 | + { | |
1020 | + $rootScope.UnsaveCurriculum = true; | |
1021 | + var oldleft= $rootScope.GetCIwindowData(windowviewid, 'imgLeft'); | |
1022 | + var annotationData=$rootScope.GetCIwindowData(windowviewid,'annotationData'); | |
1023 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight,canvasDIvWidth,annotationData); | |
1024 | + var img = document.getElementById(imgName); | |
1025 | + $rootScope.SetCIwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
1026 | + } | |
1027 | + | |
1016 | 1028 | }, |
1017 | 1029 | onnormalized:function (panel) { |
1018 | 1030 | var pnlName=panel[0].id; |
1019 | 1031 | var len = (pnlName).split("_").length; |
1020 | 1032 | var windowviewid = (pnlName).split("_")[len - 1]; |
1033 | + $scope.SetCIwindowStoreData(windowviewid, 'minimised',false); | |
1034 | + $scope.SetCIwindowStoreData(windowviewid, 'maximised',false); | |
1035 | + var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height()-5; | |
1036 | + var canvasDIvWidth = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
1037 | + var canvasDiv='canvasDivCI_' + windowviewid; | |
1038 | + var canvasDraw='canvasCI_' + windowviewid; | |
1039 | + var canvasPaint='canvasPaintCI_' + windowviewid; | |
1040 | + var imgName='ciimage_' + windowviewid; | |
1041 | + | |
1021 | 1042 | var isAutoCalled = $scope.GetCIwindowStoreData(windowviewid, 'minmaxAutoEvent'); |
1022 | 1043 | if(!isAutoCalled) |
1023 | 1044 | { |
1024 | - $rootScope.UnsaveCurriculum = true; | |
1045 | + $rootScope.UnsaveCurriculum = true; | |
1046 | + var oldleft= $rootScope.GetCIwindowData(windowviewid, 'imgLeft'); | |
1047 | + var annotationData=$rootScope.GetCIwindowData(windowviewid,'annotationData'); | |
1048 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight,canvasDIvWidth,annotationData); | |
1049 | + var img = document.getElementById(imgName); | |
1050 | + $rootScope.SetCIwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
1025 | 1051 | } |
1026 | - $scope.SetCIwindowStoreData(windowviewid, 'minimised',false); | |
1027 | - $scope.SetCIwindowStoreData(windowviewid, 'maximised',false); | |
1028 | - var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1029 | - $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight); | |
1030 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
1052 | + | |
1031 | 1053 | }, |
1032 | 1054 | resizable: { |
1055 | + minWidth: 600, | |
1056 | + minHeight: 500, | |
1033 | 1057 | stop: function (event, ui) { |
1034 | 1058 | var pnlName=event.currentTarget.id; |
1035 | 1059 | var len = (pnlName).split("_").length; |
1036 | 1060 | var windowviewid = (pnlName).split("_")[len - 1]; |
1061 | + var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1062 | + var canvasDIvWidth = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
1037 | 1063 | $scope.SetCIwindowStoreData(windowviewid, 'width', ui.size.width); |
1038 | - $scope.SetCIwindowStoreData(windowviewid, 'height', ui.size.height); | |
1064 | + $scope.SetCIwindowStoreData(windowviewid, 'height', canvasDIvHeight); | |
1039 | 1065 | $scope.SetCIwindowStoreData(windowviewid, 'y', ui.position.top); |
1040 | 1066 | $scope.SetCIwindowStoreData(windowviewid, 'x', ui.position.left); |
1041 | 1067 | $rootScope.UnsaveCurriculum = true; |
1042 | - var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1043 | - //annotation lost after resize paint canvas | |
1044 | - // var canvasDIvWidth = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").width()-50; | |
1045 | - // var canvas = document.getElementById("canvasCI_" + windowviewid); | |
1046 | - // var canvasPaint = document.getElementById("canvasPaintCI_" + windowviewid); | |
1047 | - //canvas.height = canvasDIvHeight-200; | |
1048 | - // canvasPaint.height = canvasDIvHeight-200; | |
1049 | - // canvas.width = canvasDIvWidth; | |
1050 | - // canvasPaint.width = canvasDIvWidth; | |
1051 | - | |
1052 | - $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight); | |
1053 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
1054 | - | |
1055 | 1068 | |
1069 | + | |
1070 | + var canvasDiv='canvasDivCI_' + windowviewid; | |
1071 | + var canvasDraw='canvasCI_' + windowviewid; | |
1072 | + var canvasPaint='canvasPaintCI_' + windowviewid; | |
1073 | + var imgName='ciimage_' + windowviewid; | |
1074 | + var oldleft= $rootScope.GetCIwindowData(windowviewid, 'imgLeft'); | |
1075 | + var annotationData=$rootScope.GetCIwindowData(windowviewid,'annotationData'); | |
1076 | + | |
1077 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight-5,canvasDIvWidth,annotationData); | |
1078 | + var img = document.getElementById(imgName); | |
1079 | + $rootScope.SetCIwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
1080 | + | |
1056 | 1081 | } |
1057 | 1082 | |
1058 | 1083 | }, |
... | ... | @@ -1094,52 +1119,26 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1094 | 1119 | |
1095 | 1120 | |
1096 | 1121 | $scope.SetCIwindowStoreData(windowviewid, 'currentSlug', 'clinical-illustrations-detail'); |
1097 | - var $ua = navigator.userAgent; | |
1098 | - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
1099 | - $('#summary_' + windowviewid).css("top", screen.height-270); | |
1100 | - } | |
1101 | - else | |
1102 | - { | |
1103 | - $('#summary_' + windowviewid).css("top", screen.height-420); | |
1104 | - } | |
1122 | + | |
1105 | 1123 | $timeout(function () { |
1106 | - var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1124 | + var canvasDIvHeight = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").height()-5; | |
1125 | + var canvasDIvWidth = $('#ciImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
1107 | 1126 | |
1108 | - $('#canvasDivCI_' + windowviewid).css('height', canvasDIvHeight); | |
1109 | - | |
1110 | - if (!$rootScope.isCallFromOtherModule) { | |
1111 | - $('#CIView').css("height", $(window).innerHeight()-100); | |
1112 | - $('#CIView').css("width",$(window).innerWidth()-100); | |
1113 | - } | |
1114 | - | |
1115 | - var canvas = document.getElementById("canvasCI_" + windowviewid); | |
1116 | - var canvasPaint = document.getElementById("canvasPaintCI_" + windowviewid); | |
1117 | - | |
1118 | - var $ua = navigator.userAgent; | |
1119 | - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
1120 | - canvas.width = screen.width-20; | |
1121 | - canvasPaint.width = screen.width-20; | |
1122 | - canvas.height = screen.height-270; | |
1123 | - canvasPaint.height = screen.height-270; | |
1124 | - } | |
1125 | - else | |
1126 | - { | |
1127 | - canvas.width = screen.width-40; | |
1128 | - canvasPaint.width = screen.width-40; | |
1129 | - canvas.height = screen.height-400; | |
1130 | - canvasPaint.height = screen.height-400; | |
1131 | - } | |
1132 | - if(screen.height<400) | |
1133 | - { | |
1134 | - $('#summary_' + windowviewid).css("bottom", "-220px"); | |
1135 | - } | |
1136 | - | |
1137 | 1127 | var openedImage = document.getElementById('ciimage_' + windowviewid ); |
1138 | 1128 | openedImage.src = selectedCIImage; |
1139 | 1129 | openedImage.onload = function () { |
1140 | - if (!$rootScope.isCallFromOtherModule) { | |
1141 | - $("#ciimage_"+windowviewid).css("left", (screen.width-this.width-70)/2 + "px"); | |
1142 | - } | |
1130 | + var pnlName='ciImagePanel_' + windowviewid; | |
1131 | + var canvasDiv='canvasDivCI_' + windowviewid; | |
1132 | + var canvasDraw='canvasCI_' + windowviewid; | |
1133 | + var canvasPaint='canvasPaintCI_' + windowviewid; | |
1134 | + var imgName='ciimage_' + windowviewid; | |
1135 | + | |
1136 | + var demoData= {shapeStates:[],paintCanvasState:""}; | |
1137 | + var oldleft= $rootScope.GetCIwindowData(windowviewid, 'imgLeft'); | |
1138 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight,canvasDIvWidth,demoData); | |
1139 | + var img = document.getElementById(imgName); | |
1140 | + $rootScope.SetCIwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
1141 | + | |
1143 | 1142 | $("#ciimage_"+windowviewid).css("visibility","visible"); |
1144 | 1143 | var canvasZIndex = $("#canvasCI_" + windowviewid).css("z-index"); |
1145 | 1144 | var canvasPaintZIndex = $("#canvasPaintCI_" + windowviewid).css("z-index"); |
... | ... | @@ -1169,9 +1168,18 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
1169 | 1168 | if(annotationData!="" && annotationData!=undefined) |
1170 | 1169 | { |
1171 | 1170 | if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) |
1172 | - { | |
1171 | + { | |
1172 | + var modifiedData=$rootScope.resetAnnotationData(imgName,oldleft,annotationData); | |
1173 | + if(modifiedData!="" && modifiedData!=undefined) | |
1174 | + { | |
1175 | + if(modifiedData.shapeStates.length>0||modifiedData.paintCanvasState.length>0) | |
1176 | + { | |
1177 | + annotationData=modifiedData; | |
1178 | + } | |
1179 | + } | |
1173 | 1180 | //first draw shape and then store in object |
1174 | - $rootScope.LoadCBSavedAnnotation("canvasCI_"+windowviewid,"canvasPaintCI_"+windowviewid,annotationData); | |
1181 | + $rootScope.LoadCBSavedAnnotation(canvasDraw,canvasPaint,annotationData); | |
1182 | + | |
1175 | 1183 | } |
1176 | 1184 | } |
1177 | 1185 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js
... | ... | @@ -2992,6 +2992,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
2992 | 2992 | }, |
2993 | 2993 | textVisible: $rootScope.CIWindowData[i].isTextVisible, |
2994 | 2994 | imageId: $rootScope.CIWindowData[i].imageId, |
2995 | + imgLeft:$rootScope.CIWindowData[i].imgLeft, | |
2995 | 2996 | minimised: $rootScope.CIWindowData[i].minimised, |
2996 | 2997 | windowTitle: $rootScope.CIWindowData[i].currentViewTitle, |
2997 | 2998 | maximised: $rootScope.CIWindowData[i].maximised, |
... | ... | @@ -3096,6 +3097,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
3096 | 3097 | width: $rootScope.PICWindowData[i].width |
3097 | 3098 | }, |
3098 | 3099 | imageId: $rootScope.PICWindowData[i].imageId, |
3100 | + imgLeft:$rootScope.PICWindowData[i].imgLeft, | |
3099 | 3101 | minimised: $rootScope.PICWindowData[i].minimised, |
3100 | 3102 | windowTitle: $rootScope.PICWindowData[i].currentViewTitle, |
3101 | 3103 | maximised: $rootScope.PICWindowData[i].maximised, |
... | ... | @@ -3188,6 +3190,7 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
3188 | 3190 | height: $rootScope.AAWindowData[i].height |
3189 | 3191 | }, |
3190 | 3192 | id: $rootScope.AAWindowData[i].id, |
3193 | + imgLeft:$rootScope.AAWindowData[i].imgLeft, | |
3191 | 3194 | showSelectedPins: $rootScope.AAWindowData[i].isShowSelectedPins, |
3192 | 3195 | hideCallOuts: false,//N |
3193 | 3196 | showAllPins: $rootScope.AAWindowData[i].isShowAllPins, |
... | ... | @@ -3243,7 +3246,6 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ |
3243 | 3246 | height: $rootScope.DaWindowData[i].height |
3244 | 3247 | }, |
3245 | 3248 | id: $rootScope.DaWindowData[i].voId, |
3246 | - | |
3247 | 3249 | imageId: $rootScope.DaWindowData[i].imageId, |
3248 | 3250 | position: { |
3249 | 3251 | y: $rootScope.DaWindowData[i].y, | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -150,7 +150,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
150 | 150 | 'totalstructure': 0, |
151 | 151 | 'totalstructureLm': 0, |
152 | 152 | 'intervalObject': null, |
153 | - 'isannotationReload': false | |
153 | + 'isannotationReload': false, | |
154 | + 'isCanvasReset': false | |
154 | 155 | |
155 | 156 | }; |
156 | 157 | return windata; |
... | ... | @@ -992,17 +993,14 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
992 | 993 | var pnlName=panel[0].id; |
993 | 994 | var len = (pnlName).split("_").length; |
994 | 995 | var windowviewid = (pnlName).split("_")[len - 1]; |
995 | - var isAutoCalled = $scope.GetwindowStoreData(windowviewid, 'minmaxAutoEvent'); | |
996 | - if(!isAutoCalled) | |
997 | - { | |
998 | - $rootScope.UnsaveCurriculum = true; | |
999 | - } | |
996 | + | |
1000 | 997 | $scope.SetwindowStoreData(windowviewid, 'maximised',true); |
1001 | 998 | $scope.SetwindowStoreData(windowviewid, 'minimised',false); |
1002 | - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; | |
1003 | - | |
1004 | - $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight); | |
1005 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
999 | + var extraheight=$('#dastickeyarea').height()+10; | |
1000 | + var extrawidth=$('.tools').width()+15; | |
1001 | + var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; | |
1002 | + var canvasDIvWidth = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; | |
1003 | + | |
1006 | 1004 | $('#da-input_'+windowviewid).removeClass(); |
1007 | 1005 | var dawidth=$(window).outerWidth() - 20; |
1008 | 1006 | if(dawidth<800) |
... | ... | @@ -1010,44 +1008,80 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1010 | 1008 | else{ |
1011 | 1009 | $('#da-input_'+windowviewid).addClass('input-group col-sm-6 col-xs-7 col-md-7 pull-left'); |
1012 | 1010 | } |
1011 | + | |
1012 | + var canvasDiv='canvasDivDA_' + windowviewid; | |
1013 | + var canvasDraw='canvasDA_' + windowviewid; | |
1014 | + var canvasPaint='canvasPaintDA_' + windowviewid; | |
1015 | + | |
1016 | + var isAutoCalled = $scope.GetwindowStoreData(windowviewid, 'minmaxAutoEvent'); | |
1017 | + if(!isAutoCalled) | |
1018 | + { | |
1019 | + $rootScope.UnsaveCurriculum = true; | |
1020 | + var bodyVid=$rootScope.GetDAwindowData(windowviewid,'voId'); | |
1021 | + var annotationData=$rootScope.GetDAwindowData(windowviewid,'annotationData'); | |
1022 | + $rootScope.setAADAPanelCordinate(windowviewid,bodyVid,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,annotationData); | |
1023 | + } | |
1024 | + | |
1013 | 1025 | }, |
1014 | 1026 | onnormalized:function (panel) { |
1015 | 1027 | var pnlName=panel[0].id; |
1016 | 1028 | var len = (pnlName).split("_").length; |
1017 | 1029 | var windowviewid = (pnlName).split("_")[len - 1]; |
1030 | + | |
1031 | + $scope.SetwindowStoreData(windowviewid, 'minimised',false); | |
1032 | + $scope.SetwindowStoreData(windowviewid, 'maximised',false); | |
1033 | + var extraheight=$('#dastickeyarea').height()+10; | |
1034 | + var extrawidth=$('.tools').width()+15; | |
1035 | + var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; | |
1036 | + var canvasDIvWidth = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; | |
1037 | + | |
1038 | + var canvasDiv='canvasDivDA_' + windowviewid; | |
1039 | + var canvasDraw='canvasDA_' + windowviewid; | |
1040 | + var canvasPaint='canvasPaintDA_' + windowviewid; | |
1041 | + | |
1018 | 1042 | var isAutoCalled = $scope.GetwindowStoreData(windowviewid, 'minmaxAutoEvent'); |
1019 | 1043 | if(!isAutoCalled) |
1020 | 1044 | { |
1021 | - $rootScope.UnsaveCurriculum = true; | |
1045 | + $rootScope.UnsaveCurriculum = true; | |
1046 | + var bodyVid=$rootScope.GetDAwindowData(windowviewid,'voId'); | |
1047 | + var annotationData=$rootScope.GetDAwindowData(windowviewid,'annotationData'); | |
1048 | + $rootScope.setAADAPanelCordinate(windowviewid,bodyVid,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,annotationData); | |
1022 | 1049 | } |
1023 | - $scope.SetwindowStoreData(windowviewid, 'minimised',false); | |
1024 | - $scope.SetwindowStoreData(windowviewid, 'maximised',false); | |
1025 | - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; | |
1026 | - | |
1027 | - $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight); | |
1028 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
1029 | 1050 | |
1030 | 1051 | }, |
1031 | 1052 | resizable: { |
1053 | + minWidth: 600, | |
1054 | + minHeight: 500, | |
1032 | 1055 | stop: function (event, ui) { |
1033 | 1056 | var pnlName=event.currentTarget.id; |
1034 | 1057 | var len = (pnlName).split("_").length; |
1035 | 1058 | var windowviewid = (pnlName).split("_")[len - 1]; |
1059 | + var extraheight=$('#dastickeyarea').height()+10; | |
1060 | + var extrawidth=$('.tools').width()+15; | |
1061 | + var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
1062 | + var canvasDIvWidth = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; | |
1063 | + | |
1036 | 1064 | $scope.SetwindowStoreData(windowviewid, 'width', ui.size.width); |
1037 | - $scope.SetwindowStoreData(windowviewid, 'height', ui.size.height); | |
1065 | + $scope.SetwindowStoreData(windowviewid, 'height', canvasDIvHeight); | |
1038 | 1066 | $scope.SetwindowStoreData(windowviewid, 'y', ui.position.top); |
1039 | 1067 | $scope.SetwindowStoreData(windowviewid, 'x', ui.position.left); |
1040 | 1068 | $rootScope.UnsaveCurriculum = true; |
1041 | - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; | |
1042 | - | |
1043 | - $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight); | |
1069 | + | |
1044 | 1070 | $('#da-input_'+windowviewid).removeClass(); |
1045 | 1071 | if(ui.size.width<700) |
1046 | 1072 | $('#da-input_'+windowviewid).addClass('input-group col-sm-6 col-xs-7 col-md-5 pull-left'); |
1047 | 1073 | else{ |
1048 | 1074 | $('#da-input_'+windowviewid).addClass('input-group col-sm-6 col-xs-7 col-md-7 pull-left'); |
1049 | 1075 | } |
1050 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
1076 | + | |
1077 | + var canvasDiv='canvasDivDA_' + windowviewid; | |
1078 | + var canvasDraw='canvasDA_' + windowviewid; | |
1079 | + var canvasPaint='canvasPaintDA_' + windowviewid; | |
1080 | + | |
1081 | + var bodyVid=$rootScope.GetDAwindowData(windowviewid,'voId'); | |
1082 | + var annotationData=$rootScope.GetDAwindowData(windowviewid,'annotationData'); | |
1083 | + $rootScope.setAADAPanelCordinate(windowviewid,bodyVid,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight-extraheight,canvasDIvWidth,annotationData); | |
1084 | + | |
1051 | 1085 | } |
1052 | 1086 | |
1053 | 1087 | }, |
... | ... | @@ -1222,12 +1256,6 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1222 | 1256 | |
1223 | 1257 | $scope.loadDAView = function (currentBodyViewId, windowviewid) { |
1224 | 1258 | |
1225 | - //0.4 added some stylesheets | |
1226 | - if (!$rootScope.isCallFromOtherModule) { | |
1227 | - $('#daBodyview').css("height", (parseInt($(window).outerHeight()) - 82)); | |
1228 | - $('#daBodyview').css("width", $(window).outerWidth()); | |
1229 | - } | |
1230 | - | |
1231 | 1259 | $scope.SetwindowStoreData(windowviewid,'voId',currentBodyViewId); |
1232 | 1260 | //1. load navigator man first |
1233 | 1261 | console.log('before LoadBodyViewNavigatorImage call') |
... | ... | @@ -1960,7 +1988,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
1960 | 1988 | $scope.SetwindowStoreData(windowviewid,'viewOrientationId',$scope.GetwindowStoreData(windowviewid,'voId')); |
1961 | 1989 | $scope.setViewOrientationId(windowviewid); |
1962 | 1990 | |
1963 | - | |
1991 | + $scope.SetwindowStoreData(windowviewid, 'isCanvasReset',true); | |
1992 | + | |
1964 | 1993 | //Birendra Load term data For curriculum builder |
1965 | 1994 | //*********************************************************************// |
1966 | 1995 | if ($rootScope.isCallFromOtherModule) { |
... | ... | @@ -2209,13 +2238,24 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2209 | 2238 | //set height of canvas div and left tool bar as per window size |
2210 | 2239 | $scope.BodyRegionCordinatesData = []; // create an empty array |
2211 | 2240 | $scope.SetwindowStoreData(windowviewid,'BodyRegionCordinatesData',[]); |
2212 | - $('#daBodyview').css('width', '100%'); | |
2213 | - | |
2214 | - var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; | |
2215 | - | |
2241 | + | |
2242 | + var extraheight=$('#dastickeyarea').height()+10; | |
2243 | + var extrawidth=$('.tools').width()+15; | |
2244 | + var canvasDIvHeight = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; | |
2245 | + var canvasDIvWidth = $('#daImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; | |
2216 | 2246 | $('#canvasDivDA_' + windowviewid).css('height', canvasDIvHeight); |
2217 | - $('#leftToolBarDA_' + windowviewid).css('height', $('#daImagePanel_' + windowviewid).outerHeight()) | |
2247 | + $('#leftToolBarDA_' + windowviewid).css('height', $('#daImagePanel_' + windowviewid).outerHeight()); | |
2248 | + | |
2249 | + if ($("#canvasDivDA_" + windowviewid).find("canvas[id*='canvasPaintDA']").length == 0) { | |
2250 | + var canvasPaintID = "canvasPaintDA_" + windowviewid; | |
2251 | + var canvasID = "canvasDA_" + windowviewid; | |
2252 | + | |
2253 | + //register touch end and touchmove event for touch devices | |
2254 | + var ATBarHtml = $("#canvasDivDA_" + windowviewid).append('<canvas id="' + canvasPaintID + '" ontouchend="onDrawingCanvasTouch(event)" ontouchmove="onDrawingCanvasTouchMove(event)" width="2277" height="3256" class="canvas-annotationStyle1"></canvas><canvas id="' + canvasID + '" ontouchend="onDrawingCanvasTouch(event)" ontouchmove="onDrawingCanvasTouchMove(event)" ng-click="onDrawingCanvasClick($event)" width="2277" height="3256" class="canvas-annotationStyle"></canvas>'); | |
2255 | + $compile(ATBarHtml)($scope); | |
2218 | 2256 | |
2257 | + } | |
2258 | + | |
2219 | 2259 | //calculate image coordinates and draw image |
2220 | 2260 | var BodyRegionData=$scope.GetwindowStoreData(windowviewid,'BodyRegionData'); |
2221 | 2261 | var bodyRegionCoordinates = new jinqJs() |
... | ... | @@ -2223,7 +2263,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2223 | 2263 | .where('_ViewOrientationId == ' + viewOrientationId) |
2224 | 2264 | .select(); |
2225 | 2265 | |
2226 | - console.log('viewOrientationId= ' + viewOrientationId + ', $scope.bodyRegionCoordinates length= ' + bodyRegionCoordinates.length) | |
2266 | + //console.log('viewOrientationId= ' + viewOrientationId + ', $scope.bodyRegionCoordinates length= ' + bodyRegionCoordinates.length) | |
2227 | 2267 | |
2228 | 2268 | var bgartData=$scope.GetwindowStoreData(windowviewid,'bgartData'); |
2229 | 2269 | var bagartDetail = new jinqJs() |
... | ... | @@ -2249,55 +2289,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2249 | 2289 | |
2250 | 2290 | } |
2251 | 2291 | |
2252 | - $scope.ColoredImageSRC = []; | |
2253 | - $scope.SetwindowStoreData(windowviewid,'ColoredImageSRC',[]); | |
2254 | - | |
2292 | + $scope.ColoredImageSRC = []; | |
2293 | + $scope.SetwindowStoreData(windowviewid,'ColoredImageSRC',[]); | |
2255 | 2294 | $scope.SetwindowStoreData(windowviewid,'updatedGrayDataList',[]); |
2256 | 2295 | $scope.SetwindowStoreData(windowviewid,'updatedGrayMRDataList',[]); |
2257 | - | |
2258 | - //history code | |
2259 | - | |
2260 | - if ($("#canvasDivDA_" + windowviewid).find("canvas[id*='canvasPaintDA']").length == 0) { | |
2261 | - var canvasPaintID = "canvasPaintDA_" + windowviewid; | |
2262 | - var canvasID = "canvasDA_" + windowviewid; | |
2263 | - | |
2264 | - //register touch end and touchmove event for touch devices | |
2265 | - var ATBarHtml = $("#canvasDivDA_" + windowviewid).append('<canvas id="' + canvasPaintID + '" ontouchend="onDrawingCanvasTouch(event)" ontouchmove="onDrawingCanvasTouchMove(event)" width="2277" height="3256" class="canvas-annotationStyle1"></canvas><canvas id="' + canvasID + '" ontouchend="onDrawingCanvasTouch(event)" ontouchmove="onDrawingCanvasTouchMove(event)" ng-click="onDrawingCanvasClick($event)" width="2277" height="3256" class="canvas-annotationStyle"></canvas>'); | |
2266 | - $compile(ATBarHtml)($scope); | |
2267 | - | |
2268 | - } | |
2269 | - var isCBAnnotationActive= $scope.GetwindowStoreData(windowviewid, 'isCBAnnotationActive'); | |
2270 | - | |
2271 | - // isCBAnnotationActive activate one time when annotation come from Saved CB | |
2272 | - if ($rootScope.isCallFromOtherModule && isCBAnnotationActive) { | |
2273 | - var annotationData= $scope.GetwindowStoreData(windowviewid, 'annotationData'); | |
2274 | - //clean object .it will assign again from home controller | |
2275 | - $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); | |
2276 | - // load annotation | |
2277 | - if(annotationData!="" && annotationData!=undefined) | |
2278 | - { | |
2279 | - if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) | |
2280 | - { | |
2281 | - //first draw shape and then store in object | |
2282 | - //delay 3 second if annotation draw with TBox | |
2283 | - if ($scope.GetwindowStoreData(windowviewid, 'isTransparent') == true) { | |
2284 | - setTimeout(function(){ | |
2285 | - $rootScope.LoadCBSavedAnnotation("canvasDA_"+windowviewid,"canvasPaintDA_"+windowviewid,annotationData); | |
2286 | - },3000) | |
2287 | - } | |
2288 | - else | |
2289 | - { | |
2290 | - setTimeout(function(){ | |
2291 | - $rootScope.LoadCBSavedAnnotation("canvasDA_"+windowviewid,"canvasPaintDA_"+windowviewid,annotationData); | |
2292 | - },1000) | |
2293 | - | |
2294 | - } | |
2295 | - | |
2296 | - | |
2297 | - } | |
2298 | - } | |
2299 | - $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); | |
2300 | - } | |
2301 | 2296 | |
2302 | 2297 | $('#zoomValueDA_' + windowviewid).attr('value', $scope.GetwindowStoreData(windowviewid,'zoomInOut')); |
2303 | 2298 | |
... | ... | @@ -2538,39 +2533,64 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
2538 | 2533 | $('#draggable_' + windowviewid).css('width', dragdivw); |
2539 | 2534 | $('#draggable_' + windowviewid).css('height', dragdivh); |
2540 | 2535 | $('#draggable_' + windowviewid).css("left", dragdivleft); |
2541 | - $('#draggable_' + windowviewid).css("top", dragdivtop); | |
2542 | - | |
2543 | - var canvas = document.getElementById("canvasDA_" + windowviewid); | |
2544 | - var canvasPaint = document.getElementById("canvasPaintDA_" + windowviewid); | |
2545 | 2536 | |
2546 | - if(viewOrientationId!=1 && viewOrientationId!=4) | |
2547 | - { | |
2548 | - if(viewOrientationId==5) | |
2549 | - { | |
2550 | - //lateral arm | |
2551 | - canvas.height = 1500; | |
2552 | - canvasPaint.height =1500; | |
2553 | - | |
2554 | - } | |
2555 | - else if(viewOrientationId==6) | |
2556 | - { | |
2557 | - //medial arm | |
2558 | - canvas.height = 1400; | |
2559 | - canvasPaint.height = 1400; | |
2560 | - | |
2561 | - } | |
2562 | - var $ua = navigator.userAgent; | |
2563 | - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
2564 | - canvas.width = screen.width-145; | |
2565 | - canvasPaint.width = screen.width-145; | |
2537 | + $scope.SetwindowStoreData(windowviewid,'ColoredImageSRC',[]); | |
2538 | + | |
2539 | + var timeintval = null; | |
2540 | + timeintval = $interval(function () { | |
2541 | + var imageSrc = $scope.GetwindowStoreData(windowviewid, 'ColoredImageSRC'); | |
2542 | + if (imageSrc.length>0) { | |
2543 | + $scope.stopIntervalDA(); | |
2544 | + var pnlName='daImagePanel_' + windowviewid; | |
2545 | + var canvasDiv='canvasDivDA_' + windowviewid; | |
2546 | + var canvasDraw='canvasDA_' + windowviewid; | |
2547 | + var canvasPaint='canvasPaintDA_' + windowviewid; | |
2548 | + var bodyVid=$rootScope.GetDAwindowData(windowviewid,'voId'); | |
2549 | + var demoData= {shapeStates:[],paintCanvasState:""}; | |
2550 | + var isCanvasReset = $scope.GetwindowStoreData(windowviewid, 'isCanvasReset'); | |
2551 | + | |
2552 | + if(isCanvasReset) | |
2553 | + { | |
2554 | + //call also while paint and draw canvas removed | |
2555 | + //reset width height of canvas | |
2556 | + $rootScope.setAADAPanelCordinate(windowviewid,bodyVid,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,demoData); | |
2557 | + $scope.SetwindowStoreData(windowviewid, 'isCanvasReset',false); | |
2558 | + } | |
2559 | + | |
2560 | + var isCBAnnotationActive= $scope.GetwindowStoreData(windowviewid, 'isCBAnnotationActive'); | |
2561 | + | |
2562 | + // isCBAnnotationActive activate one time when annotation come from Saved CB | |
2563 | + if ($rootScope.isCallFromOtherModule && isCBAnnotationActive) { | |
2564 | + var annotationData= $scope.GetwindowStoreData(windowviewid, 'annotationData'); | |
2565 | + //clean object .it will assign again from home controller | |
2566 | + $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); | |
2567 | + // load annotation | |
2568 | + if(annotationData!="" && annotationData!=undefined) | |
2569 | + { | |
2570 | + if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) | |
2571 | + { | |
2572 | + //first draw shape and then store in object | |
2573 | + setTimeout(function(){ | |
2574 | + $rootScope.LoadCBSavedAnnotation(canvasDraw,canvasPaint,annotationData); | |
2575 | + },100) | |
2576 | + } | |
2577 | + } | |
2578 | + $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); | |
2579 | + } | |
2580 | + | |
2566 | 2581 | } |
2567 | 2582 | else |
2568 | 2583 | { |
2569 | - canvas.width = screen.width-165; | |
2570 | - canvasPaint.width = screen.width-165; | |
2584 | + console.log("loading canvas...."); | |
2571 | 2585 | } |
2586 | + }, 100); | |
2572 | 2587 | |
2573 | - } | |
2588 | + $scope.stopIntervalDA = function () { | |
2589 | + if (angular.isDefined(timeintval)) { | |
2590 | + $interval.cancel(timeintval); | |
2591 | + timeintval = undefined; | |
2592 | + } | |
2593 | + }; | |
2574 | 2594 | |
2575 | 2595 | |
2576 | 2596 | } |
... | ... | @@ -5014,10 +5034,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
5014 | 5034 | if (canDivChildCount > 0) { |
5015 | 5035 | canDiv.innerHTML = ''; |
5016 | 5036 | } |
5017 | - | |
5018 | - //canvas is clear in search term,layer change,viewchange here. so annotationdata should also clear | |
5019 | - $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); | |
5020 | - | |
5037 | + $scope.SetwindowStoreData(windowviewid, 'isCanvasReset',true); | |
5038 | + //canvas is clear in search term,layer change,viewchange here. so annotationdata should also clear | |
5039 | + $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); | |
5040 | + | |
5021 | 5041 | } |
5022 | 5042 | else |
5023 | 5043 | { |
... | ... | @@ -9271,8 +9291,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
9271 | 9291 | if (canDivChildCount > 0) { |
9272 | 9292 | canDiv.innerHTML = ''; |
9273 | 9293 | } |
9294 | + $scope.SetwindowStoreData(windowviewid, 'isCanvasReset',true); | |
9295 | + $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); | |
9296 | + $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); | |
9274 | 9297 | var viewOrientationId = $scope.GetwindowStoreData(windowviewid, 'viewOrientationId'); |
9275 | - $scope.CalculateImageCordinates(viewOrientationId,windowviewid); | |
9298 | + $scope.CalculateImageCordinates(viewOrientationId,windowviewid); | |
9276 | 9299 | |
9277 | 9300 | |
9278 | 9301 | if ($scope.GetwindowStoreData(windowviewid,'zoomInOut') == 25) { |
... | ... | @@ -10261,6 +10284,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10261 | 10284 | if (canDivChildCount > 0) { |
10262 | 10285 | canDiv.innerHTML = ''; |
10263 | 10286 | } |
10287 | + | |
10288 | + $scope.SetwindowStoreData(windowviewid, 'isCanvasReset',true); | |
10264 | 10289 | //canvas is clear in search term,layer change,viewchange here. so annotationData should also clear |
10265 | 10290 | $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); |
10266 | 10291 | $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); |
... | ... | @@ -10625,6 +10650,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
10625 | 10650 | if (canDivChildCount > 0) { |
10626 | 10651 | canDiv.innerHTML = ''; |
10627 | 10652 | } |
10653 | + $scope.SetwindowStoreData(windowviewid, 'isCanvasReset',true); | |
10628 | 10654 | //canvas is clear in search term,layer change,viewchange here. so annotationData should also clear |
10629 | 10655 | $scope.SetwindowStoreData(windowviewid, 'isCBAnnotationActive',false); |
10630 | 10656 | $scope.SetwindowStoreData(windowviewid, 'annotationData', {shapeStates:[],paintCanvasState:[]}); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... | ... | @@ -386,7 +386,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
386 | 386 | { |
387 | 387 | $timeout(function () { |
388 | 388 | sessionStorage.setItem('isModuleOpenByOpenResource', 'true'); |
389 | - sessionStorage.removeItem('ExitsCBFileDetail'); | |
389 | + sessionStorage.removeItem('ExitsCBFileDetail'); | |
390 | 390 | // OpenDefaultModule(iframe); |
391 | 391 | |
392 | 392 | }, 500); |
... | ... | @@ -690,7 +690,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
690 | 690 | |
691 | 691 | $rootScope.isLoading = false; |
692 | 692 | $rootScope.isLoginLoading = false; |
693 | - | |
693 | + | |
694 | 694 | //unblock user |
695 | 695 | if (url.indexOf('?unb:') != -1) { |
696 | 696 | |
... | ... | @@ -709,86 +709,104 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
709 | 709 | |
710 | 710 | //get user is already loggedin or not |
711 | 711 | $scope.currentUserDetails = $rootScope.getLocalStorageValue('loggedInUserDetails'); |
712 | - if ($scope.currentUserDetails != undefined) { | |
712 | + var siteUserParamDetail = JSON.parse($rootScope.getLocalStorageValue('siteUserParamDetail')); | |
713 | + if(siteUserParamDetail!=undefined && siteUserParamDetail!=null && $scope.currentUserDetails != undefined) | |
714 | + { | |
713 | 715 | $rootScope.isVisibleLogin = false; |
714 | 716 | $location.url('/'); |
715 | - var loggedInUser = JSON.parse($scope.currentUserDetails); | |
716 | - if(loggedInUser.mType!=undefined) | |
717 | - { | |
718 | - $rootScope.isCAlink=true; | |
719 | - $('.navbar-fixed-top').css('display','none'); | |
720 | - } | |
721 | - | |
722 | - ConfigurationService.getCofigValue() | |
723 | - .then( | |
724 | - function (configresult) { | |
725 | - $rootScope.current_year = configresult.current_year; | |
726 | - $rootScope.aiaIdleTime = configresult.idleTime; | |
727 | - $rootScope.aiaIdleTimeOut = configresult.idelTimeOut; | |
728 | - $rootScope.aiaPingInterval = configresult.pingInterval; | |
729 | - $rootScope.aiaAnimationPath = configresult.serverPath; | |
730 | - $rootScope.MaxOneFileSize = configresult.fileSize; | |
731 | - $rootScope.aodDomainName = configresult.aodSiteUrl; | |
732 | - | |
733 | - //incase site user login userid is 0 so then using license id | |
734 | - //logout site user while reload url without parameter | |
735 | - var userId=loggedInUser.Id==0?loggedInUser.LicenseId:loggedInUser.Id; | |
736 | - | |
737 | - //licenseId would be zero for admin/gernal admin | |
738 | - var isadminType=loggedInUser.LicenseId==0?true:false; | |
739 | - if(loggedInUser.mType!=undefined) | |
740 | - { | |
741 | - $scope.checkuserstatus = { | |
742 | - userId: userId, | |
743 | - tagName: loggedInUser.mType.toLowerCase()=='ca'?'logout':'update', | |
744 | - SessionId:loggedInUser.SessionId, | |
745 | - isSiteUser:loggedInUser.isSiteUser, | |
746 | - isAdmin:isadminType | |
747 | - } | |
748 | - } | |
749 | - else | |
750 | - { | |
751 | - $scope.checkuserstatus = { | |
752 | - userId: userId, | |
753 | - tagName: loggedInUser.Id==0?'logout':'update', | |
754 | - SessionId:loggedInUser.SessionId, | |
755 | - isSiteUser:loggedInUser.isSiteUser, | |
756 | - isAdmin:isadminType | |
757 | - } | |
758 | - | |
759 | - } | |
760 | - | |
761 | - | |
762 | - // this case found when browser closed by user after login. after long time (after 20 min) open site again | |
763 | - // loggedInUserDetails contain user detail so user auto login but it is logout by | |
764 | - // 1.by agent job 2. or by admin section from db | |
765 | - // so check user session again before auto login | |
766 | - AuthenticationService.ManageUserLoginStatus($scope.checkuserstatus) | |
767 | - .then( | |
768 | - function (loginStatus) { | |
769 | - if(loginStatus!=null) | |
717 | + $rootScope.isCallFromSite = true; | |
718 | + $rootScope.isCAlink=true; | |
719 | + $rootScope.LoginDisableUI(); | |
720 | + $rootScope.siteUrlInfo.siteIP = siteUserParamDetail.siteIP; | |
721 | + $rootScope.siteUrlInfo.accountNumber = siteUserParamDetail.accountNumber; | |
722 | + $rootScope.siteUrlInfo.edition = siteUserParamDetail.edition; | |
723 | + $rootScope.siteUrlInfo.urlReferer = siteUserParamDetail.urlReferer; | |
724 | + $rootScope.siteUrlInfo.remoteIPAddress = siteUserParamDetail.remoteIPAddress; | |
725 | + var sitedetail=$rootScope.siteUrlInfo; | |
726 | + $rootScope.ReloadClientSiteUser(sitedetail); | |
727 | + } | |
728 | + else | |
729 | + { | |
730 | + if ($scope.currentUserDetails != undefined) { | |
731 | + $rootScope.isVisibleLogin = false; | |
732 | + $location.url('/'); | |
733 | + var loggedInUser = JSON.parse($scope.currentUserDetails); | |
734 | + if(loggedInUser.mType!=undefined) | |
735 | + { | |
736 | + $rootScope.isCAlink=true; | |
737 | + $('.navbar-fixed-top').css('display','none'); | |
738 | + } | |
739 | + | |
740 | + ConfigurationService.getCofigValue() | |
741 | + .then( | |
742 | + function (configresult) { | |
743 | + $rootScope.current_year = configresult.current_year; | |
744 | + $rootScope.aiaIdleTime = configresult.idleTime; | |
745 | + $rootScope.aiaIdleTimeOut = configresult.idelTimeOut; | |
746 | + $rootScope.aiaPingInterval = configresult.pingInterval; | |
747 | + $rootScope.aiaAnimationPath = configresult.serverPath; | |
748 | + $rootScope.MaxOneFileSize = configresult.fileSize; | |
749 | + $rootScope.aodDomainName = configresult.aodSiteUrl; | |
750 | + | |
751 | + //incase site user login userid is 0 so then using license id | |
752 | + //logout site user while reload url without parameter | |
753 | + var userId=loggedInUser.Id==0?loggedInUser.LicenseId:loggedInUser.Id; | |
754 | + | |
755 | + //licenseId would be zero for admin/gernal admin | |
756 | + var isadminType=loggedInUser.LicenseId==0?true:false; | |
757 | + if(loggedInUser.mType!=undefined) | |
770 | 758 | { |
771 | - if(loginStatus=='False') | |
772 | - { | |
773 | - $rootScope.LogoutUserSession(); | |
759 | + $scope.checkuserstatus = { | |
760 | + userId: userId, | |
761 | + tagName: loggedInUser.mType.toLowerCase()=='ca'?'logout':'update', | |
762 | + SessionId:loggedInUser.SessionId, | |
763 | + isSiteUser:loggedInUser.isSiteUser, | |
764 | + isAdmin:isadminType | |
774 | 765 | } |
775 | - else | |
776 | - { | |
777 | - AuthenticateAlreadyLoggedInUser(); | |
766 | + } | |
767 | + else | |
768 | + { | |
769 | + $scope.checkuserstatus = { | |
770 | + userId: userId, | |
771 | + tagName: loggedInUser.Id==0?'logout':'update', | |
772 | + SessionId:loggedInUser.SessionId, | |
773 | + isSiteUser:loggedInUser.isSiteUser, | |
774 | + isAdmin:isadminType | |
778 | 775 | } |
776 | + | |
779 | 777 | } |
780 | - | |
781 | - }), | |
782 | - function (error) { | |
783 | - console.log(' Error in user login status = ' + error.statusText); | |
784 | - $('#errorMessage').text(error); | |
785 | - $("#messageModal").modal('show'); | |
786 | - } | |
787 | - | |
788 | - }); | |
789 | - | |
778 | + | |
779 | + | |
780 | + // this case found when browser closed by user after login. after long time (after 20 min) open site again | |
781 | + // loggedInUserDetails contain user detail so user auto login but it is logout by | |
782 | + // 1.by agent job 2. or by admin section from db | |
783 | + // so check user session again before auto login | |
784 | + AuthenticationService.ManageUserLoginStatus($scope.checkuserstatus) | |
785 | + .then( | |
786 | + function (loginStatus) { | |
787 | + if(loginStatus!=null) | |
788 | + { | |
789 | + if(loginStatus=='False') | |
790 | + { | |
791 | + $rootScope.LogoutUserSession(); | |
792 | + } | |
793 | + else | |
794 | + { | |
795 | + AuthenticateAlreadyLoggedInUser(); | |
796 | + } | |
797 | + } | |
798 | + | |
799 | + }), | |
800 | + function (error) { | |
801 | + console.log(' Error in user login status = ' + error.statusText); | |
802 | + $('#errorMessage').text(error); | |
803 | + $("#messageModal").modal('show'); | |
804 | + } | |
805 | + | |
806 | + }); | |
807 | + } | |
790 | 808 | } |
791 | - | |
809 | + | |
792 | 810 | var isRememberChecked = $rootScope.getLocalStorageValue('isRememberMeChecked'); |
793 | 811 | |
794 | 812 | if ($rootScope.getLocalStorageValue('isRememberMeChecked') != "" && sessionStorage.getItem("loginSession") == null) { |
... | ... | @@ -802,7 +820,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
802 | 820 | } |
803 | 821 | } |
804 | 822 | } |
805 | - else { | |
823 | + else | |
824 | + { | |
806 | 825 | |
807 | 826 | $rootScope.isVisibleLogin = true; |
808 | 827 | |
... | ... | @@ -813,6 +832,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
813 | 832 | if ($scope.currentUserDetails == undefined) { |
814 | 833 | $rootScope.getConfigurationValues(); |
815 | 834 | } |
835 | + | |
816 | 836 | } |
817 | 837 | |
818 | 838 | $timeout(function () { |
... | ... | @@ -1580,37 +1600,41 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1580 | 1600 | } |
1581 | 1601 | else |
1582 | 1602 | { |
1583 | - $scope.currentUserDetails = $rootScope.getLocalStorageValue('loggedInUserDetails'); | |
1584 | 1603 | var sitedetail=$rootScope.siteUrlInfo; |
1585 | - ConfigurationService.getCofigValue() | |
1586 | - .then( | |
1587 | - function (configresult) { | |
1588 | - $rootScope.current_year = configresult.current_year; | |
1589 | - $rootScope.aiaIdleTime = configresult.idleTime; | |
1590 | - $rootScope.aiaIdleTimeOut = configresult.idelTimeOut; | |
1591 | - $rootScope.aiaPingInterval = configresult.pingInterval; | |
1592 | - $rootScope.aiaAnimationPath = configresult.serverPath; | |
1593 | - $rootScope.MaxOneFileSize = configresult.fileSize; | |
1594 | - $rootScope.aodDomainName = configresult.aodSiteUrl; | |
1595 | - | |
1596 | - var loggedInUser = JSON.parse($scope.currentUserDetails); | |
1597 | - //check already login by account number bcz no login id for site login | |
1598 | - //maintain user session by licenseid of site login | |
1599 | - if(loggedInUser!==null && loggedInUser.AccountNumber==sitedetail.accountNumber) | |
1600 | - { | |
1601 | - //using old session id | |
1602 | - sitedetail.SessionId = loggedInUser.SessionId; | |
1603 | - $rootScope.AuthenticateClientSiteUser(sitedetail); | |
1604 | - } | |
1605 | - else | |
1606 | - { | |
1607 | - //using new sessionid | |
1608 | - $rootScope.AuthenticateClientSiteUser(sitedetail); | |
1609 | - } | |
1610 | - }); | |
1604 | + $rootScope.ReloadClientSiteUser(sitedetail); | |
1611 | 1605 | } |
1612 | 1606 | } |
1613 | 1607 | |
1608 | + $rootScope.ReloadClientSiteUser = function (sitedetail) { | |
1609 | + $scope.currentUserDetails = $rootScope.getLocalStorageValue('loggedInUserDetails'); | |
1610 | + ConfigurationService.getCofigValue() | |
1611 | + .then( | |
1612 | + function (configresult) { | |
1613 | + $rootScope.current_year = configresult.current_year; | |
1614 | + $rootScope.aiaIdleTime = configresult.idleTime; | |
1615 | + $rootScope.aiaIdleTimeOut = configresult.idelTimeOut; | |
1616 | + $rootScope.aiaPingInterval = configresult.pingInterval; | |
1617 | + $rootScope.aiaAnimationPath = configresult.serverPath; | |
1618 | + $rootScope.MaxOneFileSize = configresult.fileSize; | |
1619 | + $rootScope.aodDomainName = configresult.aodSiteUrl; | |
1620 | + | |
1621 | + var loggedInUser = JSON.parse($scope.currentUserDetails); | |
1622 | + //check already login by account number bcz no login id for site login | |
1623 | + //maintain user session by licenseid of site login | |
1624 | + if(loggedInUser!==null && loggedInUser.AccountNumber==sitedetail.accountNumber) | |
1625 | + { | |
1626 | + //using old session id | |
1627 | + sitedetail.SessionId = loggedInUser.SessionId; | |
1628 | + $rootScope.AuthenticateClientSiteUser(sitedetail); | |
1629 | + } | |
1630 | + else | |
1631 | + { | |
1632 | + //using new sessionid | |
1633 | + $rootScope.AuthenticateClientSiteUser(sitedetail); | |
1634 | + } | |
1635 | + }); | |
1636 | + } | |
1637 | + | |
1614 | 1638 | $rootScope.AuthenticateClientSiteUser = function (siteInfo) { |
1615 | 1639 | $rootScope.LoginDisableUI(); |
1616 | 1640 | $rootScope.isCAlink=false; |
... | ... | @@ -1815,6 +1839,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1815 | 1839 | $rootScope.userModules = result.Modules; |
1816 | 1840 | |
1817 | 1841 | localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); |
1842 | + //using for open resource and reloading app | |
1843 | + localStorage.setItem('siteUserParamDetail', JSON.stringify(siteInfo)); | |
1818 | 1844 | |
1819 | 1845 | if (isCommingSoonModel == true) { |
1820 | 1846 | |
... | ... | @@ -1869,7 +1895,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
1869 | 1895 | $rootScope.haveRoleAdmin = false; |
1870 | 1896 | |
1871 | 1897 | //2. |
1872 | - localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
1898 | + localStorage.setItem('loggedInUserDetails', JSON.stringify(result)); | |
1899 | + | |
1900 | + //using for open resource and reloading app | |
1901 | + localStorage.setItem('siteUserParamDetail', JSON.stringify(siteInfo)); | |
1873 | 1902 | |
1874 | 1903 | //5. |
1875 | 1904 | sessionStorage.setItem("loginSession", "true"); |
... | ... | @@ -2239,6 +2268,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2239 | 2268 | $rootScope.LogoutUser = function () { |
2240 | 2269 | $rootScope.isSessionTimeout=true; |
2241 | 2270 | localStorage.removeItem('loggedInUserDetails'); |
2271 | + localStorage.removeItem('siteUserParamDetail'); | |
2272 | + | |
2242 | 2273 | localStorage.clear(); |
2243 | 2274 | $rootScope.CheckUserSession('logout'); |
2244 | 2275 | |
... | ... | @@ -2247,7 +2278,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2247 | 2278 | $rootScope.isSessionTimeout=true; |
2248 | 2279 | localStorage.removeItem('loggedInUserDetails'); |
2249 | 2280 | sessionStorage.removeItem('isModuleOpenByOpenResource'); |
2250 | - sessionStorage.removeItem('ExitsCBFileDetail'); | |
2281 | + sessionStorage.removeItem('ExitsCBFileDetail'); | |
2282 | + localStorage.removeItem('siteUserParamDetail'); | |
2251 | 2283 | localStorage.clear(); |
2252 | 2284 | document.location = '/'; |
2253 | 2285 | } |
... | ... | @@ -2517,7 +2549,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2517 | 2549 | { |
2518 | 2550 | for (var x = 0 ; x < $rootScope.AllPanelStoreObject.length; x++) { |
2519 | 2551 | |
2520 | - if ($rootScope.AllPanelStoreObject[x].winid == windowviewid) { | |
2552 | + if ($rootScope.AllPanelStoreObject[x].winid == windowviewid) { | |
2521 | 2553 | var obj=$rootScope.AllPanelStoreObject[x]['panelObject']; |
2522 | 2554 | obj.maximize(); |
2523 | 2555 | break; |
... | ... | @@ -2528,7 +2560,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2528 | 2560 | { |
2529 | 2561 | for (var x = 0 ; x < $rootScope.AllPanelStoreObject.length; x++) { |
2530 | 2562 | |
2531 | - if ($rootScope.AllPanelStoreObject[x].winid == windowviewid) { | |
2563 | + if ($rootScope.AllPanelStoreObject[x].winid == windowviewid) { | |
2532 | 2564 | var obj=$rootScope.AllPanelStoreObject[x]['panelObject']; |
2533 | 2565 | obj.normalize(); |
2534 | 2566 | break; |
... | ... | @@ -2542,36 +2574,42 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2542 | 2574 | if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { |
2543 | 2575 | $('#arragePannel .dropdown-content').css("display","block"); |
2544 | 2576 | } |
2545 | - | |
2577 | + | |
2546 | 2578 | $(window).unbind('resize'); |
2547 | 2579 | window.addEventListener("resize", orientationchange); |
2548 | - function orientationchange() { | |
2549 | - if($location.url()!= "/curriculum-builder-detail") { | |
2550 | - var moduleImagePanel = $("div[id*='ImagePanel']"); | |
2580 | + function orientationchange() { | |
2581 | + clearTimeout(window.resizedFinished); | |
2582 | + window.resizedFinished = setTimeout(function(){ | |
2583 | + console.log('Resized finished.'); | |
2584 | + if($location.url()!= "/curriculum-builder-detail") { | |
2585 | + var moduleImagePanel = $("div[id*='ImagePanel']"); | |
2551 | 2586 | |
2552 | - if (moduleImagePanel.length > 0) { | |
2553 | - | |
2554 | - for (var j = 0; j < moduleImagePanel.length; j++) { | |
2555 | - var paneld=moduleImagePanel[j].id; | |
2556 | - var len = (paneld).split("_").length; | |
2557 | - var MultiWinId = (paneld).split("_")[len - 1]; | |
2587 | + if (moduleImagePanel.length > 0) { | |
2588 | + | |
2589 | + for (var j = 0; j < moduleImagePanel.length; j++) { | |
2590 | + var paneld=moduleImagePanel[j].id; | |
2591 | + var len = (paneld).split("_").length; | |
2592 | + var MultiWinId = (paneld).split("_")[len - 1]; | |
2558 | 2593 | |
2559 | - //first set to normal and then to set max mode while browser resize or iPad orientation change | |
2560 | - $rootScope.orientationchangeToNormal(MultiWinId); | |
2561 | - $rootScope.orientationchangeToMax(MultiWinId); | |
2562 | - | |
2594 | + //first set to normal and then to set max mode while browser resize or iPad orientation change | |
2595 | + | |
2596 | + $rootScope.minmaxPanelAutoEventTrue(MultiWinId,paneld); | |
2597 | + $rootScope.orientationchangeToNormal(MultiWinId); | |
2598 | + $rootScope.minmaxPanelAutoEventFalse(MultiWinId,paneld); | |
2599 | + | |
2600 | + $rootScope.orientationchangeToMax(MultiWinId); | |
2601 | + | |
2602 | + } | |
2563 | 2603 | } |
2604 | + | |
2605 | + } | |
2606 | + if(($location.url()== "/tile-view-list") ||($location.url()== "/clinical-illustrations")||($location.url()== "/clinical-animations")||($location.url()== "/ADAM-images")||($location.url()== "/ADAM-on-demand")) { | |
2607 | + $rootScope.ResetGridListLength(); | |
2564 | 2608 | } |
2565 | - | |
2566 | - } | |
2567 | - if(($location.url()== "/tile-view-list") ||($location.url()== "/clinical-illustrations")||($location.url()== "/clinical-animations")||($location.url()== "/ADAM-images")||($location.url()== "/ADAM-on-demand")) { | |
2568 | - $rootScope.ResetGridListLength(); | |
2569 | - } | |
2570 | 2609 | |
2571 | - }; | |
2572 | - | |
2573 | - | |
2574 | - | |
2610 | + }, 300); | |
2611 | + } | |
2612 | + | |
2575 | 2613 | $(function () { |
2576 | 2614 | var colpick = $('.demo').each(function () { |
2577 | 2615 | |
... | ... | @@ -2853,16 +2891,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2853 | 2891 | $rootScope.getModuleScrollPosition = function () { |
2854 | 2892 | $rootScope.refreshcheck = "check"; |
2855 | 2893 | $('.mCSB_container ul li').click(function () { |
2856 | - | |
2857 | 2894 | $rootScope.scrollTopPosition = $(this).position().top; |
2858 | - | |
2859 | 2895 | }); |
2860 | 2896 | setTimeout(function () { |
2861 | 2897 | |
2862 | 2898 | $(".sidebar").mCustomScrollbar("scrollTo", $rootScope.scrollTopPosition + "px"); |
2863 | - | |
2864 | - | |
2865 | - | |
2866 | 2899 | }, 300); |
2867 | 2900 | } |
2868 | 2901 | |
... | ... | @@ -2883,8 +2916,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2883 | 2916 | for (var j = 0; j < moduleImagePanel.length; j++) { |
2884 | 2917 | var paneld=moduleImagePanel[j].id; |
2885 | 2918 | var len = (paneld).split("_").length; |
2886 | - var MultiWinId = (paneld).split("_")[len - 1]; | |
2919 | + var MultiWinId = (paneld).split("_")[len - 1]; | |
2920 | + | |
2921 | + $rootScope.minmaxPanelAutoEventTrue(MultiWinId,paneld); | |
2887 | 2922 | $rootScope.orientationchangeToNormal(MultiWinId); |
2923 | + $rootScope.minmaxPanelAutoEventFalse(MultiWinId,paneld); | |
2888 | 2924 | |
2889 | 2925 | if(j>0) |
2890 | 2926 | { |
... | ... | @@ -2943,7 +2979,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2943 | 2979 | |
2944 | 2980 | var len = (paneld).split("_").length; |
2945 | 2981 | var MultiWinId = (paneld).split("_")[len - 1]; |
2982 | + $rootScope.minmaxPanelAutoEventTrue(MultiWinId,paneld); | |
2946 | 2983 | $rootScope.orientationchangeToNormal(MultiWinId); |
2984 | + $rootScope.minmaxPanelAutoEventFalse(MultiWinId,paneld); | |
2947 | 2985 | |
2948 | 2986 | //set max tiles 3 on screen width |
2949 | 2987 | if(countnumber>1 && countnumber<4) |
... | ... | @@ -2975,8 +3013,57 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2975 | 3013 | } |
2976 | 3014 | } |
2977 | 3015 | |
3016 | + } | |
3017 | + | |
3018 | + $rootScope.minmaxPanelAutoEventTrue = function (MultiWinId,paneld) | |
3019 | + { | |
3020 | + if(paneld.match("daImagePanel")) | |
3021 | + { | |
3022 | + $rootScope.SetDAwindowData(MultiWinId, 'minmaxAutoEvent', true); | |
3023 | + } | |
3024 | + else if(paneld.match("AAImagePanel")) | |
3025 | + { | |
3026 | + $rootScope.SetAAwindowData(MultiWinId, 'minmaxAutoEvent', true); | |
3027 | + } | |
3028 | + else if(paneld.match("ciImagePanel")) | |
3029 | + { | |
3030 | + $rootScope.SetCIwindowData(MultiWinId, 'minmaxAutoEvent', true); | |
3031 | + } | |
3032 | + else if(paneld.match("aiImagePanel")) | |
3033 | + { | |
3034 | + $rootScope.SetAIwindowData(MultiWinId, 'minmaxAutoEvent', true); | |
3035 | + } | |
3036 | + else if(paneld.match("picImagePanel")) | |
3037 | + { | |
3038 | + $rootScope.SetPICwindowData(MultiWinId, 'minmaxAutoEvent', true); | |
3039 | + } | |
3040 | + | |
3041 | + } | |
3042 | + $rootScope.minmaxPanelAutoEventFalse = function (MultiWinId,paneld) | |
3043 | + { | |
3044 | + if(paneld.match("daImagePanel")) | |
3045 | + { | |
3046 | + $rootScope.SetDAwindowData(MultiWinId, 'minmaxAutoEvent', false); | |
3047 | + } | |
3048 | + else if(paneld.match("AAImagePanel")) | |
3049 | + { | |
3050 | + $rootScope.SetAAwindowData(MultiWinId, 'minmaxAutoEvent', false); | |
3051 | + } | |
3052 | + else if(paneld.match("ciImagePanel")) | |
3053 | + { | |
3054 | + $rootScope.SetCIwindowData(MultiWinId, 'minmaxAutoEvent', false); | |
3055 | + } | |
3056 | + else if(paneld.match("aiImagePanel")) | |
3057 | + { | |
3058 | + $rootScope.SetAIwindowData(MultiWinId, 'minmaxAutoEvent', false); | |
3059 | + } | |
3060 | + else if(paneld.match("picImagePanel")) | |
3061 | + { | |
3062 | + $rootScope.SetPICwindowData(MultiWinId, 'minmaxAutoEvent', false); | |
2978 | 3063 | } |
2979 | 3064 | |
3065 | + } | |
3066 | + | |
2980 | 3067 | $scope.resetPanelPosition=function(MultiWinId,paneld,resetWidth,pTop,pLeft) |
2981 | 3068 | { |
2982 | 3069 | $rootScope.UnsaveCurriculum = true; |
... | ... | @@ -2985,12 +3072,18 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2985 | 3072 | { |
2986 | 3073 | $("#"+paneld).css('height','520'); |
2987 | 3074 | $("#"+paneld+' .jsPanel-content').css('height','490'); |
2988 | - | |
2989 | - $('#canvasDivDA_' + MultiWinId).css('height', '440'); | |
3075 | + | |
2990 | 3076 | $rootScope.SetDAwindowData(MultiWinId,'width',resetWidth); |
2991 | 3077 | $rootScope.SetDAwindowData(MultiWinId,'height',520); |
2992 | 3078 | $rootScope.SetDAwindowData(MultiWinId,'y',pTop); |
2993 | 3079 | $rootScope.SetDAwindowData(MultiWinId,'x',pLeft); |
3080 | + | |
3081 | + var canvasDiv='canvasDivDA_' + MultiWinId; | |
3082 | + var canvasDraw='canvasDA_' + MultiWinId; | |
3083 | + var canvasPaint='canvasPaintDA_' + MultiWinId; | |
3084 | + var bodyVid=$rootScope.GetDAwindowData(MultiWinId,'voId'); | |
3085 | + var annotationData=$rootScope.GetDAwindowData(MultiWinId,'annotationData'); | |
3086 | + $rootScope.setAADAPanelCordinate(MultiWinId,bodyVid,paneld,canvasDiv,canvasDraw,canvasPaint,440,resetWidth,annotationData); | |
2994 | 3087 | |
2995 | 3088 | } |
2996 | 3089 | else if(paneld.match("AAImagePanel")) |
... | ... | @@ -2998,44 +3091,82 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
2998 | 3091 | $("#"+paneld).css('height','520'); |
2999 | 3092 | $("#"+paneld+' .jsPanel-content').css('height','490'); |
3000 | 3093 | |
3001 | - $('#canvasAADiv_' + MultiWinId).css('height', '440'); | |
3002 | 3094 | $rootScope.SetAAwindowData(MultiWinId,'width',resetWidth); |
3003 | 3095 | $rootScope.SetAAwindowData(MultiWinId,'height',520); |
3004 | 3096 | $rootScope.SetAAwindowData(MultiWinId,'y',pTop); |
3005 | 3097 | $rootScope.SetAAwindowData(MultiWinId,'x',pLeft); |
3098 | + var canvasDiv='canvasAADiv_' + MultiWinId; | |
3099 | + var canvasDraw='canvasAA_' + MultiWinId; | |
3100 | + var canvasPaint='canvasPaintAA_' + MultiWinId; | |
3101 | + var annotationData=$rootScope.GetAAwindowData(MultiWinId,'annotationData'); | |
3102 | + | |
3103 | + $rootScope.setAADAPanelCordinate(MultiWinId,0,paneld,canvasDiv,canvasDraw,canvasPaint,440,resetWidth,annotationData); | |
3006 | 3104 | } |
3007 | 3105 | else if(paneld.match("ciImagePanel")) |
3008 | 3106 | { |
3009 | 3107 | $("#"+paneld).css('height','520'); |
3010 | 3108 | $("#"+paneld+' .jsPanel-content').css('height','490'); |
3011 | - | |
3012 | - $('#canvasDivCI_' + MultiWinId).css('height', '490'); | |
3109 | + | |
3013 | 3110 | $rootScope.SetCIwindowData(MultiWinId,'width',resetWidth); |
3014 | 3111 | $rootScope.SetCIwindowData(MultiWinId,'height',520); |
3015 | 3112 | $rootScope.SetCIwindowData(MultiWinId,'y',pTop); |
3016 | 3113 | $rootScope.SetCIwindowData(MultiWinId,'x',pLeft); |
3114 | + var canvasDiv='canvasDivCI_' + MultiWinId; | |
3115 | + var canvasDraw='canvasCI_' + MultiWinId; | |
3116 | + var canvasPaint='canvasPaintCI_' + MultiWinId; | |
3117 | + var imgName='ciimage_' + MultiWinId; | |
3118 | + var oldleft= $rootScope.GetCIwindowData(MultiWinId, 'imgLeft'); | |
3119 | + var annotationData=$rootScope.GetCIwindowData(MultiWinId,'annotationData'); | |
3120 | + | |
3121 | + $rootScope.setIMGPanelCordinate(MultiWinId,paneld,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,485,resetWidth,annotationData); | |
3122 | + var img = document.getElementById(imgName); | |
3123 | + $rootScope.SetCIwindowData(MultiWinId, 'imgLeft',img.offsetLeft); | |
3124 | + | |
3017 | 3125 | } |
3018 | 3126 | else if(paneld.match("aiImagePanel")) |
3019 | 3127 | { |
3020 | 3128 | $("#"+paneld).css('height','520'); |
3021 | 3129 | $("#"+paneld+' .jsPanel-content').css('height','490'); |
3022 | - | |
3023 | - $('#canvasDivAI_' + MultiWinId).css('height', '485'); | |
3130 | + | |
3024 | 3131 | $rootScope.SetAIwindowData(MultiWinId,'width',resetWidth); |
3025 | 3132 | $rootScope.SetAIwindowData(MultiWinId,'height',520); |
3026 | 3133 | $rootScope.SetAIwindowData(MultiWinId,'y',pTop); |
3027 | 3134 | $rootScope.SetAIwindowData(MultiWinId,'x',pLeft); |
3135 | + | |
3136 | + var canvasDiv='canvasDivAI_' + MultiWinId; | |
3137 | + var canvasDraw='canvasAI_' + MultiWinId; | |
3138 | + var canvasPaint='canvasPaintAI_' + MultiWinId; | |
3139 | + var imgName='aimage_' + MultiWinId; | |
3140 | + var oldleft= $rootScope.GetAIwindowData(MultiWinId, 'imgLeft'); | |
3141 | + var annotationData=$rootScope.GetAIwindowData(MultiWinId,'annotationData'); | |
3142 | + | |
3143 | + $rootScope.setIMGPanelCordinate(MultiWinId,paneld,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,485,resetWidth,annotationData); | |
3144 | + var img = document.getElementById(imgName); | |
3145 | + $rootScope.SetAIwindowData(MultiWinId, 'imgLeft',img.offsetLeft); | |
3146 | + | |
3028 | 3147 | } |
3029 | 3148 | else if(paneld.match("picImagePanel")) |
3030 | 3149 | { |
3031 | 3150 | $("#"+paneld).css('height','520'); |
3032 | 3151 | $("#"+paneld+' .jsPanel-content').css('height','490'); |
3033 | 3152 | |
3034 | - $('#canvasDivPIC_' + MultiWinId).css('height', '485'); | |
3153 | + //$('#canvasDivPIC_' + MultiWinId).css('height', '485'); | |
3035 | 3154 | $rootScope.SetPICwindowData(MultiWinId,'width',resetWidth); |
3036 | 3155 | $rootScope.SetPICwindowData(MultiWinId,'height',520); |
3037 | 3156 | $rootScope.SetPICwindowData(MultiWinId,'y',pTop); |
3038 | 3157 | $rootScope.SetPICwindowData(MultiWinId,'x',pLeft); |
3158 | + | |
3159 | + var canvasDiv='canvasDivPIC_' + MultiWinId; | |
3160 | + var canvasDraw='canvasPIC_' + MultiWinId; | |
3161 | + var canvasPaint='canvasPaintPIC_' + MultiWinId; | |
3162 | + var imgName='mypic_' + MultiWinId; | |
3163 | + var oldleft= $rootScope.GetPICwindowData(MultiWinId, 'imgLeft'); | |
3164 | + var annotationData=$rootScope.GetPICwindowData(MultiWinId,'annotationData'); | |
3165 | + | |
3166 | + $rootScope.setIMGPanelCordinate(MultiWinId,paneld,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,485,resetWidth,annotationData); | |
3167 | + var img = document.getElementById(imgName); | |
3168 | + $rootScope.SetPICwindowData(MultiWinId, 'imgLeft',img.offsetLeft); | |
3169 | + | |
3039 | 3170 | } |
3040 | 3171 | else if(paneld.match("ThreeDImagePanel")) |
3041 | 3172 | { |
... | ... | @@ -3077,8 +3208,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3077 | 3208 | { |
3078 | 3209 | $("#"+paneld).css('height','520'); |
3079 | 3210 | $("#"+paneld+' .jsPanel-content').css('height','490'); |
3080 | - $('#LabView_' + MultiWinId).css('height', 505); | |
3081 | - $('#panelbodyDiv_' + MultiWinId).css("height",380); | |
3211 | + $('#panelbodyDiv_' + MultiWinId).css("height",390); | |
3212 | + $('#resultbodyDiv_' + MultiWinId).css("height",400); | |
3082 | 3213 | $rootScope.SetLabwindowData(MultiWinId,'width',resetWidth); |
3083 | 3214 | $rootScope.SetLabwindowData(MultiWinId,'height',520); |
3084 | 3215 | $rootScope.SetLabwindowData(MultiWinId,'y',pTop); |
... | ... | @@ -3086,7 +3217,195 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3086 | 3217 | |
3087 | 3218 | } |
3088 | 3219 | |
3089 | - } | |
3220 | + } | |
3221 | + | |
3222 | + $rootScope.setAADAPanelCordinate = function (MultiWinId,viewid,pnlName,canvasDiv,CanvasDrawId,canvasPaintId,canvasDIvHeight,canvasDIvWidth,annotationData) | |
3223 | + { | |
3224 | + $('#' + canvasDiv).css('height', canvasDIvHeight); | |
3225 | + $rootScope.resetMenuOptionOnClick(pnlName); | |
3226 | + | |
3227 | + var canvas = document.getElementById(CanvasDrawId); | |
3228 | + var canvasPaint = document.getElementById(canvasPaintId); | |
3229 | + canvas.height = canvasDIvHeight-30; | |
3230 | + canvasPaint.height = canvasDIvHeight-30; | |
3231 | + canvas.width = canvasDIvWidth-20; | |
3232 | + canvasPaint.width = canvasDIvWidth-20; | |
3233 | + | |
3234 | + if(pnlName.match("AAImagePanel")) | |
3235 | + { | |
3236 | + //keep image position always as it is! | |
3237 | + var aaDetailCanvas = document.getElementById("aaDetailViewCanvas_"+MultiWinId); | |
3238 | + if(aaDetailCanvas.height>canvasDIvHeight) | |
3239 | + { | |
3240 | + canvas.height = aaDetailCanvas.height; | |
3241 | + canvasPaint.height = aaDetailCanvas.height; | |
3242 | + } | |
3243 | + if(aaDetailCanvas.width>canvasDIvWidth) | |
3244 | + { | |
3245 | + canvas.width = aaDetailCanvas.width; | |
3246 | + canvasPaint.width = aaDetailCanvas.width; | |
3247 | + } | |
3248 | + } | |
3249 | + else if(pnlName.match("daImagePanel")) | |
3250 | + { | |
3251 | + if(viewid=="1" ||viewid=="5") | |
3252 | + { | |
3253 | + var imageCanvas6MR = document.getElementById("imageCanvas6_MR_"+MultiWinId);//get width | |
3254 | + var imageCanvas5MR = document.getElementById("imageCanvas5_MR_"+MultiWinId);//get height | |
3255 | + var totalwidth=imageCanvas6MR.offsetLeft+imageCanvas6MR.width; | |
3256 | + var totalHeight=imageCanvas5MR.offsetTop+imageCanvas5MR.height; | |
3257 | + } | |
3258 | + else if(viewid=="4" ||viewid=="8") | |
3259 | + { | |
3260 | + var imageCanvas6 = document.getElementById("imageCanvas6_"+MultiWinId);//get width | |
3261 | + var imageCanvas5 = document.getElementById("imageCanvas5_"+MultiWinId);//get height | |
3262 | + var totalwidth=imageCanvas6.offsetLeft+imageCanvas6.width; | |
3263 | + var totalHeight=imageCanvas5.offsetTop+imageCanvas5.height; | |
3264 | + } | |
3265 | + else if(viewid=="2" ||viewid=="6"||viewid=="3" ||viewid=="7") | |
3266 | + { | |
3267 | + var imageCanvas2 = document.getElementById("imageCanvas2_"+MultiWinId);//get width | |
3268 | + var imageCanvas5 = document.getElementById("imageCanvas5_"+MultiWinId);//get height | |
3269 | + var totalwidth=imageCanvas2.offsetLeft+imageCanvas2.width+50; | |
3270 | + var totalHeight=imageCanvas5.offsetTop+imageCanvas5.height; | |
3271 | + } | |
3272 | + else if(viewid=="9" ||viewid=="11") | |
3273 | + { | |
3274 | + var imageCanvas2 = document.getElementById("imageCanvas2_"+MultiWinId);//get width | |
3275 | + var imageCanvas4 = document.getElementById("imageCanvas4_"+MultiWinId);//get height | |
3276 | + var totalwidth=imageCanvas2.offsetLeft+imageCanvas2.width+50; | |
3277 | + var totalHeight=imageCanvas4.offsetTop+imageCanvas4.height; | |
3278 | + } | |
3279 | + else if(viewid=="10" ||viewid=="12") | |
3280 | + { | |
3281 | + var imageCanvas6 = document.getElementById("imageCanvas6_"+MultiWinId);//get height and width | |
3282 | + | |
3283 | + var totalwidth=imageCanvas6.offsetLeft+imageCanvas6.width+50; | |
3284 | + var totalHeight=imageCanvas6.offsetTop+imageCanvas6.height; | |
3285 | + } | |
3286 | + | |
3287 | + | |
3288 | + if(totalHeight>canvasDIvHeight) | |
3289 | + { | |
3290 | + canvas.height = totalHeight; | |
3291 | + canvasPaint.height = totalHeight; | |
3292 | + } | |
3293 | + if(totalwidth>canvasDIvWidth) | |
3294 | + { | |
3295 | + canvas.width = totalwidth; | |
3296 | + canvasPaint.width = totalwidth; | |
3297 | + } | |
3298 | + | |
3299 | + } | |
3300 | + | |
3301 | + if(annotationData!="" && annotationData!=undefined) | |
3302 | + { | |
3303 | + if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) | |
3304 | + { | |
3305 | + // image fixed no position changed | |
3306 | + //first draw shape and then store in object | |
3307 | + $rootScope.ResizeCBSavedAnnotation(pnlName,CanvasDrawId,canvasPaintId,annotationData); | |
3308 | + } | |
3309 | + } | |
3310 | + | |
3311 | + } | |
3312 | + | |
3313 | + $rootScope.setIMGPanelCordinate = function (MultiWinId,pnlName,canvasDiv,CanvasDrawId,canvasPaintId,imgName,oldleft,canvasDIvHeight,canvasDIvWidth,annotationData) | |
3314 | + { | |
3315 | + $('#' + canvasDiv).css('height', canvasDIvHeight); | |
3316 | + $rootScope.resetMenuOptionOnClick(pnlName); | |
3317 | + var img = document.getElementById(imgName); | |
3318 | + | |
3319 | + var canvas = document.getElementById(CanvasDrawId); | |
3320 | + var canvasPaint = document.getElementById(canvasPaintId); | |
3321 | + canvas.height = canvasDIvHeight-30; | |
3322 | + canvasPaint.height = canvasDIvHeight-30; | |
3323 | + canvas.width = canvasDIvWidth-20; | |
3324 | + canvasPaint.width = canvasDIvWidth-20; | |
3325 | + | |
3326 | + if((canvasDIvWidth-img.width)>0) | |
3327 | + { | |
3328 | + $("#"+imgName).css("left", (canvasDIvWidth-img.width)/2 + "px"); | |
3329 | + } | |
3330 | + else | |
3331 | + { | |
3332 | + //image in big size than screen | |
3333 | + $("#"+imgName).css("left", 0 + "px"); | |
3334 | + } | |
3335 | + | |
3336 | + if(img.height>canvasDIvHeight) | |
3337 | + { | |
3338 | + canvas.height = img.height; | |
3339 | + canvasPaint.height = img.height; | |
3340 | + } | |
3341 | + if(img.width>canvasDIvWidth) | |
3342 | + { | |
3343 | + canvas.width = img.width; | |
3344 | + canvasPaint.width = img.width; | |
3345 | + } | |
3346 | + | |
3347 | + if(annotationData!="" && annotationData!=undefined) | |
3348 | + { | |
3349 | + if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) | |
3350 | + { | |
3351 | + var modifiedData=$rootScope.resetAnnotationData(imgName,oldleft,annotationData); | |
3352 | + if(modifiedData!="" && modifiedData!=undefined) | |
3353 | + { | |
3354 | + if(modifiedData.shapeStates.length>0||modifiedData.paintCanvasState.length>0) | |
3355 | + { | |
3356 | + annotationData=modifiedData; | |
3357 | + //first draw shape and then store in object | |
3358 | + $rootScope.ResizeCBSavedAnnotation(pnlName,CanvasDrawId,canvasPaintId,annotationData); | |
3359 | + } | |
3360 | + } | |
3361 | + | |
3362 | + } | |
3363 | + } | |
3364 | + } | |
3365 | + | |
3366 | + $rootScope.resetAnnotationData = function (imgName,oldleft,annotationData) | |
3367 | + { | |
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 | + } | |
3400 | + | |
3401 | + } | |
3402 | + | |
3403 | + } | |
3404 | + } | |
3405 | + | |
3406 | + return modifiiedannotationData; | |
3407 | + } | |
3408 | + | |
3090 | 3409 | |
3091 | 3410 | $rootScope.disableTopMenuOption=function() |
3092 | 3411 | { |
... | ... | @@ -3332,23 +3651,22 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3332 | 3651 | { |
3333 | 3652 | // find all panel in HomeContainerDiv and outside(while minimize); |
3334 | 3653 | var modulePanel = $(document).find("div[id*='ImagePanel']"); |
3335 | - if (modulePanel != undefined && modulePanel.length>0) { | |
3336 | - //if only one module left | |
3337 | - if(slug=='clinical-animations' && $rootScope.userData.mType!=undefined) | |
3338 | - { | |
3339 | - if($rootScope.userData.mType.toLowerCase()=='ca') | |
3340 | - { | |
3341 | - $rootScope.siteUrlInfo.mType=null; | |
3342 | - $rootScope.siteUrlInfo.id=null; | |
3343 | - $rootScope.LogoutUser(); | |
3344 | - } | |
3345 | - | |
3346 | - } | |
3347 | - else | |
3348 | - { | |
3349 | - if(modulePanel.length==1) $location.url('/' + slug); | |
3350 | - } | |
3654 | + if (modulePanel != undefined && modulePanel.length>0) { | |
3351 | 3655 | |
3656 | + //if only one module left | |
3657 | + if(modulePanel.length==1) $location.url('/' + slug); | |
3658 | + | |
3659 | + // if(slug=='clinical-animations' && $rootScope.userData.mType!=undefined) | |
3660 | + // { | |
3661 | + // if($rootScope.userData.mType.toLowerCase()=='ca') | |
3662 | + // { | |
3663 | + // $rootScope.siteUrlInfo.mType=null; | |
3664 | + // $rootScope.siteUrlInfo.id=null; | |
3665 | + // $rootScope.LogoutUser(); | |
3666 | + // } | |
3667 | + | |
3668 | + // } | |
3669 | + | |
3352 | 3670 | } |
3353 | 3671 | } |
3354 | 3672 | |
... | ... | @@ -3605,6 +3923,30 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3605 | 3923 | // keep on top paint Canvas zindex on top |
3606 | 3924 | $rootScope.SetPaintZindexforCI = function (MultiWinId) |
3607 | 3925 | { |
3926 | + //scroll issue in iPad | |
3927 | + var $ua = navigator.userAgent; | |
3928 | + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
3929 | + | |
3930 | + var drawCanvasZindex = parseInt($("#canvasCI_" + MultiWinId).css("z-index")); | |
3931 | + var paintCanvasZindex = parseInt($("#canvasPaintCI_" + MultiWinId).css("z-index")); | |
3932 | + | |
3933 | + if (drawCanvasZindex > paintCanvasZindex) { | |
3934 | + paintCanvasZindex = drawCanvasZindex + 1; | |
3935 | + } | |
3936 | + else | |
3937 | + { | |
3938 | + paintCanvasZindex = paintCanvasZindex + 1; | |
3939 | + } | |
3940 | + | |
3941 | + $("#canvasPaintCI_" + MultiWinId).css("z-index", paintCanvasZindex); | |
3942 | + } | |
3943 | + | |
3944 | + $('#summary_' + MultiWinId).css("z-index", paintCanvasZindex+1); | |
3945 | + | |
3946 | + } | |
3947 | + | |
3948 | + $rootScope.SetPaintZindexforCISummary = function (MultiWinId) | |
3949 | + { | |
3608 | 3950 | var drawCanvasZindex = parseInt($("#canvasCI_" + MultiWinId).css("z-index")); |
3609 | 3951 | var paintCanvasZindex = parseInt($("#canvasPaintCI_" + MultiWinId).css("z-index")); |
3610 | 3952 | |
... | ... | @@ -3615,13 +3957,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3615 | 3957 | { |
3616 | 3958 | paintCanvasZindex = paintCanvasZindex + 1; |
3617 | 3959 | } |
3618 | - | |
3619 | - //scroll issue in iPad | |
3620 | - var $ua = navigator.userAgent; | |
3621 | - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
3622 | - $("#canvasPaintCI_" + MultiWinId).css("z-index", paintCanvasZindex); | |
3623 | - } | |
3624 | - | |
3625 | 3960 | $('#summary_' + MultiWinId).css("z-index", paintCanvasZindex+1); |
3626 | 3961 | |
3627 | 3962 | } |
... | ... | @@ -3928,7 +4263,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
3928 | 4263 | } |
3929 | 4264 | if(paneld.match("ciImagePanel")) |
3930 | 4265 | { |
3931 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
4266 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
3932 | 4267 | } |
3933 | 4268 | |
3934 | 4269 | // remove event listener |
... | ... | @@ -4003,7 +4338,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4003 | 4338 | } |
4004 | 4339 | if(paneld.match("ciImagePanel")) |
4005 | 4340 | { |
4006 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
4341 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
4007 | 4342 | } |
4008 | 4343 | |
4009 | 4344 | $scope.onDrawingCanvasOnModule(canvasElement); |
... | ... | @@ -4076,7 +4411,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4076 | 4411 | } |
4077 | 4412 | if(paneld.match("ciImagePanel")) |
4078 | 4413 | { |
4079 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
4414 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
4080 | 4415 | |
4081 | 4416 | } |
4082 | 4417 | |
... | ... | @@ -4118,7 +4453,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4118 | 4453 | } |
4119 | 4454 | if(paneld.match("ciImagePanel")) |
4120 | 4455 | { |
4121 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
4456 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
4122 | 4457 | } |
4123 | 4458 | |
4124 | 4459 | // remove event listener |
... | ... | @@ -4171,7 +4506,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4171 | 4506 | |
4172 | 4507 | if(paneld.match("ciImagePanel")) |
4173 | 4508 | { |
4174 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
4509 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
4175 | 4510 | } |
4176 | 4511 | |
4177 | 4512 | $scope.onDrawingCanvasOnModule(canvasElement); |
... | ... | @@ -4257,7 +4592,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4257 | 4592 | |
4258 | 4593 | if(paneld.match("ciImagePanel")) |
4259 | 4594 | { |
4260 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
4595 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
4261 | 4596 | } |
4262 | 4597 | // remove event listener |
4263 | 4598 | $scope.removeOnDrawingCanvas(canvasElement); |
... | ... | @@ -4294,7 +4629,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4294 | 4629 | $rootScope.switchCanvasToPaintCanvas(paneld); |
4295 | 4630 | if(paneld.match("ciImagePanel")) |
4296 | 4631 | { |
4297 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
4632 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
4298 | 4633 | } |
4299 | 4634 | |
4300 | 4635 | $('#' + canvasPaintId).sketch(); |
... | ... | @@ -4461,7 +4796,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4461 | 4796 | } |
4462 | 4797 | if(paneld.match("ciImagePanel")) |
4463 | 4798 | { |
4464 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
4799 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
4465 | 4800 | } |
4466 | 4801 | |
4467 | 4802 | $scope.onDrawingCanvasOnModule(canvasElement); |
... | ... | @@ -4511,7 +4846,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4511 | 4846 | } |
4512 | 4847 | if(paneld.match("ciImagePanel")) |
4513 | 4848 | { |
4514 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
4849 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
4515 | 4850 | } |
4516 | 4851 | |
4517 | 4852 | $scope.onDrawingCanvasOnModule(canvasElement); |
... | ... | @@ -4560,7 +4895,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4560 | 4895 | } |
4561 | 4896 | if(paneld.match("ciImagePanel")) |
4562 | 4897 | { |
4563 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
4898 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
4564 | 4899 | } |
4565 | 4900 | |
4566 | 4901 | $scope.onDrawingCanvasOnModule(canvasElement); |
... | ... | @@ -4608,7 +4943,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4608 | 4943 | } |
4609 | 4944 | if(paneld.match("ciImagePanel")) |
4610 | 4945 | { |
4611 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
4946 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
4612 | 4947 | } |
4613 | 4948 | |
4614 | 4949 | $scope.onDrawingCanvasOnModule(canvasElement); |
... | ... | @@ -4709,7 +5044,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4709 | 5044 | } |
4710 | 5045 | if(paneld.match("ciImagePanel")) |
4711 | 5046 | { |
4712 | - $rootScope.SetPaintZindexforCI(MultiWinId); | |
5047 | + $rootScope.SetPaintZindexforCISummary(MultiWinId); | |
4713 | 5048 | } |
4714 | 5049 | } |
4715 | 5050 | } |
... | ... | @@ -4911,6 +5246,122 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4911 | 5246 | //Edit Shape Style popup should open at it's default position |
4912 | 5247 | $("#modeleditstyle").css({ "left": "40%", "right": "0", "top": "70px" }); |
4913 | 5248 | } |
5249 | + | |
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) { | |
5290 | + var len = (paneld).split("_").length; | |
5291 | + var MultiWinId = (paneld).split("_")[len - 1]; | |
5292 | + | |
5293 | + if(paneld.match("aiImagePanel")) | |
5294 | + { | |
5295 | + $rootScope.aiAnnotationToolEvent(MultiWinId); | |
5296 | + } | |
5297 | + else if(paneld.match("ciImagePanel")) | |
5298 | + { | |
5299 | + $rootScope.ciAnnotationToolEvent(MultiWinId); | |
5300 | + } | |
5301 | + else if(paneld.match("picImagePanel")) | |
5302 | + { | |
5303 | + $rootScope.picAnnotationToolEvent(MultiWinId); | |
5304 | + } | |
5305 | + | |
5306 | + var shapeStates=annotationData.shapeStates; | |
5307 | + var shapecount=shapeStates.length; | |
5308 | + var paintCanvasState=annotationData.paintCanvasState; | |
5309 | + | |
5310 | + $timeout(function () { | |
5311 | + | |
5312 | + for(var shapeindx=0;shapeindx<shapecount;shapeindx++) | |
5313 | + { | |
5314 | + var shapeData=shapeStates[shapeindx]; | |
5315 | + var shapeName = shapeStates[shapeindx].layerName; | |
5316 | + var shapetype = shapeStates[shapeindx].shapeType; | |
5317 | + $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 | + | |
5341 | + annotationData.shapeStates = new jinqJs() | |
5342 | + .from(annotationData.shapeStates) | |
5343 | + .delete().at("layerName == " + shapeName).select(); | |
5344 | + | |
5345 | + } | |
5346 | + | |
5347 | + if(paintCanvasState!=undefined && paintCanvasState.length>0) | |
5348 | + { | |
5349 | + //for paint brush | |
5350 | + $rootScope.switchCanvasToPaintCanvas(paneld); | |
5351 | + var drawingPoints=paintCanvasState | |
5352 | + //auto save last cb paint | |
5353 | + $scope.PaintEraseEvent(); | |
5354 | + $scope.savePaintAnnotation(canvasPaintId,drawingPoints); | |
5355 | + $("#" + canvasPaintId).sketch({drawAction:drawingPoints}); | |
5356 | + //clear sketch js event for paint and erase | |
5357 | + $.sketch = { tools: {}}; | |
5358 | + } | |
5359 | + | |
5360 | + $rootScope.CloseAnnotationTool(); | |
5361 | + | |
5362 | + }, 50); | |
5363 | + | |
5364 | + } | |
4914 | 5365 | |
4915 | 5366 | $rootScope.LoadCBSavedAnnotation = function (canvasId,canvasPaintId,annotationData) { |
4916 | 5367 | var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']"); |
... | ... | @@ -4945,43 +5396,44 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
4945 | 5396 | |
4946 | 5397 | } |
4947 | 5398 | } |
4948 | - } | |
4949 | - $timeout(function () { | |
4950 | - var shapeStates=annotationData.shapeStates; | |
4951 | - var paintCanvasState=annotationData.paintCanvasState; | |
5399 | + var shapeStates=annotationData.shapeStates; | |
5400 | + var shapecount=shapeStates.length; | |
5401 | + var paintCanvasState=annotationData.paintCanvasState; | |
5402 | + | |
5403 | + $timeout(function () { | |
5404 | + | |
5405 | + for(var shapeindx=0;shapeindx<shapecount;shapeindx++) | |
5406 | + { | |
5407 | + var shapeData=shapeStates[shapeindx]; | |
5408 | + $rootScope.AutoDrawShapeByData(canvasId,shapeData); | |
5409 | + } | |
5410 | + | |
5411 | + if(paintCanvasState!=undefined && paintCanvasState.length>0) | |
5412 | + { | |
5413 | + if (modulePanel != undefined && modulePanel.length>0) { | |
5414 | + for (var index = 0 ; index < modulePanel.length; index++) { | |
5415 | + var paneld = modulePanel[index].id; | |
5416 | + if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
5417 | + { | |
5418 | + //for paint brush | |
5419 | + $rootScope.switchCanvasToPaintCanvas(paneld); | |
4952 | 5420 | |
4953 | - for(var shapeindx=0;shapeindx<shapeStates.length;shapeindx++) | |
4954 | - { | |
4955 | - var shapeData=shapeStates[shapeindx]; | |
4956 | - $rootScope.AutoDrawShapeByData(canvasId,shapeData); | |
4957 | - } | |
4958 | - | |
4959 | - if(paintCanvasState!=undefined && paintCanvasState.length>0) | |
4960 | - { | |
4961 | - if (modulePanel != undefined && modulePanel.length>0) { | |
4962 | - for (var index = 0 ; index < modulePanel.length; index++) { | |
4963 | - var paneld = modulePanel[index].id; | |
4964 | - if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel")) | |
4965 | - { | |
4966 | - //for paint brush | |
4967 | - $rootScope.switchCanvasToPaintCanvas(paneld); | |
4968 | - | |
5421 | + } | |
4969 | 5422 | } |
4970 | 5423 | } |
5424 | + var drawingPoints=paintCanvasState | |
5425 | + //auto save last cb paint | |
5426 | + $scope.PaintEraseEvent(); | |
5427 | + $scope.savePaintAnnotation(canvasPaintId,drawingPoints); | |
5428 | + $("#" + canvasPaintId).sketch({drawAction:drawingPoints}); | |
5429 | + //clear sketch js event for paint and erase | |
5430 | + $.sketch = { tools: {}}; | |
4971 | 5431 | } |
4972 | - var drawingPoints=paintCanvasState | |
4973 | - //auto save last cb paint | |
4974 | - $scope.PaintEraseEvent(); | |
4975 | - $scope.savePaintAnnotation(canvasPaintId,drawingPoints); | |
4976 | - $("#" + canvasPaintId).sketch({drawAction:drawingPoints}); | |
4977 | - //clear sketch js event for paint and erase | |
4978 | - $.sketch = { tools: {}}; | |
4979 | - } | |
4980 | - | |
4981 | - $rootScope.CloseAnnotationTool(); | |
4982 | - | |
4983 | - }, 500); | |
4984 | - | |
5432 | + | |
5433 | + $rootScope.CloseAnnotationTool(); | |
5434 | + | |
5435 | + }, 500); | |
5436 | + } | |
4985 | 5437 | } |
4986 | 5438 | $scope.savePaintAnnotation=function(canvasPaintId,drawingPoints) |
4987 | 5439 | { |
... | ... | @@ -8880,7 +9332,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8880 | 9332 | |
8881 | 9333 | isReloadingViewRequired = true; |
8882 | 9334 | } |
8883 | - else if (setting.modesty != null && setting.modesty != $rootScope.globalSetting.modesty) { | |
9335 | + else | |
9336 | + { | |
8884 | 9337 | $rootScope.globalSetting.modesty = setting.modesty; |
8885 | 9338 | localStorage.setItem("globalModesty", $rootScope.globalSetting.modesty); |
8886 | 9339 | |
... | ... | @@ -8895,6 +9348,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8895 | 9348 | { |
8896 | 9349 | var len = (paneld).split("_").length; |
8897 | 9350 | var MultiWinId = (paneld).split("_")[len - 1]; |
9351 | + var ModestyValue= $rootScope.GetDAwindowData(MultiWinId, 'ModestyValue'); | |
9352 | + if (setting.modesty != null && setting.modesty != ModestyValue) { | |
8898 | 9353 | |
8899 | 9354 | if ($('.modestyImg_' + MultiWinId) != null) { |
8900 | 9355 | if (($rootScope.globalSetting.modesty == 'Y')) { |
... | ... | @@ -8937,8 +9392,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
8937 | 9392 | else { |
8938 | 9393 | $('.transModestyImg_' + MultiWinId).css('visibility', 'hidden'); |
8939 | 9394 | } |
8940 | - $rootScope.changeNavigatorModesty(MultiWinId); | |
8941 | - | |
9395 | + $rootScope.changeNavigatorModesty(MultiWinId); | |
9396 | + } | |
8942 | 9397 | } |
8943 | 9398 | } |
8944 | 9399 | } |
... | ... | @@ -9562,7 +10017,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data |
9562 | 10017 | $("#HomeContainerDiv").css({ "display": "block", "pointer-events": "auto", "opacity": "1" }); |
9563 | 10018 | |
9564 | 10019 | $('#dvOpenResourcePanel').remove(); |
9565 | - sessionStorage.removeItem('isModuleOpenByOpenResource'); | |
10020 | + sessionStorage.removeItem('isModuleOpenByOpenResource'); | |
9566 | 10021 | $("#jsPanel-min-container").removeAttr("style"); |
9567 | 10022 | if (document.location.pathname == "/curriculum-builder-detail") { |
9568 | 10023 | if($('div.CBLeft-Sidebar').hasClass('active')) |
... | ... | @@ -9999,7 +10454,7 @@ function closeIFrame() { |
9999 | 10454 | } |
10000 | 10455 | |
10001 | 10456 | function AIAModuleOpenResourceInfo(windowData) { |
10002 | - sessionStorage.removeItem('isModuleOpenByOpenResource'); | |
10457 | + sessionStorage.removeItem('isModuleOpenByOpenResource'); | |
10003 | 10458 | window.parent.closeIFrame(); |
10004 | 10459 | $("#jsPanel-min-container").removeAttr("style"); |
10005 | 10460 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
... | ... | @@ -428,9 +428,10 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, |
428 | 428 | } |
429 | 429 | $scope.SetLEwindowStoreData(windowviewid, 'maximised',true); |
430 | 430 | $scope.SetLEwindowStoreData(windowviewid, 'minimised',false); |
431 | - var canvasDIvHeight = parseInt($('#labImagePanel_' + windowviewid).outerHeight()) - 15; | |
432 | - $('#LabView_' + windowviewid).css('height', canvasDIvHeight); | |
433 | - $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-125); | |
431 | + var canvasDIvHeight = $('#labImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
432 | + $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-100); | |
433 | + $('#resultbodyDiv_' + windowviewid).css("height",canvasDIvHeight-90); | |
434 | + | |
434 | 435 | $rootScope.resetMenuOptionOnClick(pnlName); |
435 | 436 | }, |
436 | 437 | onnormalized:function (panel) { |
... | ... | @@ -444,24 +445,27 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, |
444 | 445 | } |
445 | 446 | $scope.SetLEwindowStoreData(windowviewid, 'minimised',false); |
446 | 447 | $scope.SetLEwindowStoreData(windowviewid, 'maximised',false); |
447 | - var canvasDIvHeight = parseInt($('#labImagePanel_' + windowviewid).outerHeight()) - 15; | |
448 | - $('#LabView_' + windowviewid).css('height', canvasDIvHeight); | |
449 | - $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-125); | |
448 | + var canvasDIvHeight = $('#labImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
449 | + $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-100); | |
450 | + $('#resultbodyDiv_' + windowviewid).css("height",canvasDIvHeight-90); | |
450 | 451 | $rootScope.resetMenuOptionOnClick(pnlName); |
451 | 452 | }, |
452 | 453 | resizable: { |
454 | + minWidth: 600, | |
455 | + minHeight: 500, | |
453 | 456 | stop: function (event, ui) { |
454 | 457 | var pnlName=event.currentTarget.id; |
455 | 458 | var len = (pnlName).split("_").length; |
456 | 459 | var windowviewid = (pnlName).split("_")[len - 1]; |
460 | + var canvasDIvHeight = $('#labImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
457 | 461 | $scope.SetLEwindowStoreData(windowviewid, 'width', ui.size.width); |
458 | - $scope.SetLEwindowStoreData(windowviewid, 'height', ui.size.height); | |
462 | + $scope.SetLEwindowStoreData(windowviewid, 'height', canvasDIvHeight); | |
459 | 463 | $scope.SetLEwindowStoreData(windowviewid, 'y', ui.position.top); |
460 | 464 | $scope.SetLEwindowStoreData(windowviewid, 'x', ui.position.left); |
461 | 465 | $rootScope.UnsaveCurriculum = true; |
462 | - var canvasDIvHeight = parseInt($('#labImagePanel_' + windowviewid).outerHeight()) - 15; | |
463 | - $('#LabView_' + windowviewid).css('height', canvasDIvHeight); | |
464 | - $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-125); | |
466 | + | |
467 | + $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-100); | |
468 | + $('#resultbodyDiv_' + windowviewid).css("height",canvasDIvHeight-90); | |
465 | 469 | $rootScope.resetMenuOptionOnClick(pnlName); |
466 | 470 | } |
467 | 471 | |
... | ... | @@ -503,9 +507,18 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, |
503 | 507 | // set false after initial call of min,max or normal |
504 | 508 | $scope.SetLEwindowStoreData(windowviewid, 'minmaxAutoEvent', false); |
505 | 509 | $scope.SetLEwindowStoreData(windowviewid, 'y', $scope.jsPanelTop); |
506 | - $scope.SetLEwindowStoreData(windowviewid, 'x', $scope.jsPanelLeft); | |
510 | + $scope.SetLEwindowStoreData(windowviewid, 'x', $scope.jsPanelLeft) | |
507 | 511 | $scope.SetLEwindowStoreData(windowviewid, 'width', $scope.jsPanelWidth); |
508 | 512 | $scope.SetLEwindowStoreData(windowviewid, 'height', $scope.jsPanelHeight); |
513 | + | |
514 | + $scope.setControlsIDs(windowviewid); | |
515 | + $scope.createScopeVariable(windowviewid); | |
516 | + | |
517 | + $scope.labViewID = "LabView_" + windowviewid; | |
518 | + var labViewElement = angular.element(document.getElementById($scope.labViewID)); | |
519 | + | |
520 | + $compile(labViewElement.contents())($scope); | |
521 | + | |
509 | 522 | |
510 | 523 | var labExerciseInfo = { |
511 | 524 | userId: userloginid, |
... | ... | @@ -514,52 +527,34 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, |
514 | 527 | LabExerciseService.GetLabExercise(labExerciseInfo) |
515 | 528 | .then( |
516 | 529 | function (labResult) { |
517 | - $scope.setControlsIDs(windowviewid); | |
518 | - $scope.createScopeVariable(windowviewid); | |
519 | - | |
520 | - $scope.labViewID = "LabView_" + windowviewid; | |
521 | - var labViewElement = angular.element(document.getElementById($scope.labViewID)); | |
522 | - | |
523 | - $compile(labViewElement.contents())($scope); | |
524 | - | |
525 | - if ($rootScope.isCallFromOtherModule) { | |
526 | - var canvasDIvHeight = parseInt($('#labImagePanel_' + windowviewid).outerHeight()) - 30; | |
527 | - } | |
528 | - else | |
529 | - { | |
530 | - var canvasDIvHeight = parseInt($('#labImagePanel_' + windowviewid).outerHeight())-15; | |
531 | - | |
532 | - $('#labBodyview').css("height", $(window).outerHeight() - 65); | |
533 | - | |
534 | - $('#labBodyview').css("width", $(window).outerWidth() - 15); | |
535 | - | |
536 | - } | |
537 | - | |
538 | - $('#LabView_' + windowviewid).css('height', canvasDIvHeight); | |
539 | - | |
540 | - $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-125); | |
541 | - | |
542 | - | |
543 | - $scope.JsPanelclick(windowviewid); | |
530 | + | |
531 | + $timeout(function () { | |
532 | + var canvasDIvHeight = $('#labImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
533 | + $('#panelbodyDiv_' + windowviewid).css("height",canvasDIvHeight-100); | |
534 | + $('#resultbodyDiv_' + windowviewid).css("height",canvasDIvHeight-90); | |
535 | + $scope.JsPanelclick(windowviewid); | |
544 | 536 | |
545 | - if (labResult != undefined && labResult.lastQuestion > 0 && labResult != AIAConstants.SAVED_LAB_EXERCISE_NOT_FOUND) { | |
546 | - | |
547 | - $scope.SetLEwindowStoreData(windowviewid, 'SavedLabExercise', labResult); | |
548 | - | |
549 | - $('#quizNo_' + windowviewid).text(labResult.lastQuestion); | |
550 | - $scope.SetLEwindowStoreData(windowviewid, 'quiznumber', labResult.lastQuestion); | |
551 | - // $scope.initialQuestioNo = labResult.lastQuestion; | |
552 | - $scope.SetLEwindowStoreData(windowviewid, 'initialQuestioNo', labResult.lastQuestion); | |
553 | - $scope.GetQuizByTopic(windowviewid); | |
554 | - } | |
555 | - else { | |
556 | - $scope.GetQuizByTopic(windowviewid); | |
557 | - } | |
558 | - $scope.DisableUI(); | |
537 | + if (labResult != undefined && labResult.lastQuestion > 0 && labResult != AIAConstants.SAVED_LAB_EXERCISE_NOT_FOUND) { | |
538 | + | |
539 | + $scope.SetLEwindowStoreData(windowviewid, 'SavedLabExercise', labResult); | |
540 | + | |
541 | + $('#quizNo_' + windowviewid).text(labResult.lastQuestion); | |
542 | + $scope.SetLEwindowStoreData(windowviewid, 'quiznumber', labResult.lastQuestion); | |
543 | + // $scope.initialQuestioNo = labResult.lastQuestion; | |
544 | + $scope.SetLEwindowStoreData(windowviewid, 'initialQuestioNo', labResult.lastQuestion); | |
545 | + $scope.GetQuizByTopic(windowviewid); | |
546 | + } | |
547 | + else { | |
548 | + $scope.GetQuizByTopic(windowviewid); | |
549 | + } | |
550 | + $scope.DisableUI(); | |
551 | + | |
552 | + },300) | |
559 | 553 | |
560 | 554 | }, |
561 | 555 | function (error) { |
562 | 556 | console.log('error in getting save ddata'); |
557 | + $scope.DisableUI(); | |
563 | 558 | } |
564 | 559 | ) |
565 | 560 | |
... | ... | @@ -636,6 +631,8 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter, |
636 | 631 | $("#btnReportClose").attr("id", "btnReportClose_" + windowviewid); |
637 | 632 | |
638 | 633 | $("#panelbodyDiv").attr("id", "panelbodyDiv_" + windowviewid); |
634 | + $("#resultbodyDiv").attr("id", "resultbodyDiv_" + windowviewid); | |
635 | + | |
639 | 636 | $("#LabExPageHeading").attr("id", "LabExPageHeading_" + windowviewid); |
640 | 637 | $("#minlab").attr("id", "minlab_" + windowviewid); |
641 | 638 | $("#minlabicon").attr("id", "minlabicon_" + windowviewid); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js
... | ... | @@ -372,16 +372,19 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
372 | 372 | $rootScope.resetMenuOptionOnClick(pnlName); |
373 | 373 | }, |
374 | 374 | resizable: { |
375 | + minWidth: 600, | |
376 | + minHeight: 500, | |
375 | 377 | stop: function (event, ui) { |
376 | 378 | var pnlName=event.currentTarget.id; |
377 | 379 | var len = (pnlName).split("_").length; |
378 | 380 | var windowviewid = (pnlName).split("_")[len - 1]; |
381 | + var canvasDIvHeight = $('#vidImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
379 | 382 | $scope.SetVideowindowStoreData(windowviewid, 'width', ui.size.width); |
380 | - $scope.SetVideowindowStoreData(windowviewid, 'height', ui.size.height); | |
383 | + $scope.SetVideowindowStoreData(windowviewid, 'height', canvasDIvHeight); | |
381 | 384 | $scope.SetVideowindowStoreData(windowviewid, 'y', ui.position.top); |
382 | 385 | $scope.SetVideowindowStoreData(windowviewid, 'x', ui.position.left); |
383 | 386 | $rootScope.UnsaveCurriculum = true; |
384 | - var canvasDIvHeight = $('#vidImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
387 | + | |
385 | 388 | $('#playerinlineVideo_'+ windowviewid ).css("height",canvasDIvHeight); |
386 | 389 | $rootScope.resetMenuOptionOnClick(pnlName); |
387 | 390 | } | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js
... | ... | @@ -21,6 +21,7 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
21 | 21 | 'maximised': false, |
22 | 22 | 'minmaxAutoEvent':true, |
23 | 23 | 'annotationData':{shapeStates:[],paintCanvasState:[]}, |
24 | + 'imgLeft': 0, | |
24 | 25 | |
25 | 26 | }; |
26 | 27 | return windata; |
... | ... | @@ -217,6 +218,8 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
217 | 218 | var imageId = $scope.picOpenInOtherModules.id; |
218 | 219 | |
219 | 220 | $scope.SetPICwindowStoreData(windowviewid, 'imageId', imageId); |
221 | + var imgLeft = $scope.picOpenInOtherModules.imgLeft!=undefined?$scope.picOpenInOtherModules.imgLeft:0; | |
222 | + $scope.SetPICwindowStoreData(windowviewid, 'imgLeft', imgLeft); | |
220 | 223 | |
221 | 224 | var imageSource=$scope.picOpenInOtherModules.imageSource; |
222 | 225 | |
... | ... | @@ -315,45 +318,81 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
315 | 318 | var pnlName=panel[0].id; |
316 | 319 | var len = (pnlName).split("_").length; |
317 | 320 | var windowviewid = (pnlName).split("_")[len - 1]; |
318 | - var isAutoCalled = $scope.GetPICwindowStoreData(windowviewid, 'minmaxAutoEvent'); | |
319 | - if(!isAutoCalled) | |
320 | - { | |
321 | - $rootScope.UnsaveCurriculum = true; | |
322 | - } | |
321 | + | |
323 | 322 | $scope.SetPICwindowStoreData(windowviewid, 'maximised',true); |
324 | 323 | $scope.SetPICwindowStoreData(windowviewid, 'minimised',false); |
325 | - var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
326 | - $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight-5); | |
327 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
324 | + var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height()-5; | |
325 | + var canvasDIvWidth = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
326 | + var canvasDiv='canvasDivPIC_' + windowviewid; | |
327 | + var canvasDraw='canvasPIC_' + windowviewid; | |
328 | + var canvasPaint='canvasPaintPIC_' + windowviewid; | |
329 | + var imgName='mypic_' + windowviewid; | |
330 | + var isAutoCalled = $scope.GetPICwindowStoreData(windowviewid, 'minmaxAutoEvent'); | |
331 | + if(!isAutoCalled) | |
332 | + { | |
333 | + $rootScope.UnsaveCurriculum = true; | |
334 | + var oldleft= $rootScope.GetPICwindowData(windowviewid, 'imgLeft'); | |
335 | + var annotationData=$rootScope.GetPICwindowData(windowviewid,'annotationData'); | |
336 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight,canvasDIvWidth,annotationData); | |
337 | + var img = document.getElementById(imgName); | |
338 | + $rootScope.SetPICwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
339 | + } | |
340 | + | |
328 | 341 | }, |
329 | 342 | onnormalized:function (panel) { |
330 | 343 | var pnlName=panel[0].id; |
331 | 344 | var len = (pnlName).split("_").length; |
332 | 345 | var windowviewid = (pnlName).split("_")[len - 1]; |
333 | - var isAutoCalled = $scope.GetPICwindowStoreData(windowviewid, 'minmaxAutoEvent'); | |
334 | - if(!isAutoCalled) | |
335 | - { | |
336 | - $rootScope.UnsaveCurriculum = true; | |
337 | - } | |
346 | + | |
338 | 347 | $scope.SetPICwindowStoreData(windowviewid, 'minimised',false); |
339 | 348 | $scope.SetPICwindowStoreData(windowviewid, 'maximised',false); |
340 | - var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
341 | - $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight-5); | |
342 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
349 | + var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height()-5; | |
350 | + var canvasDIvWidth = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
351 | + var canvasDiv='canvasDivPIC_' + windowviewid; | |
352 | + var canvasDraw='canvasPIC_' + windowviewid; | |
353 | + var canvasPaint='canvasPaintPIC_' + windowviewid; | |
354 | + var imgName='mypic_' + windowviewid; | |
355 | + | |
356 | + var isAutoCalled = $scope.GetPICwindowStoreData(windowviewid, 'minmaxAutoEvent'); | |
357 | + if(!isAutoCalled) | |
358 | + { | |
359 | + $rootScope.UnsaveCurriculum = true; | |
360 | + var oldleft= $rootScope.GetPICwindowData(windowviewid, 'imgLeft'); | |
361 | + var annotationData=$rootScope.GetPICwindowData(windowviewid,'annotationData'); | |
362 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight,canvasDIvWidth,annotationData); | |
363 | + var img = document.getElementById(imgName); | |
364 | + $rootScope.SetPICwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
365 | + } | |
343 | 366 | }, |
344 | 367 | resizable: { |
368 | + minWidth: 600, | |
369 | + minHeight: 500, | |
345 | 370 | stop: function (event, ui) { |
346 | 371 | var pnlName=event.currentTarget.id; |
347 | 372 | var len = (pnlName).split("_").length; |
348 | 373 | var windowviewid = (pnlName).split("_")[len - 1]; |
374 | + $rootScope.UnsaveCurriculum = true; | |
375 | + | |
376 | + var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
377 | + var canvasDIvWidth = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
378 | + | |
349 | 379 | $scope.SetPICwindowStoreData(windowviewid, 'width', ui.size.width); |
350 | - $scope.SetPICwindowStoreData(windowviewid, 'height', ui.size.height); | |
380 | + $scope.SetPICwindowStoreData(windowviewid, 'height',canvasDIvHeight); | |
351 | 381 | $scope.SetPICwindowStoreData(windowviewid, 'y', ui.position.top); |
352 | 382 | $scope.SetPICwindowStoreData(windowviewid, 'x', ui.position.left); |
353 | - $rootScope.UnsaveCurriculum = true; | |
354 | - var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
355 | - $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight-5); | |
356 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
383 | + | |
384 | + | |
385 | + var canvasDiv='canvasDivPIC_' + windowviewid; | |
386 | + var canvasDraw='canvasPIC_' + windowviewid; | |
387 | + var canvasPaint='canvasPaintPIC_' + windowviewid; | |
388 | + var imgName='mypic_' + windowviewid; | |
389 | + | |
390 | + var oldleft= $rootScope.GetPICwindowData(windowviewid, 'imgLeft'); | |
391 | + var annotationData=$rootScope.GetPICwindowData(windowviewid,'annotationData'); | |
392 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight-5,canvasDIvWidth,annotationData); | |
393 | + var img = document.getElementById(imgName); | |
394 | + $rootScope.SetPICwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
395 | + | |
357 | 396 | } |
358 | 397 | |
359 | 398 | }, |
... | ... | @@ -397,47 +436,42 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
397 | 436 | |
398 | 437 | $('.jsPanel-content .jsPanel-theme-success').css('overflow-y', 'auto !important') |
399 | 438 | |
400 | - var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
439 | + var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height()-5; | |
440 | + var canvasDIvWidth = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").width(); | |
401 | 441 | |
402 | - $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight-5); | |
403 | - var canvas = document.getElementById("canvasPIC_" + windowviewid); | |
404 | - var canvasPaint = document.getElementById("canvasPaintPIC_" + windowviewid); | |
405 | - | |
406 | - var $ua = navigator.userAgent; | |
407 | - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
408 | - canvas.width = screen.width-20; | |
409 | - canvasPaint.width = screen.width-20; | |
410 | - canvas.height = screen.height-130; | |
411 | - canvasPaint.height = screen.height-130; | |
412 | - } | |
413 | - else | |
414 | - { | |
415 | - canvas.height = screen.height-280; | |
416 | - canvasPaint.height = screen.height-280; | |
417 | - canvas.width = screen.width-40; | |
418 | - canvasPaint.width = screen.width-40; | |
419 | - | |
420 | - } | |
421 | - | |
422 | 442 | var openedImage = document.getElementById('mypic_' + windowviewid ); |
423 | 443 | openedImage.src = selectedpicture; |
424 | 444 | openedImage.onload = function () { |
445 | + var pnlName='picImagePanel_' + windowviewid; | |
446 | + var canvasDiv='canvasDivPIC_' + windowviewid; | |
447 | + var canvasDraw='canvasPIC_' + windowviewid; | |
448 | + var canvasPaint='canvasPaintPIC_' + windowviewid; | |
449 | + var imgName='mypic_' + windowviewid; | |
450 | + | |
451 | + var demoData= {shapeStates:[],paintCanvasState:""}; | |
452 | + var oldleft= $rootScope.GetPICwindowData(windowviewid, 'imgLeft'); | |
453 | + $rootScope.setIMGPanelCordinate(windowviewid,pnlName,canvasDiv,canvasDraw,canvasPaint,imgName,oldleft,canvasDIvHeight,canvasDIvWidth,demoData); | |
454 | + var img = document.getElementById(imgName); | |
455 | + $rootScope.SetPICwindowData(windowviewid, 'imgLeft',img.offsetLeft); | |
456 | + | |
425 | 457 | $scope.JsPanelclick(windowviewid); |
426 | - //some time get big size image | |
427 | - if(this.height>780) | |
428 | - { | |
429 | - canvas.height = this.height; | |
430 | - canvasPaint.height = this.height; | |
431 | - } | |
432 | - | |
458 | + | |
433 | 459 | var annotationData= $scope.picOpenInOtherModules.annotationData; |
434 | 460 | // load annotation |
435 | 461 | if(annotationData!="" && annotationData!=undefined) |
436 | 462 | { |
437 | 463 | if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) |
438 | 464 | { |
465 | + var modifiedData=$rootScope.resetAnnotationData(imgName,oldleft,annotationData); | |
466 | + if(modifiedData!="" && modifiedData!=undefined) | |
467 | + { | |
468 | + if(modifiedData.shapeStates.length>0||modifiedData.paintCanvasState.length>0) | |
469 | + { | |
470 | + annotationData=modifiedData; | |
471 | + } | |
472 | + } | |
439 | 473 | //first draw shape and then store in object |
440 | - $rootScope.LoadCBSavedAnnotation("canvasPIC_"+windowviewid,"canvasPaintPIC_"+windowviewid,annotationData); | |
474 | + $rootScope.LoadCBSavedAnnotation(canvasDraw,canvasPaint,annotationData); | |
441 | 475 | } |
442 | 476 | } |
443 | 477 | $scope.EnableUI(); | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -517,7 +517,7 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
517 | 517 | |
518 | 518 | $scope.SetAAwindowStoreData(windowviewid, 'maximised', isMaximize); |
519 | 519 | $scope.SetAAwindowStoreData(windowviewid, 'minimised', isMinimize); |
520 | - | |
520 | + | |
521 | 521 | // note:: in few json like "articulation" imageId as same id |
522 | 522 | // get wrong detail by imageId |
523 | 523 | //solution: use id to get imageid from js list |
... | ... | @@ -666,47 +666,77 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
666 | 666 | var pnlName=panel[0].id; |
667 | 667 | var len = (pnlName).split("_").length; |
668 | 668 | var windowviewid = (pnlName).split("_")[len - 1]; |
669 | - var isAutoCalled = $scope.GetAAwindowStoreData(windowviewid, 'minmaxAutoEvent'); | |
670 | - if(!isAutoCalled) | |
671 | - { | |
672 | - $rootScope.UnsaveCurriculum = true; | |
673 | - } | |
669 | + | |
674 | 670 | $scope.SetAAwindowStoreData(windowviewid, 'maximised',true); |
675 | 671 | $scope.SetAAwindowStoreData(windowviewid, 'minimised',false); |
676 | - var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; | |
677 | - $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight); | |
678 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
672 | + | |
673 | + var extraheight=$('#aastickeyarea').height()+15; | |
674 | + var extrawidth=$('.tools').width()+15; | |
675 | + var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; | |
676 | + var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; | |
677 | + var canvasDiv='canvasAADiv_' + windowviewid; | |
678 | + var canvasDraw='canvasAA_' + windowviewid; | |
679 | + var canvasPaint='canvasPaintAA_' + windowviewid; | |
680 | + | |
681 | + var isAutoCalled = $scope.GetAAwindowStoreData(windowviewid, 'minmaxAutoEvent'); | |
682 | + if(!isAutoCalled) | |
683 | + { | |
684 | + $rootScope.UnsaveCurriculum = true; | |
685 | + var annotationData=$rootScope.GetAAwindowData(windowviewid,'annotationData'); | |
686 | + $rootScope.setAADAPanelCordinate(windowviewid,0,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,annotationData); | |
687 | + } | |
679 | 688 | }, |
680 | 689 | onnormalized:function (panel) { |
681 | 690 | var pnlName=panel[0].id; |
682 | 691 | var len = (pnlName).split("_").length; |
683 | 692 | var windowviewid = (pnlName).split("_")[len - 1]; |
693 | + | |
694 | + $scope.SetAAwindowStoreData(windowviewid, 'minimised',false); | |
695 | + $scope.SetAAwindowStoreData(windowviewid, 'maximised',false); | |
696 | + | |
697 | + var extraheight=$('#aastickeyarea').height()+15; | |
698 | + var extrawidth=$('.tools').width()+15; | |
699 | + var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; | |
700 | + var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; | |
701 | + | |
702 | + var canvasDiv='canvasAADiv_' + windowviewid; | |
703 | + var canvasDraw='canvasAA_' + windowviewid; | |
704 | + var canvasPaint='canvasPaintAA_' + windowviewid; | |
705 | + | |
684 | 706 | var isAutoCalled = $scope.GetAAwindowStoreData(windowviewid, 'minmaxAutoEvent'); |
685 | 707 | if(!isAutoCalled) |
686 | 708 | { |
687 | - $rootScope.UnsaveCurriculum = true; | |
709 | + $rootScope.UnsaveCurriculum = true; | |
710 | + var annotationData=$rootScope.GetAAwindowData(windowviewid,'annotationData'); | |
711 | + $rootScope.setAADAPanelCordinate(windowviewid,0,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,annotationData); | |
688 | 712 | } |
689 | - $scope.SetAAwindowStoreData(windowviewid, 'minimised',false); | |
690 | - $scope.SetAAwindowStoreData(windowviewid, 'maximised',false); | |
691 | - var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; | |
692 | - $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight); | |
693 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
694 | 713 | }, |
695 | 714 | resizable: { |
715 | + minWidth: 600, | |
716 | + minHeight: 500, | |
696 | 717 | stop: function (event, ui) { |
697 | 718 | var pnlName=event.currentTarget.id; |
698 | 719 | var len = (pnlName).split("_").length; |
699 | 720 | var windowviewid = (pnlName).split("_")[len - 1]; |
721 | + | |
722 | + var extraheight=$('#aastickeyarea').height()+15; | |
723 | + var extrawidth=$('.tools').width()+15; | |
724 | + var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height(); | |
725 | + var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; | |
726 | + | |
700 | 727 | $scope.SetAAwindowStoreData(windowviewid, 'width', ui.size.width); |
701 | - $scope.SetAAwindowStoreData(windowviewid, 'height', ui.size.height); | |
728 | + $scope.SetAAwindowStoreData(windowviewid, 'height', canvasDIvHeight); | |
702 | 729 | $scope.SetAAwindowStoreData(windowviewid, 'y', ui.position.top); |
703 | 730 | $scope.SetAAwindowStoreData(windowviewid, 'x', ui.position.left); |
704 | 731 | $rootScope.UnsaveCurriculum = true; |
705 | - var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; | |
706 | - $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight); | |
707 | - $rootScope.resetMenuOptionOnClick(pnlName); | |
708 | - } | |
709 | - | |
732 | + | |
733 | + var canvasDiv='canvasAADiv_' + windowviewid; | |
734 | + var canvasDraw='canvasAA_' + windowviewid; | |
735 | + var canvasPaint='canvasPaintAA_' + windowviewid; | |
736 | + | |
737 | + var annotationData=$rootScope.GetAAwindowData(windowviewid,'annotationData'); | |
738 | + $rootScope.setAADAPanelCordinate(windowviewid,0,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight-extraheight,canvasDIvWidth,annotationData); | |
739 | + } | |
710 | 740 | }, |
711 | 741 | draggable: { |
712 | 742 | stop: function( event, ui ) { |
... | ... | @@ -786,16 +816,10 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
786 | 816 | |
787 | 817 | $scope.loadAAModule = function (windowviewid) { |
788 | 818 | |
789 | - if (!$rootScope.isCallFromOtherModule) { | |
790 | - // $('#aaBodyView').css("height", $(window).outerHeight() - 65); | |
791 | - // $('#aaBodyView').css("width", $(window).outerWidth() - 15); | |
792 | - $('#aaBodyView').css("height", $(window).innerHeight()-100); | |
793 | - $('#aaBodyView').css("width",$(window).innerWidth()-100); | |
794 | - } | |
795 | - | |
796 | - var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-50; | |
797 | - $('#canvasAADiv_' + windowviewid).css('height', canvasDIvHeight); | |
798 | - // $('.canvasDivClass').css("height", canvasDIvHeight); | |
819 | + var extraheight=$('#aastickeyarea').height()+15; | |
820 | + var extrawidth=$('.tools').width()+15; | |
821 | + var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; | |
822 | + var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; | |
799 | 823 | |
800 | 824 | $scope.convertToZoomValue(windowviewid); |
801 | 825 | |
... | ... | @@ -818,15 +842,23 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
818 | 842 | //0.5 create canvas on the top of image. |
819 | 843 | var canvas = document.createElement('canvas'); |
820 | 844 | canvas.id = 'aaDetailViewCanvas_'+windowviewid; |
821 | - canvas.className = '.aaCanvas' | |
822 | - canvas.height = screen.height<=768?screen.height: screen.height-300// parseInt(relativeHeight + 10); | |
823 | - canvas.width = screen.width<=1024?screen.width: screen.width-200//parseInt(relativeWidth + 10); | |
845 | + canvas.className = '.aaCanvas'; | |
846 | + canvas.height =parseInt(relativeHeight)+20; | |
847 | + canvas.width =parseInt(relativeWidth)+50; | |
824 | 848 | canvas.style.left = '0px'; |
825 | 849 | canvas.style.top = '0px'; |
826 | 850 | canvas.style.position = "absolute"; |
827 | 851 | canvas.style.zIndex = 12002; |
828 | 852 | $("#canvasAADiv_" + windowviewid).append(canvas); |
829 | - | |
853 | + | |
854 | + var pnlName='AAImagePanel_' + windowviewid; | |
855 | + var canvasDiv='canvasAADiv_' + windowviewid; | |
856 | + var canvasDraw='canvasAA_' + windowviewid; | |
857 | + var canvasPaint='canvasPaintAA_' + windowviewid; | |
858 | + | |
859 | + var demoData= {shapeStates:[],paintCanvasState:""}; | |
860 | + $rootScope.setAADAPanelCordinate(windowviewid,0,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,demoData); | |
861 | + | |
830 | 862 | $timeout(function () { |
831 | 863 | $scope.loadAllPinFirstTime(windowviewid); |
832 | 864 | //call time interval function until load pin data |
... | ... | @@ -841,27 +873,26 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
841 | 873 | $scope.stopIntervalAA(); |
842 | 874 | $scope.showAllPins(windowviewid); |
843 | 875 | $scope.Setslider(windowviewid); |
844 | - //7. Highlight all system body list in left side | |
845 | - $scope.highlightBodySystemList(windowviewid); | |
846 | - $scope.loadbtnNavigator(windowviewid); | |
847 | - $scope.JsPanelclick(windowviewid); | |
848 | - | |
849 | - if ($rootScope.isCallFromOtherModule) { | |
850 | - $scope.loadAAonCBData(windowviewid); | |
851 | - | |
852 | - //$rootScope.ShowAnnotationWindow(); //show tool if need | |
853 | - var annotationData= $scope.aaOpenInOtherModules.annotationData; | |
854 | - // load annotation | |
855 | - if(annotationData!="" && annotationData!=undefined) | |
876 | + //7. Highlight all system body list in left side | |
877 | + $scope.highlightBodySystemList(windowviewid); | |
878 | + $scope.loadbtnNavigator(windowviewid); | |
879 | + $scope.JsPanelclick(windowviewid); | |
880 | + | |
881 | + if ($rootScope.isCallFromOtherModule) { | |
882 | + $scope.loadAAonCBData(windowviewid); | |
883 | + | |
884 | + //$rootScope.ShowAnnotationWindow(); //show tool if need | |
885 | + var annotationData= $scope.aaOpenInOtherModules.annotationData; | |
886 | + // load annotation | |
887 | + if(annotationData!="" && annotationData!=undefined) | |
888 | + { | |
889 | + if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) | |
856 | 890 | { |
857 | - if(annotationData.shapeStates.length>0||annotationData.paintCanvasState.length>0) | |
858 | - { | |
859 | - //first draw shape and then store in object | |
860 | - $rootScope.LoadCBSavedAnnotation("canvasAA_"+windowviewid,"canvasPaintAA_"+windowviewid,annotationData); | |
861 | - } | |
862 | - } | |
891 | + //first draw shape and then store in object | |
892 | + $rootScope.LoadCBSavedAnnotation(canvasDraw,canvasPaint,annotationData); | |
893 | + } | |
863 | 894 | } |
864 | - | |
895 | + } | |
865 | 896 | } |
866 | 897 | else |
867 | 898 | { |
... | ... | @@ -1064,19 +1095,38 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou |
1064 | 1095 | |
1065 | 1096 | //get last zindex |
1066 | 1097 | var zindex= $("#aaDetailViewCanvas_"+windowviewid).css("z-index"); |
1067 | - $("#aaDetailViewCanvas_"+windowviewid).remove(); | |
1098 | + //remove all canvas | |
1099 | + $('#'+'canvasAADiv_' + windowviewid+' canvas').remove(); | |
1100 | + | |
1068 | 1101 | //0.5 create canvas on the top of image so that I can draw a line over the canvas. |
1069 | 1102 | var canvas = document.createElement('canvas'); |
1070 | 1103 | canvas.id = "aaDetailViewCanvas_"+windowviewid; |
1071 | 1104 | canvas.className = 'aaCanvas'; |
1072 | - canvas.height = screen.height<=768?screen.height: screen.height-300// parseInt(relativeHeight + 10); | |
1073 | - canvas.width = screen.width<=1024?screen.width: screen.width-200//parseInt(relativeWidth + 10); | |
1105 | + canvas.height =parseInt(relativeHeight)+20; | |
1106 | + canvas.width =parseInt(relativeWidth)+50; | |
1074 | 1107 | canvas.style.left = '0px'; |
1075 | 1108 | canvas.style.top = '0px'; |
1076 | 1109 | canvas.style.position = "absolute"; |
1077 | 1110 | canvas.style.zIndex = zindex; |
1078 | 1111 | |
1079 | 1112 | $("#canvasAADiv_" + windowviewid).append(canvas); |
1113 | + | |
1114 | + var pnlName='AAImagePanel_' + windowviewid; | |
1115 | + var canvasDiv='canvasAADiv_' + windowviewid; | |
1116 | + var canvasDraw='canvasAA_' + windowviewid; | |
1117 | + var canvasPaint='canvasPaintAA_' + windowviewid; | |
1118 | + $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); | |
1122 | + | |
1123 | + var extraheight=$('#aastickeyarea').height()+15; | |
1124 | + var extrawidth=$('.tools').width()+15; | |
1125 | + var canvasDIvHeight = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").height()-extraheight; | |
1126 | + var canvasDIvWidth = $('#AAImagePanel_' + windowviewid+ " .jsPanel-content").width()-extrawidth; | |
1127 | + | |
1128 | + var demoData= {shapeStates:[],paintCanvasState:""}; | |
1129 | + $rootScope.setAADAPanelCordinate(windowviewid,0,pnlName,canvasDiv,canvasDraw,canvasPaint,canvasDIvHeight,canvasDIvWidth,demoData); | |
1080 | 1130 | |
1081 | 1131 | $scope.SetAAwindowStoreData(windowviewid,'isSliderChange',true); |
1082 | 1132 | var toolbtnID = ''; | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/ModuleService.js
... | ... | @@ -176,7 +176,8 @@ AIA.service('ModuleService', function ($http, DataService) { |
176 | 176 | position: windowData.position, |
177 | 177 | size: windowData.size, |
178 | 178 | contextMenu: windowData.contextMenu, |
179 | - annotationData: windowData.annotationData | |
179 | + annotationData: windowData.annotationData, | |
180 | + imgLeft:windowData.imgLeft | |
180 | 181 | }); |
181 | 182 | } |
182 | 183 | else if (windowData.mType == "MY_ANIMATIONS") { |
... | ... | @@ -193,7 +194,7 @@ AIA.service('ModuleService', function ($http, DataService) { |
193 | 194 | id: windowData.id, |
194 | 195 | position: windowData.position, |
195 | 196 | size: windowData.size, |
196 | - contextMenu: windowData.contextMenu | |
197 | + contextMenu: windowData.contextMenu | |
197 | 198 | }); |
198 | 199 | } |
199 | 200 | else if (windowData.mType == "LAB_EXERCISE") { |
... | ... | @@ -243,7 +244,8 @@ AIA.service('ModuleService', function ($http, DataService) { |
243 | 244 | position: windowData.position, |
244 | 245 | size: windowData.size, |
245 | 246 | contextMenu: windowData.contextMenu, |
246 | - annotationData: windowData.annotationData | |
247 | + annotationData: windowData.annotationData, | |
248 | + imgLeft:windowData.imgLeft | |
247 | 249 | }); |
248 | 250 | } |
249 | 251 | else if (windowData.mType == "CLINICAL_ANIMATIONS") { |
... | ... | @@ -278,7 +280,8 @@ AIA.service('ModuleService', function ($http, DataService) { |
278 | 280 | position: windowData.position, |
279 | 281 | size: windowData.size, |
280 | 282 | contextMenu: windowData.contextMenu, |
281 | - annotationData: windowData.annotationData | |
283 | + annotationData: windowData.annotationData, | |
284 | + imgLeft:windowData.imgLeft | |
282 | 285 | }); |
283 | 286 | } |
284 | 287 | else if (windowData.mType == "ATLAS_ANATOMY") { |
... | ... | @@ -305,8 +308,7 @@ AIA.service('ModuleService', function ($http, DataService) { |
305 | 308 | size: windowData.size, |
306 | 309 | contextMenu: windowData.contextMenu, |
307 | 310 | showHideAnnotations: windowData.showHideAnnotations |
308 | - // selectedSearchId: windowData.selectedSearchId | |
309 | - | |
311 | + | |
310 | 312 | }); |
311 | 313 | } |
312 | 314 | else if (windowData.mType == "DISSECTIBLE_ANATOMY") { |
... | ... | @@ -354,7 +356,6 @@ AIA.service('ModuleService', function ($http, DataService) { |
354 | 356 | transparencyY: windowData.transparencyY, |
355 | 357 | layerNumberBeforeTBDraw: windowData.layerNumberBeforeTBDraw, |
356 | 358 | showHideAnnotations: windowData.showHideAnnotations |
357 | - | |
358 | 359 | }); |
359 | 360 | } |
360 | 361 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/lab-exercises-detail.html
1 | -<div class="" ng-controller="LabExercController" id="LabView" style="overflow: scroll;"> | |
1 | +<div class="" ng-controller="LabExercController" id="LabView" style=""> | |
2 | 2 | |
3 | 3 | <div id="labexmodalbackground" class="labExModalbackground"></div> |
4 | 4 | <!-- Lab Ex --> |
... | ... | @@ -119,109 +119,100 @@ |
119 | 119 | </div> |
120 | 120 | </div> |
121 | 121 | |
122 | - <div class="col-sm-12"> | |
123 | - | |
124 | - <div class="container-fluid"> | |
125 | - <div class="row"> | |
126 | - <div class="panel panel-default" id="questionHtml" style="margin-bottom:0;margin-top:10px"> | |
127 | - <div class="col-xs-12 panel-heading"> | |
128 | - <div class="col-xs-3" style="padding-left:5px;" id="activityTitle"> | |
129 | - </div> | |
130 | - <div class="col-xs-6 text-primary text-center" id="Title"></div> | |
131 | - <div class="text-right col-xs-3" style="padding-right:5px;"> | |
132 | - Question <strong id="quizNo"></strong> of <span id="totalquiz"></span> | |
133 | - </div> | |
122 | + <div class="container-fluid"> | |
123 | + <div class="row"> | |
124 | + <div class="panel panel-default" id="questionHtml" style="margin-bottom:0;margin-top:10px"> | |
125 | + <div class="col-xs-12 panel-heading"> | |
126 | + <div class="col-xs-3" style="padding-left:5px;" id="activityTitle"> | |
134 | 127 | </div> |
135 | - <div id="panelbodyDiv" class="panel-body" style="padding:2px;overflow:scroll"> | |
136 | - </div> | |
137 | - | |
138 | - <div class="panel-footer"> | |
139 | - <div class="pull-left"> | |
140 | - </div> | |
141 | - <div class="pull-right"> | |
142 | - <div class="btn-group pull-left marginR5"> | |
143 | - <button class="btn btn-sm btn-primary" style="display:none;" ng-click="SubmitAttempt($event)" id="quizSubmitBtn">Submit</button> | |
144 | - <button class="btn btn-sm btn-primary" style="display:none;" id="reportBtn" ng-click="ReportGen($event)">Report</button> | |
145 | - <button class="btn btn-sm btn-primary" id="saveBtn" ng-click="SaveAnswer($event)">Save</button> | |
146 | - <button class="btn btn-sm btn-primary" id="reviewBtn" ng-click="ReviewAttempt($event)">Review Your Attempt</button> | |
147 | - <button class="btn btn-sm btn-primary" id="resetBtn" ng-click="OnResetClick($event)">Reset</button> | |
148 | - </div> | |
149 | - <div class="btn-group"> | |
150 | - <button id="btnBackward" class="btn btn-sm btn-black" ng-click="prevQuiz($event)"><i id="btnBackwardIcon" class="fa fa-arrow-left"></i></button> | |
151 | - <button id="btnForward" class="btn btn-sm btn-black" ng-click="nextQuiz($event)"><i id="btnForwardIcon" class="fa fa-arrow-right"></i></button> | |
152 | - </div> | |
153 | - </div> | |
154 | - <div class="clearfix"></div> | |
128 | + <div class="col-xs-6 text-primary text-center" id="Title"></div> | |
129 | + <div class="text-right col-xs-3" style="padding-right:5px;"> | |
130 | + Question <strong id="quizNo"></strong> of <span id="totalquiz"></span> | |
155 | 131 | </div> |
156 | 132 | </div> |
157 | - </div> | |
158 | - | |
159 | - | |
160 | - <div class="panel panel-default" id="submitResultHtml" style="display:none;"> | |
161 | - <div class="panel-heading"> | |
162 | - <div class="row"> | |
163 | - <div class="col-sm-4 text-left"><strong id="reporttitle"></strong></div> | |
164 | - <div class="col-sm-4 text-center">Performance Report</div> | |
165 | - <div class="col-sm-4 text-right">Score:<span id="scoreResult"></span>% </div> | |
166 | - </div> | |
133 | + <div id="panelbodyDiv" class="panel-body" style="padding:2px;overflow:scroll"> | |
167 | 134 | </div> |
168 | - <div class="panel-body no-padding"> | |
169 | - <div class="row"> | |
170 | - <div class="col-sm-12 table-responsive "> | |
171 | - <table class="table table-hover table-condensed bg-white" id="questionStatus"> | |
172 | - <thead> | |
173 | - <tr class="active"> | |
174 | - <th class="text-center">Total Question</th> | |
175 | - <th class="text-center">Correct Answers</th> | |
176 | - <th class="text-center">Incorrect Answers</th> | |
177 | - </tr> | |
178 | - </thead> | |
179 | - <tbody> | |
180 | - <tr class="text-center"> | |
181 | - <td id="tdTotalQuiz"></td> | |
182 | - <td id="tdCorrectAnswer"></td> | |
183 | - <td id="tdinCorrectAnswer"></td> | |
184 | - </tr> | |
185 | - </tbody> | |
186 | - </table> | |
187 | 135 | |
136 | + <div class="panel-footer"> | |
137 | + <div class="pull-left"> | |
138 | + </div> | |
139 | + <div class="pull-right"> | |
140 | + <div class="btn-group pull-left marginR5"> | |
141 | + <button class="btn btn-sm btn-primary" style="display:none;" ng-click="SubmitAttempt($event)" id="quizSubmitBtn">Submit</button> | |
142 | + <button class="btn btn-sm btn-primary" style="display:none;" id="reportBtn" ng-click="ReportGen($event)">Report</button> | |
143 | + <button class="btn btn-sm btn-primary" id="saveBtn" ng-click="SaveAnswer($event)">Save</button> | |
144 | + <button class="btn btn-sm btn-primary" id="reviewBtn" ng-click="ReviewAttempt($event)">Review Your Attempt</button> | |
145 | + <button class="btn btn-sm btn-primary" id="resetBtn" ng-click="OnResetClick($event)">Reset</button> | |
188 | 146 | </div> |
189 | - <div class="col-sm-12 table-responsive"> | |
190 | - <table class="table table-hover table-condensed bg-white"> | |
191 | - <thead> | |
192 | - <tr class="active"> | |
193 | - <th>Question</th> | |
194 | - <th>Activity Title</th> | |
195 | - <th>Status</th> | |
196 | - <th>Action</th> | |
197 | - </tr> | |
198 | - </thead> | |
199 | - <tbody id="resultLabData"></tbody> | |
200 | - </table> | |
147 | + <div class="btn-group"> | |
148 | + <button id="btnBackward" class="btn btn-sm btn-black" ng-click="prevQuiz($event)"><i id="btnBackwardIcon" class="fa fa-arrow-left"></i></button> | |
149 | + <button id="btnForward" class="btn btn-sm btn-black" ng-click="nextQuiz($event)"><i id="btnForwardIcon" class="fa fa-arrow-right"></i></button> | |
201 | 150 | </div> |
202 | 151 | </div> |
203 | - </div> | |
204 | - <div class="panel-footer"> | |
205 | - <div class="text-center"> | |
206 | - <button class="btn btn-sm btn-primary" id="btnSendMail" ng-click="sendMail($event)"> | |
207 | ||
208 | - </button> | |
209 | - <button class="btn btn-sm btn-primary" id="btnReportClose" ng-click="CloseReport($event)"> | |
210 | - Close | |
211 | - </button> | |
212 | - | |
213 | - </div> | |
214 | 152 | <div class="clearfix"></div> |
215 | 153 | </div> |
216 | - | |
217 | 154 | </div> |
155 | + </div> | |
156 | + </div> | |
218 | 157 | |
158 | + <div class="panel panel-default" id="submitResultHtml" style="display:none;"> | |
159 | + <div class="panel-heading"> | |
160 | + <div class="row"> | |
161 | + <div class="col-sm-4 text-left"><strong id="reporttitle"></strong></div> | |
162 | + <div class="col-sm-4 text-center">Performance Report</div> | |
163 | + <div class="col-sm-4 text-right">Score:<span id="scoreResult"></span>% </div> | |
164 | + </div> | |
165 | + </div> | |
166 | + <div class="panel-body no-padding" id="resultbodyDiv" style="overflow-x: hidden;"> | |
167 | + <div class="row"> | |
168 | + <div class="col-sm-12 table-responsive "> | |
169 | + <table class="table table-hover table-condensed bg-white" id="questionStatus"> | |
170 | + <thead> | |
171 | + <tr class="active"> | |
172 | + <th class="text-center">Total Question</th> | |
173 | + <th class="text-center">Correct Answers</th> | |
174 | + <th class="text-center">Incorrect Answers</th> | |
175 | + </tr> | |
176 | + </thead> | |
177 | + <tbody> | |
178 | + <tr class="text-center"> | |
179 | + <td id="tdTotalQuiz"></td> | |
180 | + <td id="tdCorrectAnswer"></td> | |
181 | + <td id="tdinCorrectAnswer"></td> | |
182 | + </tr> | |
183 | + </tbody> | |
184 | + </table> | |
219 | 185 | |
186 | + </div> | |
187 | + <div class="col-sm-12 table-responsive"> | |
188 | + <table class="table table-hover table-condensed bg-white"> | |
189 | + <thead> | |
190 | + <tr class="active"> | |
191 | + <th>Question</th> | |
192 | + <th>Activity Title</th> | |
193 | + <th>Status</th> | |
194 | + <th>Action</th> | |
195 | + </tr> | |
196 | + </thead> | |
197 | + <tbody id="resultLabData"></tbody> | |
198 | + </table> | |
199 | + </div> | |
200 | + </div> | |
220 | 201 | </div> |
221 | - </div> | |
222 | - <!--</div>--> | |
202 | + <div class="panel-footer"> | |
203 | + <div class="text-center"> | |
204 | + <button class="btn btn-sm btn-primary" id="btnSendMail" ng-click="sendMail($event)"> | |
205 | ||
206 | + </button> | |
207 | + <button class="btn btn-sm btn-primary" id="btnReportClose" ng-click="CloseReport($event)"> | |
208 | + Close | |
209 | + </button> | |
223 | 210 | |
211 | + </div> | |
212 | + <div class="clearfix"></div> | |
213 | + </div> | |
224 | 214 | |
215 | + </div> | |
225 | 216 | |
226 | 217 | </div> |
227 | 218 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
... | ... | @@ -101,7 +101,7 @@ |
101 | 101 | </div> |
102 | 102 | |
103 | 103 | <div class="main2"> |
104 | - <div class="stickey-area" style="margin-left:7px"> | |
104 | + <div class="stickey-area" id="aastickeyarea" style="margin-left:7px"> | |
105 | 105 | <div class="breadcrumb"> |
106 | 106 | <div class=""> |
107 | 107 | <div class="input-group col-sm-8 col-xs-7 col-md-8 pull-left"> |
... | ... | @@ -145,8 +145,8 @@ |
145 | 145 | <div class="row"> |
146 | 146 | |
147 | 147 | <div class="img-thumbnail" id="canvasDiv" style="overflow: scroll;width:100%;position:relative"> |
148 | - <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="1024" class="canvas-annotationStyle1"></canvas> | |
149 | - <canvas id="canvas" width="2277" height="1024" class="canvas-annotationStyle"></canvas> | |
148 | + <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="1024" class="canvas-annotationStyle1" style="left:0px;position:absolute"></canvas> | |
149 | + <canvas id="canvas" width="2277" height="1024" class="canvas-annotationStyle" style="left:0px;position:absolute"></canvas> | |
150 | 150 | |
151 | 151 | <img id="modItemImage" alt="" title="" style="left:0px;top:0px;position:absolute"> |
152 | 152 | </div> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -231,7 +231,7 @@ |
231 | 231 | </div> |
232 | 232 | |
233 | 233 | <div class="main2"> |
234 | - <div class="stickey-area" style="margin-left:7px"> | |
234 | + <div class="stickey-area" id="dastickeyarea" style="margin-left:7px"> | |
235 | 235 | <div class="breadcrumb " style="margin-bottom:0px"> |
236 | 236 | <div class=""> |
237 | 237 | <div class="input-group col-sm-6 col-xs-7 col-md-7 pull-left" id="da-input"> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/content/images/mult-annotation.png
0 → 100644
566 Bytes
400-SOURCECODE/AIAHTML5.Web/libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js
... | ... | @@ -1061,7 +1061,8 @@ var jsPanel = { |
1061 | 1061 | |
1062 | 1062 | panel.css({ |
1063 | 1063 | width: panel.option.size.width, |
1064 | - height: currentController == 'CIController' ? parseInt(panel.option.size.height, 10) : currentController == 'CAController' ? parseInt(panel.option.size.height, 10) : parseInt(panel.option.size.height, 10) + 35, | |
1064 | + height:panel.option.size.height, | |
1065 | + //height: currentController == 'CIController' ? parseInt(panel.option.size.height, 10) : currentController == 'CAController' ? parseInt(panel.option.size.height, 10) : parseInt(panel.option.size.height, 10) + 35, | |
1065 | 1066 | top: panelTop, |
1066 | 1067 | left: panel.option.position.left |
1067 | 1068 | }); | ... | ... |