Commit f2bc655871ae28a9a43abe953ac05906a5272829
against Merge Request #742
Showing
2 changed files
with
118 additions
and
6 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -635,6 +635,73 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
635 | 635 | $("#layerChangeSlider").css("pointer-events", "auto"); |
636 | 636 | } |
637 | 637 | |
638 | + | |
639 | + //to get slider working on ipad | |
640 | + var $ua = navigator.userAgent; | |
641 | + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
642 | + $("#layerChangeSlider").css("pointer-events", "auto"); | |
643 | + // on identity mode click | |
644 | + $("#btnZoom").removeAttr("onclick"); | |
645 | + $("#btnZoom").on("touchstart", function () { | |
646 | + if ($(".btn-annotation").hasClass("activebtncolor")) //Bug #14928 | |
647 | + $(".btn-annotation").removeClass("activebtncolor"); | |
648 | + //Dissectible Anatomy > Extract and Annotations displays apart on the page after click on Zoom-in. | |
649 | + $(".com").remove(); | |
650 | + $("#bord").remove(); | |
651 | + console.log('OnZoom is called outside '); | |
652 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
653 | + scope.$apply(function () { | |
654 | + scope.enableZoom(); | |
655 | + }); | |
656 | + }); | |
657 | + // on transparency mode click | |
658 | + $("#btnTranparency").removeAttr("onclick"); | |
659 | + $("#btnTranparency").on("touchstart", function () { | |
660 | + console.log('OnEnableExtract is called outside '); | |
661 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
662 | + scope.$apply(function () { | |
663 | + scope.createTransparencyBox('true'); | |
664 | + }); | |
665 | + }); | |
666 | + // on normal mode click | |
667 | + $("#btnNormalMode").removeAttr("onclick"); | |
668 | + $("#btnNormalMode").on("touchstart", function () { | |
669 | + console.log('OnEnableNormalMode is called outside '); | |
670 | + $("#btnTranparency").removeClass("disabled"); | |
671 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
672 | + scope.$apply(function () { | |
673 | + scope.enableNormalMode(); | |
674 | + }); | |
675 | + }); | |
676 | + // on extract mode click | |
677 | + $("#btnExtract").removeAttr("onclick"); | |
678 | + $("#btnExtract").on("touchstart", function () { | |
679 | + console.log('OnEnableExtract is called outside '); | |
680 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
681 | + scope.$apply(function () { | |
682 | + scope.enableExtract('true'); | |
683 | + }); | |
684 | + }); | |
685 | + // on highlight mode click | |
686 | + $("#btnHighLight").removeAttr("onclick"); | |
687 | + $("#btnHighLight").on("touchstart", function () { | |
688 | + console.log('OnEnableHighlight is called outside '); | |
689 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
690 | + scope.$apply(function () { | |
691 | + scope.enableHighlight(); | |
692 | + }); | |
693 | + }); | |
694 | + // on show/hide mode click | |
695 | + $("#btnStrutureBox").removeAttr("onclick"); | |
696 | + $("#btnStrutureBox").on("touchstart", function () { | |
697 | + console.log('OnBodySystem chnaged is called outside '); | |
698 | + var scope = angular.element(document.getElementById("daView")).scope(); | |
699 | + scope.$apply(function () { | |
700 | + scope.enableShowHideStructureBox(); | |
701 | + }); | |
702 | + }); | |
703 | + } | |
704 | + | |
638 | 705 | $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { |
639 | 706 | $rootScope.selectedBodySystemName = 'All'; |
640 | 707 | $rootScope.selectedBodySystemId = 0; |
... | ... | @@ -4314,11 +4381,12 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4314 | 4381 | $scope.horizontlScrollPosition = canvasDiv.scrollLeft; |
4315 | 4382 | |
4316 | 4383 | var canvasDiv = document.getElementById('canvasDiv'); |
4317 | - canvasDiv.addEventListener("touchstart", mouseDownListener); | |
4318 | 4384 | |
4319 | - canvasDiv.addEventListener("touchmove", mouseMoveListener); | |
4385 | + canvasDiv.addEventListener("touchstart", mouseDownListener); | |
4320 | 4386 | |
4321 | - canvasDiv.addEventListener("touchend", mouseUpListener); | |
4387 | + canvasDiv.addEventListener("touchmove", mouseMoveListener); | |
4388 | + | |
4389 | + canvasDiv.addEventListener("touchend", mouseUpListener); | |
4322 | 4390 | |
4323 | 4391 | canvasDiv.addEventListener("mousedown", mouseDownListener); |
4324 | 4392 | |
... | ... | @@ -4355,6 +4423,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4355 | 4423 | |
4356 | 4424 | function mouseDownListener(e) { |
4357 | 4425 | e.preventDefault(); |
4426 | + //to prevent screen scroll on ipad while drawing TB | |
4427 | + e.preventDefault(); | |
4358 | 4428 | //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. |
4359 | 4429 | var tCanvas = document.getElementById('transparencyCanvas'); |
4360 | 4430 | if ($('#transparencyScale').css("visibility") == 'visible') { |
... | ... | @@ -4416,6 +4486,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4416 | 4486 | |
4417 | 4487 | function mouseMoveListener(e) { |
4418 | 4488 | e.preventDefault(); |
4489 | + //to prevent screen scroll on ipad while drawing TB | |
4490 | + e.preventDefault(); | |
4491 | + | |
4419 | 4492 | var canvasDiv = document.getElementById('canvasDiv'); |
4420 | 4493 | $scope.verticalScrollPosition = canvasDiv.scrollTop; |
4421 | 4494 | $scope.horizontlScrollPosition = canvasDiv.scrollLeft; |
... | ... | @@ -4445,6 +4518,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4445 | 4518 | e.preventDefault(); |
4446 | 4519 | $scope.DisableUI(); |
4447 | 4520 | |
4521 | + //to prevent screen scroll on ipad while drawing TB | |
4522 | + e.preventDefault(); | |
4523 | + | |
4448 | 4524 | $scope.isTBDrawnOnBodyRegion = false; |
4449 | 4525 | |
4450 | 4526 | $(".com").remove(); |
... | ... | @@ -4683,10 +4759,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4683 | 4759 | |
4684 | 4760 | |
4685 | 4761 | document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener); |
4762 | + | |
4686 | 4763 | document.getElementById('canvasDiv').removeEventListener("touchmove", mouseMoveListener); |
4687 | - document.getElementById('canvasDiv').removeEventListener("touchend", mouseUpListener); | |
4688 | - | |
4689 | - | |
4764 | + | |
4765 | + document.getElementById('canvasDiv').removeEventListener("touchend", mouseUpListener); | |
4690 | 4766 | // document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener); |
4691 | 4767 | $('#btnTranparency').removeClass('btn-black'); |
4692 | 4768 | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... | ... | @@ -1865,7 +1865,43 @@ function onZoom(scope) { |
1865 | 1865 | |
1866 | 1866 | |
1867 | 1867 | $(document).ready(function () { |
1868 | + var $ua = navigator.userAgent; | |
1869 | + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
1870 | + //hide pin button clicked | |
1871 | + $("#hidePinBtn").removeAttr("onclick"); | |
1872 | + $("#hidePinBtn").on("touchstart", function () { | |
1873 | + var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); | |
1874 | + rootScope.$apply(function () { | |
1875 | + rootScope.hidePins(event); | |
1876 | + }); | |
1877 | + }); | |
1878 | + //selected pin button clicked | |
1879 | + $("#selectedPin").removeAttr("onclick"); | |
1880 | + $("#selectedPin").on("touchstart", function () { | |
1881 | + console.log('showSelectedPins is called') | |
1882 | + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); | |
1883 | + scope.$apply(function () { | |
1884 | + scope.showSelectedPins(event); | |
1885 | + }); | |
1886 | + }); | |
1887 | + //all pin button clicked | |
1888 | + $("#allPinBtn").removeAttr("onclick"); | |
1889 | + $("#allPinBtn").on("touchstart", function () { | |
1890 | + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); | |
1891 | + scope.$apply(function () { | |
1892 | + scope.showAllPinsAfterHide(event); | |
1893 | + }); | |
1894 | + }); | |
1895 | + //comment-box button clicked | |
1896 | + $("#comment-box").removeAttr("onclick"); | |
1897 | + $("#comment-box").on("touchstart", function () { | |
1898 | + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope(); | |
1899 | + scope.$apply(function () { | |
1900 | + scope.ShowHideAnnotation(event); | |
1901 | + }); | |
1902 | + }); | |
1868 | 1903 | |
1904 | + } | |
1869 | 1905 | $(".slider").slider({ |
1870 | 1906 | min: 25, |
1871 | 1907 | max: 100, | ... | ... |