Commit faaecac049303de5bad0e9635a517daecbc2830b
Merge branch 'iPadTBoxIssue' into Develop
Showing
1 changed file
with
32 additions
and
0 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -594,6 +594,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
594 | 594 | } |
595 | 595 | |
596 | 596 | angular.element(document).ready(function (e) { |
597 | + | |
598 | + //to get slider working on ipad | |
599 | + var $ua = navigator.userAgent; | |
600 | + | |
601 | + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) { | |
602 | + | |
603 | + $("#layerChangeSlider").css("pointer-events", "auto"); | |
604 | + | |
605 | + } | |
606 | + | |
597 | 607 | $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () { |
598 | 608 | $rootScope.selectedBodySystemName = 'All'; |
599 | 609 | $rootScope.selectedBodySystemId = 0; |
... | ... | @@ -4235,6 +4245,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4235 | 4245 | $scope.horizontlScrollPosition = canvasDiv.scrollLeft; |
4236 | 4246 | |
4237 | 4247 | var canvasDiv = document.getElementById('canvasDiv'); |
4248 | + | |
4249 | + canvasDiv.addEventListener("touchstart", mouseDownListener); | |
4250 | + | |
4251 | + canvasDiv.addEventListener("touchmove", mouseMoveListener); | |
4252 | + | |
4253 | + canvasDiv.addEventListener("touchend", mouseUpListener); | |
4254 | + | |
4238 | 4255 | canvasDiv.addEventListener("mousedown", mouseDownListener); |
4239 | 4256 | |
4240 | 4257 | canvasDiv.addEventListener("mousemove", mouseMoveListener); |
... | ... | @@ -4269,6 +4286,8 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4269 | 4286 | |
4270 | 4287 | function mouseDownListener(e) { |
4271 | 4288 | |
4289 | + //to prevent screen scroll on ipad while drawing TB | |
4290 | + e.preventDefault(); | |
4272 | 4291 | //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected. |
4273 | 4292 | var tCanvas = document.getElementById('transparencyCanvas'); |
4274 | 4293 | if ($('#transparencyScale').css("visibility") == 'visible') { |
... | ... | @@ -4326,6 +4345,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4326 | 4345 | |
4327 | 4346 | function mouseMoveListener(e) { |
4328 | 4347 | |
4348 | + //to prevent screen scroll on ipad while drawing TB | |
4349 | + e.preventDefault(); | |
4350 | + | |
4329 | 4351 | var canvasDiv = document.getElementById('canvasDiv'); |
4330 | 4352 | $scope.verticalScrollPosition = canvasDiv.scrollTop; |
4331 | 4353 | $scope.horizontlScrollPosition = canvasDiv.scrollLeft; |
... | ... | @@ -4353,6 +4375,9 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4353 | 4375 | |
4354 | 4376 | function mouseUpListener(e) { |
4355 | 4377 | |
4378 | + //to prevent screen scroll on ipad while drawing TB | |
4379 | + e.preventDefault(); | |
4380 | + | |
4356 | 4381 | $scope.isTBDrawnOnBodyRegion = false; |
4357 | 4382 | |
4358 | 4383 | $(".com").remove(); |
... | ... | @@ -4583,6 +4608,13 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l |
4583 | 4608 | document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener); |
4584 | 4609 | |
4585 | 4610 | document.getElementById('canvasDiv').removeEventListener("mouseup", mouseUpListener); |
4611 | + | |
4612 | + | |
4613 | + document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener); | |
4614 | + | |
4615 | + document.getElementById('canvasDiv').removeEventListener("touchmove", mouseMoveListener); | |
4616 | + | |
4617 | + document.getElementById('canvasDiv').removeEventListener("touchend", mouseUpListener); | |
4586 | 4618 | // document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener); |
4587 | 4619 | $('#btnTranparency').removeClass('btn-black'); |
4588 | 4620 | ... | ... |