Commit e0286da1377478593241894b52dedce9dbbbfbea

Authored by unknown
1 parent 4a87a41f

Ipad Touch Issues

400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... ... @@ -365,7 +365,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
365 365 $rootScope.male = "";
366 366 $rootScope.female = "active";
367 367 }
  368 +
  369 +
368 370  
  371 +
369 372  
370 373 }
371 374  
... ... @@ -591,9 +594,19 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
591 594  
592 595  
593 596 }
  597 +
  598 +
  599 +
594 600 }
595 601  
596 602 angular.element(document).ready(function (e) {
  603 +
  604 + var $ua = navigator.userAgent;
  605 + // var $event = ($ua.match(/(iPod|iPhone|iPad|android)/i));
  606 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  607 + $("#layerChangeSlider").css("pointer-events", "auto");
  608 + }
  609 +
597 610 $(document).on("click", "#daImagePanel .jsPanel-hdr .jsPanel-hdr-r .jsPanel-btn-close .jsglyph-remove", function () {
598 611 $rootScope.selectedBodySystemName = 'All';
599 612 $rootScope.selectedBodySystemId = 0;
... ... @@ -4275,7 +4288,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4275 4288 }
4276 4289  
4277 4290 function mouseDownListener(e) {
4278   -
  4291 + e.preventDefault();
4279 4292 //Dated:18-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
4280 4293 var tCanvas = document.getElementById('transparencyCanvas');
4281 4294 if ($('#transparencyScale').css("visibility") == 'visible') {
... ... @@ -4322,7 +4335,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4322 4335 $selection.appendTo($container);
4323 4336 }
4324 4337  
4325   - document.getElementById('canvasDiv').removeEventListener("mousedown", "touchstart", mouseDownListener);
  4338 + document.getElementById('canvasDiv').removeEventListener("mousedown", mouseDownListener);
  4339 +
  4340 + document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
  4341 +
  4342 +
4326 4343 //Dated:19-07-2016 Issue#4975: Transparency box should not be clickable if it is already selected.
4327 4344 if ($("#txtlayerNumber").val() != 0 && $scope.currentLayerNumber != undefined) {
4328 4345 $('#layerChangeSlider').slider("option", "value", parseInt($rootScope.totalLayers) - parseInt($scope.currentLayerNumber));
... ... @@ -4332,7 +4349,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4332 4349 }
4333 4350  
4334 4351 function mouseMoveListener(e) {
4335   -
  4352 + e.preventDefault();
4336 4353 var canvasDiv = document.getElementById('canvasDiv');
4337 4354 $scope.verticalScrollPosition = canvasDiv.scrollTop;
4338 4355 $scope.horizontlScrollPosition = canvasDiv.scrollLeft;
... ... @@ -4359,7 +4376,7 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4359 4376  
4360 4377  
4361 4378 function mouseUpListener(e) {
4362   -
  4379 + e.preventDefault();
4363 4380 $scope.isTBDrawnOnBodyRegion = false;
4364 4381  
4365 4382 $(".com").remove();
... ... @@ -4584,9 +4601,16 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l
4584 4601 }
4585 4602 }
4586 4603  
4587   - document.getElementById('canvasDiv').removeEventListener("mousedown", "touchstart", mouseDownListener);
4588   - document.getElementById('canvasDiv').removeEventListener("mousemove", "touchmove", mouseMoveListener);
4589   - document.getElementById('canvasDiv').removeEventListener("mouseup", "touchend", mouseUpListener);
  4604 + document.getElementById('canvasDiv').removeEventListener("mousedown", mouseDownListener);
  4605 + document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener);
  4606 + document.getElementById('canvasDiv').removeEventListener("mouseup", mouseUpListener);
  4607 +
  4608 +
  4609 + document.getElementById('canvasDiv').removeEventListener("touchstart", mouseDownListener);
  4610 + document.getElementById('canvasDiv').removeEventListener("touchmove", mouseMoveListener);
  4611 + document.getElementById('canvasDiv').removeEventListener("touchend", mouseUpListener);
  4612 +
  4613 +
4590 4614 // document.getElementById('canvasDiv').removeEventListener("mousemove", mouseMoveListener);
4591 4615 $('#btnTranparency').removeClass('btn-black');
4592 4616  
... ...