Commit 3b1f22ddf92c0fd6a9d4de5d68ae0184718e4eb7

Authored by Mukul Rajput
1 parent 2c208565

this is solution for the bug zoomSliderLoadIpad

400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
... ... @@ -260,6 +260,112 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
260 260 //7. Highlight all system body list in left side
261 261 $scope.highlightBodySystemList();
262 262 }
  263 + $(".slider").slider({
  264 + min: 25,
  265 + max: 100,
  266 + value: 100,
  267 + range: "min",
  268 + orientation: "vertical",
  269 + slide: function (event, ui) {
  270 + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  271 + scope.$apply(function () {
  272 + scope.sliderVal = ui.value;
  273 + scope.removeSpeechBubble();
  274 + var relativeWidth = 0;
  275 + var relativeHeight = 0;
  276 + if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
  277 + if (ui.value == 100) {
  278 + relativeWidth = scope.ViewImageWidth;
  279 + relativeHeight = scope.ViewImageHeight
  280 + scope.sliderPercentValue = 1.0;
  281 + }
  282 + else if (ui.value == 85) {
  283 + relativeWidth = scope.ViewImageWidth * 0.85;
  284 + relativeHeight = scope.ViewImageHeight * 0.85;
  285 + scope.sliderPercentValue = 0.85;
  286 +
  287 + } else if (ui.value == 70) {
  288 + relativeWidth = scope.ViewImageWidth * 0.70;
  289 + relativeHeight = scope.ViewImageHeight * 0.70;
  290 + scope.sliderPercentValue = 0.70;
  291 + } else if (ui.value == 55) {
  292 +
  293 + relativeWidth = scope.ViewImageWidth * 0.55;
  294 + relativeHeight = scope.ViewImageHeight * 0.55;
  295 + scope.sliderPercentValue = 0.55;
  296 +
  297 + } else if (ui.value == 40) {
  298 +
  299 + relativeWidth = scope.ViewImageWidth * 0.40;
  300 + relativeHeight = scope.ViewImageHeight * 0.40;
  301 + scope.sliderPercentValue = 0.40;
  302 +
  303 + } else if (ui.value == 25) {
  304 +
  305 + relativeWidth = scope.ViewImageWidth * 0.25;
  306 + relativeHeight = scope.ViewImageHeight * 0.25;
  307 + scope.sliderPercentValue = 0.25;
  308 +
  309 + }
  310 + }
  311 +
  312 + if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
  313 + $("#modItemImage").css("width", relativeWidth + "px");
  314 + $("#modItemImage").css("height", relativeHeight + "px");
  315 + $("#aaDetailViewCanvas").css("width", relativeWidth + "px");
  316 + $("#modItemImage").css("height", relativeHeight + "px");
  317 +
  318 + $("#modItemImage").attr('src', '');
  319 +
  320 +
  321 + $("#aaDetailViewCanvas").remove();
  322 + //0.5 create canvas on the top of image so that I can draw a line over the canvas.
  323 + var canvas = document.createElement('canvas');
  324 + canvas.id = 'aaDetailViewCanvas';
  325 + canvas.className = 'aaCanvas';
  326 + canvas.height = relativeHeight;
  327 + canvas.width = relativeWidth;
  328 + canvas.style.left = '0px';
  329 + canvas.style.top = '0px';
  330 + canvas.style.position = "absolute";
  331 +
  332 + $("#canvasDiv").append(canvas);
  333 + scope.context = canvas.getContext("2d")
  334 + $("#modItemImage").attr('src', scope.OpenItemImagePath);
  335 + scope.isSliderChange = true;
  336 + var btnID = '';
  337 + $("div.tools div:eq(1) div").each(function () {
  338 + if ($(this).find("button").hasClass("btn-primary")) {
  339 + btnID = $(this).find("button").attr("id");
  340 + $('#' + btnID).removeClass("btn-black");
  341 + $('#' + btnID).addClass("btn-primary");
  342 + }
  343 + });
  344 + scope.isSelectedPinBtnClickedAftrSliderCange = true;
  345 + switch (btnID) {
  346 +
  347 + case "hidePinBtn":
  348 + break;
  349 + case "allPinBtn":
  350 + scope.showAllPins();
  351 + break;
  352 + case "selectedPin":
  353 + scope.showAllPins();
  354 + setTimeout(function () {
  355 + console.log(scope.allPinDataArray);
  356 + scope.activePinOnSliderChange();
  357 + }, 1000);
  358 + break;
  359 + }
  360 + }
  361 +
  362 + });
  363 + }
  364 + })
  365 + .slider("pips", {
  366 + rest: "label",
  367 + step: "15"
  368 + });
263 369 }, 500);
264 370 }
265 371  
... ... @@ -1747,6 +1853,51 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1747 1853 }
1748 1854 }
1749 1855 }
  1856 + $(document).ready(function () {
  1857 + var $ua = navigator.userAgent;
  1858 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  1859 +
  1860 + var jspanelContainerWidth = $(".jsPanel-content").css("width");
  1861 + $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
  1862 + $("#ImagePanel").css("width", "100%");
  1863 +
  1864 + //hide pin button clicked
  1865 + $("#hidePinBtn").removeAttr("onclick");
  1866 + $("#hidePinBtn").on("touchstart", function () {
  1867 + var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1868 + rootScope.$apply(function () {
  1869 + rootScope.hidePins(event);
  1870 + });
  1871 + });
  1872 + //selected pin button clicked
  1873 + $("#selectedPin").removeAttr("onclick");
  1874 + $("#selectedPin").on("touchstart", function () {
  1875 + console.log('showSelectedPins is called')
  1876 + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1877 + scope.$apply(function () {
  1878 + scope.showSelectedPins(event);
  1879 + });
  1880 + });
  1881 + //all pin button clicked
  1882 + $("#allPinBtn").removeAttr("onclick");
  1883 + $("#allPinBtn").on("touchstart", function () {
  1884 + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1885 + scope.$apply(function () {
  1886 + scope.showAllPinsAfterHide(event);
  1887 + });
  1888 + });
  1889 + //comment-box button clicked
  1890 + $("#comment-box").removeAttr("onclick");
  1891 + $("#comment-box").on("touchstart", function () {
  1892 + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1893 + scope.$apply(function () {
  1894 + scope.ShowHideAnnotation(event);
  1895 + });
  1896 + });
  1897 +
  1898 + }
  1899 +
  1900 + });
1750 1901 }]);
1751 1902  
1752 1903  
... ... @@ -1885,153 +2036,3 @@ function onZoom(scope) {
1885 2036 }
1886 2037  
1887 2038  
1888   -$(document).ready(function () {
1889   - var $ua = navigator.userAgent;
1890   - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
1891   -
1892   - var jspanelContainerWidth = $(".jsPanel-content").css("width");
1893   - $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
1894   - $("#ImagePanel").css("width", "100%");
1895   -
1896   - //hide pin button clicked
1897   - $("#hidePinBtn").removeAttr("onclick");
1898   - $("#hidePinBtn").on("touchstart", function () {
1899   - var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
1900   - rootScope.$apply(function () {
1901   - rootScope.hidePins(event);
1902   - });
1903   - });
1904   - //selected pin button clicked
1905   - $("#selectedPin").removeAttr("onclick");
1906   - $("#selectedPin").on("touchstart", function () {
1907   - console.log('showSelectedPins is called')
1908   - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
1909   - scope.$apply(function () {
1910   - scope.showSelectedPins(event);
1911   - });
1912   - });
1913   - //all pin button clicked
1914   - $("#allPinBtn").removeAttr("onclick");
1915   - $("#allPinBtn").on("touchstart", function () {
1916   - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
1917   - scope.$apply(function () {
1918   - scope.showAllPinsAfterHide(event);
1919   - });
1920   - });
1921   - //comment-box button clicked
1922   - $("#comment-box").removeAttr("onclick");
1923   - $("#comment-box").on("touchstart", function () {
1924   - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
1925   - scope.$apply(function () {
1926   - scope.ShowHideAnnotation(event);
1927   - });
1928   - });
1929   -
1930   - }
1931   - $(".slider").slider({
1932   - min: 25,
1933   - max: 100,
1934   - value: 100,
1935   - range: "min",
1936   - orientation: "vertical",
1937   - slide: function (event, ui) {
1938   - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
1939   - scope.$apply(function () {
1940   - scope.sliderVal = ui.value;
1941   - scope.removeSpeechBubble();
1942   - var relativeWidth = 0;
1943   - var relativeHeight = 0;
1944   - if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
1945   - if (ui.value == 100) {
1946   - relativeWidth = scope.ViewImageWidth;
1947   - relativeHeight = scope.ViewImageHeight
1948   - scope.sliderPercentValue = 1.0;
1949   - }
1950   - else if (ui.value == 85) {
1951   - relativeWidth = scope.ViewImageWidth * 0.85;
1952   - relativeHeight = scope.ViewImageHeight * 0.85;
1953   - scope.sliderPercentValue = 0.85;
1954   -
1955   - } else if (ui.value == 70) {
1956   - relativeWidth = scope.ViewImageWidth * 0.70;
1957   - relativeHeight = scope.ViewImageHeight * 0.70;
1958   - scope.sliderPercentValue = 0.70;
1959   - } else if (ui.value == 55) {
1960   -
1961   - relativeWidth = scope.ViewImageWidth * 0.55;
1962   - relativeHeight = scope.ViewImageHeight * 0.55;
1963   - scope.sliderPercentValue = 0.55;
1964   -
1965   - } else if (ui.value == 40) {
1966   -
1967   - relativeWidth = scope.ViewImageWidth * 0.40;
1968   - relativeHeight = scope.ViewImageHeight * 0.40;
1969   - scope.sliderPercentValue = 0.40;
1970   -
1971   - } else if (ui.value == 25) {
1972   -
1973   - relativeWidth = scope.ViewImageWidth * 0.25;
1974   - relativeHeight = scope.ViewImageHeight * 0.25;
1975   - scope.sliderPercentValue = 0.25;
1976   -
1977   - }
1978   - }
1979   -
1980   - if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {
1981   - $("#modItemImage").css("width", relativeWidth + "px");
1982   - $("#modItemImage").css("height", relativeHeight + "px");
1983   - $("#aaDetailViewCanvas").css("width", relativeWidth + "px");
1984   - $("#modItemImage").css("height", relativeHeight + "px");
1985   -
1986   - $("#modItemImage").attr('src', '');
1987   -
1988   -
1989   - $("#aaDetailViewCanvas").remove();
1990   - //0.5 create canvas on the top of image so that I can draw a line over the canvas.
1991   - var canvas = document.createElement('canvas');
1992   - canvas.id = 'aaDetailViewCanvas';
1993   - canvas.className = 'aaCanvas';
1994   - canvas.height = relativeHeight;
1995   - canvas.width = relativeWidth;
1996   - canvas.style.left = '0px';
1997   - canvas.style.top = '0px';
1998   - canvas.style.position = "absolute";
1999   -
2000   - $("#canvasDiv").append(canvas);
2001   - scope.context = canvas.getContext("2d")
2002   - $("#modItemImage").attr('src', scope.OpenItemImagePath);
2003   - scope.isSliderChange = true;
2004   - var btnID = '';
2005   - $("div.tools div:eq(1) div").each(function () {
2006   - if ($(this).find("button").hasClass("btn-primary")) {
2007   - btnID = $(this).find("button").attr("id");
2008   - $('#' + btnID).removeClass("btn-black");
2009   - $('#' + btnID).addClass("btn-primary");
2010   - }
2011   - });
2012   - scope.isSelectedPinBtnClickedAftrSliderCange = true;
2013   - switch (btnID) {
2014   -
2015   - case "hidePinBtn":
2016   - break;
2017   - case "allPinBtn":
2018   - scope.showAllPins();
2019   - break;
2020   - case "selectedPin":
2021   - scope.showAllPins();
2022   - setTimeout(function () {
2023   - console.log(scope.allPinDataArray);
2024   - scope.activePinOnSliderChange();
2025   - }, 1000);
2026   - break;
2027   - }
2028   - }
2029   -
2030   - });
2031   - }
2032   - })
2033   - .slider("pips", {
2034   - rest: "label",
2035   - step: "15"
2036   - });
2037   -});
2038 2039 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
... ... @@ -241,12 +241,10 @@
241 241 });
242 242 });
243 243 </script>
244   -<script src="libs/jquery/jquery_plugin/slider-pips/jquery-ui-slider-pips.js"></script>
  244 +
245 245  
246 246 <script>
247 247 $(function () {
248 248 $("#draggable").draggable();
249 249 });
250 250 </script>
251   -
252   -<script src="app/controllers/TileViewListController.js"></script>
... ...
400-SOURCECODE/AIAHTML5.Web/index.html
... ... @@ -1448,7 +1448,6 @@
1448 1448 <script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js"></script>
1449 1449 <script src="libs/video_4_12_11/video_4_12_11.js"></script>
1450 1450 <script src="libs/jquery/jquery_plugin/SpeechBubble/bubble.js"></script>
1451   - <script src="libs/jquery/jquery_plugin/slider-pips/jquery-ui-slider-pips.js"></script>
1452 1451 <!--<script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.min.js"></script>-->
1453 1452 <script src="app/main/AIA.js"></script>
1454 1453 <script src="app/main/Link.js"></script>
... ... @@ -1479,6 +1478,7 @@
1479 1478 <script src="app/services/DataService.js"></script>
1480 1479 <script src="app/services/TermService.js"></script>
1481 1480 <script src="libs/jquery/jquery_plugin/jqueryui.js"></script>
  1481 + <script src="libs/jquery/jquery_plugin/slider-pips/jquery-ui-slider-pips.js"></script>
1482 1482  
1483 1483 <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>
1484 1484  
... ...