diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index d1eb55f..338f0ad 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -594,6 +594,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l } angular.element(document).ready(function (e) { + + //to get slider working on ipad + var $ua = navigator.userAgent; + + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { + + $("#layerChangeSlider").css("pointer-events", "auto"); + + } + $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { $rootScope.selectedBodySystemName = 'All'; $rootScope.selectedBodySystemId = 0; @@ -4235,6 +4245,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $scope.horizontlScrollPosition = canvasDiv.scrollLeft; var canvasDiv = document.getElementById('canvasDiv'); + + canvasDiv.addEventListener("touchstart", mouseDownListener); + + canvasDiv.addEventListener("touchmove", mouseMoveListener); + + canvasDiv.addEventListener("touchend", mouseUpListener); + canvasDiv.addEventListener("mousedown", mouseDownListener); canvasDiv.addEventListener("mousemove", mouseMoveListener); @@ -4269,6 +4286,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l function mouseDownListener(e) { + //to prevent screen scroll on ipad while drawing TB + e.preventDefault(); //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. var tCanvas = document.getElementById('transparencyCanvas'); if ($('#transparencyScale').css("visibility") == 'visible') { @@ -4326,6 +4345,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l function mouseMoveListener(e) { + //to prevent screen scroll on ipad while drawing TB + e.preventDefault(); + var canvasDiv = document.getElementById('canvasDiv'); $scope.verticalScrollPosition = canvasDiv.scrollTop; $scope.horizontlScrollPosition = canvasDiv.scrollLeft; @@ -4353,6 +4375,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l function mouseUpListener(e) { + //to prevent screen scroll on ipad while drawing TB + e.preventDefault(); + $scope.isTBDrawnOnBodyRegion = false; $(".com").remove(); @@ -4583,6 +4608,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener); document.getElementById('canvasDiv').removeEventListener("mouseup", mouseUpListener); + + + document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener); + + document.getElementById('canvasDiv').removeEventListener("touchmove", mouseMoveListener); + + document.getElementById('canvasDiv').removeEventListener("touchend", mouseUpListener); // document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener); $('#btnTranparency').removeClass('btn-black');