Commit 5447308217ddb3f69cc07963ec3793b9bc048ff5

Authored by Amrita Vishnoi
2 parents 7b06aac1 3b1f22dd

Merge branch 'zoomSliderLoadIpad' of http://52.6.196.163/ADAM/AIAHTML5 into Develop-IPAD-MAC

400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -260,6 +260,112 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -260,6 +260,112 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
260 //7. Highlight all system body list in left side 260 //7. Highlight all system body list in left side
261 $scope.highlightBodySystemList(); 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 }, 500); 369 }, 500);
264 } 370 }
265 371
@@ -1745,6 +1851,51 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou @@ -1745,6 +1851,51 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
1745 } 1851 }
1746 } 1852 }
1747 } 1853 }
  1854 + $(document).ready(function () {
  1855 + var $ua = navigator.userAgent;
  1856 + if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
  1857 +
  1858 + var jspanelContainerWidth = $(".jsPanel-content").css("width");
  1859 + $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
  1860 + $("#ImagePanel").css("width", "100%");
  1861 +
  1862 + //hide pin button clicked
  1863 + $("#hidePinBtn").removeAttr("onclick");
  1864 + $("#hidePinBtn").on("touchstart", function () {
  1865 + var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1866 + rootScope.$apply(function () {
  1867 + rootScope.hidePins(event);
  1868 + });
  1869 + });
  1870 + //selected pin button clicked
  1871 + $("#selectedPin").removeAttr("onclick");
  1872 + $("#selectedPin").on("touchstart", function () {
  1873 + console.log('showSelectedPins is called')
  1874 + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1875 + scope.$apply(function () {
  1876 + scope.showSelectedPins(event);
  1877 + });
  1878 + });
  1879 + //all pin button clicked
  1880 + $("#allPinBtn").removeAttr("onclick");
  1881 + $("#allPinBtn").on("touchstart", function () {
  1882 + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1883 + scope.$apply(function () {
  1884 + scope.showAllPinsAfterHide(event);
  1885 + });
  1886 + });
  1887 + //comment-box button clicked
  1888 + $("#comment-box").removeAttr("onclick");
  1889 + $("#comment-box").on("touchstart", function () {
  1890 + var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();
  1891 + scope.$apply(function () {
  1892 + scope.ShowHideAnnotation(event);
  1893 + });
  1894 + });
  1895 +
  1896 + }
  1897 +
  1898 + });
1748 }]); 1899 }]);
1749 1900
1750 1901
@@ -1883,153 +2034,3 @@ function onZoom(scope) { @@ -1883,153 +2034,3 @@ function onZoom(scope) {
1883 } 2034 }
1884 2035
1885 2036
1886 -$(document).ready(function () {  
1887 - var $ua = navigator.userAgent;  
1888 - if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {  
1889 -  
1890 - var jspanelContainerWidth = $(".jsPanel-content").css("width");  
1891 - $(".jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });  
1892 - $("#ImagePanel").css("width", "100%");  
1893 -  
1894 - //hide pin button clicked  
1895 - $("#hidePinBtn").removeAttr("onclick");  
1896 - $("#hidePinBtn").on("touchstart", function () {  
1897 - var rootScope = angular.element(document.getElementById("aaDetailPageDiv")).scope();  
1898 - rootScope.$apply(function () {  
1899 - rootScope.hidePins(event);  
1900 - });  
1901 - });  
1902 - //selected pin button clicked  
1903 - $("#selectedPin").removeAttr("onclick");  
1904 - $("#selectedPin").on("touchstart", function () {  
1905 - console.log('showSelectedPins is called')  
1906 - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();  
1907 - scope.$apply(function () {  
1908 - scope.showSelectedPins(event);  
1909 - });  
1910 - });  
1911 - //all pin button clicked  
1912 - $("#allPinBtn").removeAttr("onclick");  
1913 - $("#allPinBtn").on("touchstart", function () {  
1914 - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();  
1915 - scope.$apply(function () {  
1916 - scope.showAllPinsAfterHide(event);  
1917 - });  
1918 - });  
1919 - //comment-box button clicked  
1920 - $("#comment-box").removeAttr("onclick");  
1921 - $("#comment-box").on("touchstart", function () {  
1922 - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();  
1923 - scope.$apply(function () {  
1924 - scope.ShowHideAnnotation(event);  
1925 - });  
1926 - });  
1927 -  
1928 - }  
1929 - $(".slider").slider({  
1930 - min: 25,  
1931 - max: 100,  
1932 - value: 100,  
1933 - range: "min",  
1934 - orientation: "vertical",  
1935 - slide: function (event, ui) {  
1936 - var scope = angular.element(document.getElementById("aaDetailPageDiv")).scope();  
1937 - scope.$apply(function () {  
1938 - scope.sliderVal = ui.value;  
1939 - scope.removeSpeechBubble();  
1940 - var relativeWidth = 0;  
1941 - var relativeHeight = 0;  
1942 - if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {  
1943 - if (ui.value == 100) {  
1944 - relativeWidth = scope.ViewImageWidth;  
1945 - relativeHeight = scope.ViewImageHeight  
1946 - scope.sliderPercentValue = 1.0;  
1947 - }  
1948 - else if (ui.value == 85) {  
1949 - relativeWidth = scope.ViewImageWidth * 0.85;  
1950 - relativeHeight = scope.ViewImageHeight * 0.85;  
1951 - scope.sliderPercentValue = 0.85;  
1952 -  
1953 - } else if (ui.value == 70) {  
1954 - relativeWidth = scope.ViewImageWidth * 0.70;  
1955 - relativeHeight = scope.ViewImageHeight * 0.70;  
1956 - scope.sliderPercentValue = 0.70;  
1957 - } else if (ui.value == 55) {  
1958 -  
1959 - relativeWidth = scope.ViewImageWidth * 0.55;  
1960 - relativeHeight = scope.ViewImageHeight * 0.55;  
1961 - scope.sliderPercentValue = 0.55;  
1962 -  
1963 - } else if (ui.value == 40) {  
1964 -  
1965 - relativeWidth = scope.ViewImageWidth * 0.40;  
1966 - relativeHeight = scope.ViewImageHeight * 0.40;  
1967 - scope.sliderPercentValue = 0.40;  
1968 -  
1969 - } else if (ui.value == 25) {  
1970 -  
1971 - relativeWidth = scope.ViewImageWidth * 0.25;  
1972 - relativeHeight = scope.ViewImageHeight * 0.25;  
1973 - scope.sliderPercentValue = 0.25;  
1974 -  
1975 - }  
1976 - }  
1977 -  
1978 - if (ui.value == 25 || ui.value == 40 || ui.value == 55 || ui.value == 70 || ui.value == 85 || ui.value == 100) {  
1979 - $("#modItemImage").css("width", relativeWidth + "px");  
1980 - $("#modItemImage").css("height", relativeHeight + "px");  
1981 - $("#aaDetailViewCanvas").css("width", relativeWidth + "px");  
1982 - $("#modItemImage").css("height", relativeHeight + "px");  
1983 -  
1984 - $("#modItemImage").attr('src', '');  
1985 -  
1986 -  
1987 - $("#aaDetailViewCanvas").remove();  
1988 - //0.5 create canvas on the top of image so that I can draw a line over the canvas.  
1989 - var canvas = document.createElement('canvas');  
1990 - canvas.id = 'aaDetailViewCanvas';  
1991 - canvas.className = 'aaCanvas';  
1992 - canvas.height = relativeHeight;  
1993 - canvas.width = relativeWidth;  
1994 - canvas.style.left = '0px';  
1995 - canvas.style.top = '0px';  
1996 - canvas.style.position = "absolute";  
1997 -  
1998 - $("#canvasDiv").append(canvas);  
1999 - scope.context = canvas.getContext("2d")  
2000 - $("#modItemImage").attr('src', scope.OpenItemImagePath);  
2001 - scope.isSliderChange = true;  
2002 - var btnID = '';  
2003 - $("div.tools div:eq(1) div").each(function () {  
2004 - if ($(this).find("button").hasClass("btn-primary")) {  
2005 - btnID = $(this).find("button").attr("id");  
2006 - $('#' + btnID).removeClass("btn-black");  
2007 - $('#' + btnID).addClass("btn-primary");  
2008 - }  
2009 - });  
2010 - scope.isSelectedPinBtnClickedAftrSliderCange = true;  
2011 - switch (btnID) {  
2012 -  
2013 - case "hidePinBtn":  
2014 - break;  
2015 - case "allPinBtn":  
2016 - scope.showAllPins();  
2017 - break;  
2018 - case "selectedPin":  
2019 - scope.showAllPins();  
2020 - setTimeout(function () {  
2021 - console.log(scope.allPinDataArray);  
2022 - scope.activePinOnSliderChange();  
2023 - }, 1000);  
2024 - break;  
2025 - }  
2026 - }  
2027 -  
2028 - });  
2029 - }  
2030 - })  
2031 - .slider("pips", {  
2032 - rest: "label",  
2033 - step: "15"  
2034 - });  
2035 -});  
2036 \ No newline at end of file 2037 \ No newline at end of file
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
@@ -241,12 +241,10 @@ @@ -241,12 +241,10 @@
241 }); 241 });
242 }); 242 });
243 </script> 243 </script>
244 -<script src="libs/jquery/jquery_plugin/slider-pips/jquery-ui-slider-pips.js"></script> 244 +
245 245
246 <script> 246 <script>
247 $(function () { 247 $(function () {
248 $("#draggable").draggable(); 248 $("#draggable").draggable();
249 }); 249 });
250 </script> 250 </script>
251 -  
252 -<script src="app/controllers/TileViewListController.js"></script>  
400-SOURCECODE/AIAHTML5.Web/index.html
@@ -1448,7 +1448,6 @@ @@ -1448,7 +1448,6 @@
1448 <script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js"></script> 1448 <script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.js"></script>
1449 <script src="libs/video_4_12_11/video_4_12_11.js"></script> 1449 <script src="libs/video_4_12_11/video_4_12_11.js"></script>
1450 <script src="libs/jquery/jquery_plugin/SpeechBubble/bubble.js"></script> 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 <!--<script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.min.js"></script>--> 1451 <!--<script src="libs/jquery/jquery_plugin/jsPanel/jspanel/jquery.jspanel.min.js"></script>-->
1453 <script src="app/main/AIA.js"></script> 1452 <script src="app/main/AIA.js"></script>
1454 <script src="app/main/Link.js"></script> 1453 <script src="app/main/Link.js"></script>
@@ -1479,6 +1478,7 @@ @@ -1479,6 +1478,7 @@
1479 <script src="app/services/DataService.js"></script> 1478 <script src="app/services/DataService.js"></script>
1480 <script src="app/services/TermService.js"></script> 1479 <script src="app/services/TermService.js"></script>
1481 <script src="libs/jquery/jquery_plugin/jqueryui.js"></script> 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 <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script> 1483 <script src="https://cdnjs.cloudflare.com/ajax/libs/jqueryui-touch-punch/0.2.3/jquery.ui.touch-punch.min.js"></script>
1484 1484