Commit dec151af0325bc9f4179c49ab0d1fb560f92c7c7
1 parent
4e9c73f6
merged AAATbar.
Showing
4 changed files
with
142 additions
and
124 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -357,6 +357,95 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -357,6 +357,95 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
357 | 357 | ||
358 | // var ajaxResult = []; | 358 | // var ajaxResult = []; |
359 | // var ajaxResult1 = []; | 359 | // var ajaxResult1 = []; |
360 | + | ||
361 | + function onBrushSizeChange() { | ||
362 | + $('.btnCursor').addClass('activebtncolor'); | ||
363 | + $(".btn-annotation").removeClass("activebtncolor"); | ||
364 | + $(".btn-annotation-erase").removeClass("activebtncolor"); | ||
365 | + $(".btn-annotation-erase").removeClass("activebtncolor"); | ||
366 | + $(".annotationpaintbrushsize").removeClass("activebtncolor"); | ||
367 | + var x = $('#canvasPaint').css("z-index"); | ||
368 | + | ||
369 | + var y = $('#canvas').css("z-index"); | ||
370 | + if (x > y) { | ||
371 | + y = parseInt(x) + 1; | ||
372 | + } else { | ||
373 | + y = parseInt(y) + 1; | ||
374 | + } | ||
375 | + $('#canvas').css("z-index", y); | ||
376 | + } | ||
377 | + | ||
378 | + $("#slider-range-min-2").slider({ | ||
379 | + range: "min", | ||
380 | + min: 1, | ||
381 | + max: 60, | ||
382 | + value: 1, | ||
383 | + slide: function (event, ui) { | ||
384 | + | ||
385 | + onBrushSizeChange(); | ||
386 | + console.log("sliding"); | ||
387 | + $("#btnBrushSize").val(ui.value); | ||
388 | + | ||
389 | + }, | ||
390 | + stop: function (event, ui) { | ||
391 | + | ||
392 | + $("#paintLine").attr("data-size", ui.value); | ||
393 | + | ||
394 | + } | ||
395 | + | ||
396 | + }); | ||
397 | + | ||
398 | + | ||
399 | + $("#btnBrushSize").keydown(function () { | ||
400 | + onBrushSizeChange(); | ||
401 | + var brushSizevalue = this.value; | ||
402 | + $("#slider-range-min-2").slider("value", parseInt(brushSizevalue)); | ||
403 | + }); | ||
404 | + $("#btnBrushSize").keyup(function () { | ||
405 | + onBrushSizeChange(); | ||
406 | + var brushSizevalue = this.value; | ||
407 | + $("#slider-range-min-2").slider("value", parseInt(brushSizevalue)); | ||
408 | + }); | ||
409 | + $("#btnBrushSizeIncrement").click(function () { | ||
410 | + onBrushSizeChange(); | ||
411 | + var brushIncrementVar = $("#btnBrushSize").val(); | ||
412 | + if (brushIncrementVar >= 60) { | ||
413 | + $("#slider-range-min-2").slider("value", 60); | ||
414 | + } | ||
415 | + else if (brushIncrementVar == "") { | ||
416 | + var brushIncrementedValue = 1; | ||
417 | + $("#btnBrushSize").val(brushIncrementedValue); | ||
418 | + $("#slider-range-min-2").slider("value", parseInt(brushIncrementedValue)); | ||
419 | + } | ||
420 | + else { | ||
421 | + var brushIncrementedValue = parseInt(brushIncrementVar) + 1; | ||
422 | + $("#btnBrushSize").val(brushIncrementedValue); | ||
423 | + $("#slider-range-min-2").slider("value", parseInt(brushIncrementedValue)); | ||
424 | + } | ||
425 | + }); | ||
426 | + $("#btnBrushSizeDecrease").click(function () { | ||
427 | + onBrushSizeChange(); | ||
428 | + var brushDecreaseVar = $("#btnBrushSize").val(); | ||
429 | + if (brushDecreaseVar == "") { | ||
430 | + var brushDecrementedValue = 1; | ||
431 | + $("#btnBrushSize").val(brushDecrementedValue); | ||
432 | + $("#slider-range-min-2").slider("value", parseInt(brushDecrementedValue)); | ||
433 | + } | ||
434 | + else if (brushDecreaseVar <= 1) { | ||
435 | + $("#slider-range-min-2").slider("value", 1); | ||
436 | + } | ||
437 | + else { | ||
438 | + var brushDecrementedValue = parseInt(brushDecreaseVar) - 1; | ||
439 | + $("#btnBrushSize").val(brushDecrementedValue); | ||
440 | + $("#slider-range-min-2").slider("value", parseInt(brushDecrementedValue)); | ||
441 | + } | ||
442 | + }); | ||
443 | + | ||
444 | + $("#btnBrushSize").val($("#slider-range-min-2").slider("value")); | ||
445 | + | ||
446 | + | ||
447 | + // annotation slider ends | ||
448 | + | ||
360 | $rootScope.isLexiconTabClicked = true; | 449 | $rootScope.isLexiconTabClicked = true; |
361 | $rootScope.lexiconData = function () { | 450 | $rootScope.lexiconData = function () { |
362 | if ($rootScope.isLexiconTabClicked == true) { | 451 | if ($rootScope.isLexiconTabClicked == true) { |
@@ -531,6 +620,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | @@ -531,6 +620,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic | ||
531 | $("#annotationToolBarOptions").removeClass("disableSubMenu"); | 620 | $("#annotationToolBarOptions").removeClass("disableSubMenu"); |
532 | $rootScope.disableFileMenu = " "; | 621 | $rootScope.disableFileMenu = " "; |
533 | } | 622 | } |
623 | + else if ($location.url() == "/module-item-view") { | ||
624 | + $rootScope.disableMenuannotation = " "; | ||
625 | + $rootScope.disableMenuoption = " "; | ||
626 | + $rootScope.disableSubMenu = "disableSubMenu"; | ||
627 | + $("#annotationToolBarOptions").removeClass("disableSubMenu"); | ||
628 | + $rootScope.disableFileMenu = " "; | ||
629 | + } | ||
630 | + | ||
534 | else if ($location.url() == "/clinical-animations-detail") { | 631 | else if ($location.url() == "/clinical-animations-detail") { |
535 | $rootScope.disableMenuannotation = "disableMenuannotation"; | 632 | $rootScope.disableMenuannotation = "disableMenuannotation"; |
536 | $rootScope.disableMenuoption = " "; | 633 | $rootScope.disableMenuoption = " "; |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -155,7 +155,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -155,7 +155,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
155 | canvas.style.top = '0px'; | 155 | canvas.style.top = '0px'; |
156 | canvas.style.position = "absolute"; | 156 | canvas.style.position = "absolute"; |
157 | 157 | ||
158 | - $("#imageDiv").append(canvas); | 158 | + $("#canvasDiv").append(canvas); |
159 | $scope.context = canvas.getContext("2d") | 159 | $scope.context = canvas.getContext("2d") |
160 | 160 | ||
161 | //6. Show all pins on AA opened item | 161 | //6. Show all pins on AA opened item |
@@ -197,8 +197,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -197,8 +197,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
197 | 197 | ||
198 | angular.element(document).ready(function (e) { | 198 | angular.element(document).ready(function (e) { |
199 | $("#ImagePanel").resize(function () { | 199 | $("#ImagePanel").resize(function () { |
200 | - $("#imageDiv").scrollLeft($rootScope.CanvasDivLeftPosition); | ||
201 | - $("#imageDiv").scrollTop($rootScope.CanvasDivTopPosition); | 200 | + $("#canvasDiv").scrollLeft($rootScope.CanvasDivLeftPosition); |
201 | + $("#canvasDiv").scrollTop($rootScope.CanvasDivTopPosition); | ||
202 | }); | 202 | }); |
203 | 203 | ||
204 | }) | 204 | }) |
@@ -610,7 +610,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -610,7 +610,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
610 | $("#dot").css("visibility", "hidden"); | 610 | $("#dot").css("visibility", "hidden"); |
611 | var verticalScrollPosition = canvasDiv.scrollTop; | 611 | var verticalScrollPosition = canvasDiv.scrollTop; |
612 | var horizontlScrollPosition = canvasDiv.scrollLeft; | 612 | var horizontlScrollPosition = canvasDiv.scrollLeft; |
613 | - $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#imageDiv').offset().left, evt.pageY + verticalScrollPosition - $('#imageDiv').offset().top, true); | 613 | + $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
614 | }, | 614 | }, |
615 | }); | 615 | }); |
616 | 616 | ||
@@ -634,7 +634,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -634,7 +634,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
634 | if (MultipleLanguage == undefined) { | 634 | if (MultipleLanguage == undefined) { |
635 | console.log("No text is found"); | 635 | console.log("No text is found"); |
636 | } else { | 636 | } else { |
637 | - $('#imageDiv').append(speechBubbleHTML); | 637 | + $('#canvasDiv').append(speechBubbleHTML); |
638 | 638 | ||
639 | if ($scope.MultiLanguageAnnationArray.length > 0) { | 639 | if ($scope.MultiLanguageAnnationArray.length > 0) { |
640 | for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { | 640 | for (var i = 0; i <= $scope.MultiLanguageAnnationArray.length - 1; i++) { |
@@ -709,8 +709,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -709,8 +709,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
709 | 709 | ||
710 | drag: function (evt) { | 710 | drag: function (evt) { |
711 | 711 | ||
712 | - var verticalScrollPosition = document.getElementById('imageDiv').scrollTop; | ||
713 | - var horizontlScrollPosition = document.getElementById('imageDiv').scrollLeft; | 712 | + var verticalScrollPosition = document.getElementById('canvasDiv').scrollTop; |
713 | + var horizontlScrollPosition = document.getElementById('canvasDiv').scrollLeft; | ||
714 | var clickedSpeechBubbleId = $(this).attr("id"); | 714 | var clickedSpeechBubbleId = $(this).attr("id"); |
715 | 715 | ||
716 | var clickedPinId = clickedSpeechBubbleId.substring(12, clickedSpeechBubbleId.length); | 716 | var clickedPinId = clickedSpeechBubbleId.substring(12, clickedSpeechBubbleId.length); |
@@ -720,7 +720,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -720,7 +720,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
720 | 720 | ||
721 | for (var i = 0; i <= $rootScope.speechBubbleDimaensions.length - 1; i++) { | 721 | for (var i = 0; i <= $rootScope.speechBubbleDimaensions.length - 1; i++) { |
722 | if ($rootScope.speechBubbleDimaensions[i].id == clickedPinId) { | 722 | if ($rootScope.speechBubbleDimaensions[i].id == clickedPinId) { |
723 | - $scope.angle(clickedPinId, $rootScope.speechBubbleDimaensions[i].currentX, $rootScope.speechBubbleDimaensions[i].currentY, evt.pageX + horizontlScrollPosition - $('#imageDiv').offset().left, evt.pageY + verticalScrollPosition - $('#imageDiv').offset().top, true); | 723 | + $scope.angle(clickedPinId, $rootScope.speechBubbleDimaensions[i].currentX, $rootScope.speechBubbleDimaensions[i].currentY, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, true); |
724 | } | 724 | } |
725 | } | 725 | } |
726 | 726 | ||
@@ -879,6 +879,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | @@ -879,6 +879,18 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo | ||
879 | 879 | ||
880 | $scope.removeSpeechBubble(); | 880 | $scope.removeSpeechBubble(); |
881 | } | 881 | } |
882 | + | ||
883 | + $rootScope.$on('annotationToolEvent', function (event, data) { | ||
884 | + $('#editstylebackgroundcolor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(255,255,255)") | ||
885 | + $('#editstylebackgroundcolor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" }); | ||
886 | + $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color", "rgb(0,0,0)") | ||
887 | + $('#outlineColor .minicolors >.minicolors-panel > .minicolors-grid >.minicolors-picker').css({ "top": "145px", "left": "4px" }); | ||
888 | + | ||
889 | + $("#canvas").css("display", "block"); | ||
890 | + $("#canvasPaint").css("display", "block"); | ||
891 | + $rootScope.onDrawingCanvasClick(); | ||
892 | + $rootScope.FreeStylePaint(); | ||
893 | + }); | ||
882 | }]); | 894 | }]); |
883 | 895 | ||
884 | function showSelectedSystemPins(event) { | 896 | function showSelectedSystemPins(event) { |
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
1 | -๏ปฟ | 1 | +๏ปฟ<style> |
2 | + .canvas-annotationStyle { | ||
3 | + display: none; | ||
4 | + background-color: transparent; | ||
5 | + z-index: 12000; | ||
6 | + position: absolute; | ||
7 | + left: 0; | ||
8 | + right: 0; | ||
9 | + } | ||
10 | + | ||
11 | + .canvas-annotationStyle1 { | ||
12 | + display: none; | ||
13 | + background-color: transparent; | ||
14 | + z-index: 12000; | ||
15 | + position: absolute; | ||
16 | + left: 0; | ||
17 | + right: 0; | ||
18 | + } | ||
19 | +</style> | ||
2 | <div id="aaDetailPageDiv" class="bodyWrap row" ng-controller="TileViewListController"> | 20 | <div id="aaDetailPageDiv" class="bodyWrap row" ng-controller="TileViewListController"> |
3 | 21 | ||
4 | <!--<div class="col-sm-12 pageHeading"> | 22 | <!--<div class="col-sm-12 pageHeading"> |
@@ -89,9 +107,13 @@ | @@ -89,9 +107,13 @@ | ||
89 | <div class="container-fluid"> | 107 | <div class="container-fluid"> |
90 | <div class="row"> | 108 | <div class="row"> |
91 | 109 | ||
92 | - <div class=" col-sm-12 img-thumbnail" id="imageDiv" style="height: 478px; overflow: scroll;"> | 110 | + <div class=" col-sm-12 img-thumbnail" id="canvasDiv" style="height: 478px; overflow: scroll;"> |
111 | + <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="3248" class="canvas-annotationStyle1"></canvas> | ||
112 | + <canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas> | ||
113 | + | ||
93 | <img id="modItemImage" alt="" title="" style="left:0px;top:0px;position:absolute"> | 114 | <img id="modItemImage" alt="" title="" style="left:0px;top:0px;position:absolute"> |
94 | <!--<div class="clearfix"> | 115 | <!--<div class="clearfix"> |
116 | + | ||
95 | <img id="modItemImage" ng-init="alert('hi')" alt="" title="" class="img-responsive"> | 117 | <img id="modItemImage" ng-init="alert('hi')" alt="" title="" class="img-responsive"> |
96 | </div> | 118 | </div> |
97 | <!--<div class="col-sm-1 img-thumbnail pull-right" align="center"><img src="../../content/images/1000x600.jpg" alt="" title="" class="img-responsive"></div> | 119 | <!--<div class="col-sm-1 img-thumbnail pull-right" align="center"><img src="../../content/images/1000x600.jpg" alt="" title="" class="img-responsive"></div> |
@@ -111,21 +133,6 @@ | @@ -111,21 +133,6 @@ | ||
111 | $(".stickey-area").sticky(); | 133 | $(".stickey-area").sticky(); |
112 | }); | 134 | }); |
113 | </script> | 135 | </script> |
114 | -<script> | ||
115 | - $(function () { | ||
116 | - $("#slider-range-min-2").slider({ | ||
117 | - range: "min", | ||
118 | - min: 1, | ||
119 | - max: 60, | ||
120 | - value: 10, | ||
121 | - slide: function (event, ui) { | ||
122 | - $("#amount-2").val(ui.value); | ||
123 | - } | ||
124 | - }); | ||
125 | - $("#amount-2").val($("#slider-vertical-2").slider("value")); | ||
126 | - | ||
127 | - }); | ||
128 | -</script> | ||
129 | 136 | ||
130 | <script> | 137 | <script> |
131 | $(document).ready(function () { | 138 | $(document).ready(function () { |
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -1451,109 +1451,11 @@ | @@ -1451,109 +1451,11 @@ | ||
1451 | </script>--> | 1451 | </script>--> |
1452 | 1452 | ||
1453 | <script> | 1453 | <script> |
1454 | - function onBrushSizeChange() { | ||
1455 | - $('.btnCursor').addClass('activebtncolor'); | ||
1456 | - $(".btn-annotation").removeClass("activebtncolor"); | ||
1457 | - $(".btn-annotation-erase").removeClass("activebtncolor"); | ||
1458 | - $(".btn-annotation-erase").removeClass("activebtncolor"); | ||
1459 | - $(".annotationpaintbrushsize").removeClass("activebtncolor"); | ||
1460 | - var x = $('#canvasPaint').css("z-index"); | ||
1461 | - | ||
1462 | - var y = $('#canvas').css("z-index"); | ||
1463 | - if (x > y) { | ||
1464 | - y = parseInt(x) + 1; | ||
1465 | - } else { | ||
1466 | - y = parseInt(y) + 1; | ||
1467 | - } | ||
1468 | - $('#canvas').css("z-index", y); | ||
1469 | - } | ||
1470 | - $(function () { | ||
1471 | - $("#slider-range-min-2").slider({ | ||
1472 | - range: "min", | ||
1473 | - min: 1, | ||
1474 | - max: 60, | ||
1475 | - value: 1, | ||
1476 | - slide: function (event, ui) { | ||
1477 | - onBrushSizeChange(); | ||
1478 | - $("#btnBrushSize").val(ui.value); | ||
1479 | - | ||
1480 | - }, | ||
1481 | - stop: function (event, ui) { | ||
1482 | - | ||
1483 | - $("#paintLine").attr("data-size", ui.value); | ||
1484 | - | ||
1485 | - } | ||
1486 | - | ||
1487 | - }); | ||
1488 | - | ||
1489 | - | ||
1490 | - $("#btnBrushSize").keydown(function () { | ||
1491 | - onBrushSizeChange(); | ||
1492 | - var brushSizevalue = this.value; | ||
1493 | - $("#slider-range-min-2").slider("value", parseInt(brushSizevalue)); | ||
1494 | - }); | ||
1495 | - $("#btnBrushSize").keyup(function () { | ||
1496 | - onBrushSizeChange(); | ||
1497 | - var brushSizevalue = this.value; | ||
1498 | - $("#slider-range-min-2").slider("value", parseInt(brushSizevalue)); | ||
1499 | - }); | ||
1500 | - $("#btnBrushSizeIncrement").click(function () { | ||
1501 | - onBrushSizeChange(); | ||
1502 | - var brushIncrementVar = $("#btnBrushSize").val(); | ||
1503 | - if (brushIncrementVar >= 60) { | ||
1504 | - $("#slider-range-min-2").slider("value", 60); | ||
1505 | - } | ||
1506 | - else if (brushIncrementVar == "") { | ||
1507 | - var brushIncrementedValue = 1; | ||
1508 | - $("#btnBrushSize").val(brushIncrementedValue); | ||
1509 | - $("#slider-range-min-2").slider("value", parseInt(brushIncrementedValue)); | ||
1510 | - } | ||
1511 | - else { | ||
1512 | - var brushIncrementedValue = parseInt(brushIncrementVar) + 1; | ||
1513 | - $("#btnBrushSize").val(brushIncrementedValue); | ||
1514 | - $("#slider-range-min-2").slider("value", parseInt(brushIncrementedValue)); | ||
1515 | - } | ||
1516 | - }); | ||
1517 | - $("#btnBrushSizeDecrease").click(function () { | ||
1518 | - onBrushSizeChange(); | ||
1519 | - var brushDecreaseVar = $("#btnBrushSize").val(); | ||
1520 | - if (brushDecreaseVar == "") { | ||
1521 | - var brushDecrementedValue = 1; | ||
1522 | - $("#btnBrushSize").val(brushDecrementedValue); | ||
1523 | - $("#slider-range-min-2").slider("value", parseInt(brushDecrementedValue)); | ||
1524 | - } | ||
1525 | - else if (brushDecreaseVar <= 1) { | ||
1526 | - $("#slider-range-min-2").slider("value", 1); | ||
1527 | - } | ||
1528 | - else { | ||
1529 | - var brushDecrementedValue = parseInt(brushDecreaseVar) - 1; | ||
1530 | - $("#btnBrushSize").val(brushDecrementedValue); | ||
1531 | - $("#slider-range-min-2").slider("value", parseInt(brushDecrementedValue)); | ||
1532 | - } | ||
1533 | - }); | ||
1534 | - | ||
1535 | - $("#btnBrushSize").val($("#slider-range-min-2").slider("value")); | ||
1536 | - | ||
1537 | - | ||
1538 | - | ||
1539 | - | ||
1540 | - | ||
1541 | - //$("#slider-range-min-2").on("slidestart", function (event, ui) { | ||
1542 | - | ||
1543 | - // $('.btnCursor').trigger('click'); | ||
1544 | - // $(".btn-annotation").removeClass("activebtncolor"); | ||
1545 | - // $('.btnCursor').addClass('activebtncolor'); | ||
1546 | - // // ctx.clearRect(0, 0, canvasPaint.width, canvasPaint.height); | ||
1547 | - | ||
1548 | - | ||
1549 | - //}); | ||
1550 | - // $("#slider-range-min-2").on("slidechange", function (event, ui) { alert("ssasa"); }); | ||
1551 | - | ||
1552 | 1454 | ||
1553 | $(function () { | 1455 | $(function () { |
1554 | $('[data-toggle="tooltip"]').tooltip(); | 1456 | $('[data-toggle="tooltip"]').tooltip(); |
1555 | }) | 1457 | }) |
1556 | - }); | 1458 | + |
1557 | </script> | 1459 | </script> |
1558 | <script> | 1460 | <script> |
1559 | (function ($) { | 1461 | (function ($) { |