Commit 516d892860a75ef1915c37333eec64d2935a48b1
1 parent
b1a6d899
handled multiple cases for based on text length.
Showing
1 changed file
with
250 additions
and
8 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -1847,6 +1847,138 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1847 | 1847 | } |
1848 | 1848 | } |
1849 | 1849 | |
1850 | + //$scope.createDynamicSpeechBubble = function (event, text, x, y) { | |
1851 | + | |
1852 | + // if (event.ctrlKey) { | |
1853 | + | |
1854 | + // $scope.multiAnnotationIsON = true; | |
1855 | + | |
1856 | + // $scope.i = $scope.i + 1; | |
1857 | + // // var a = $("#sppeachBubble").find('span').html(); | |
1858 | + // // alert(a); | |
1859 | + // var sub_id = "black" + $scope.i; | |
1860 | + // var pointClicked = parseInt(x) + parseInt(y); | |
1861 | + // var Exists = $("#canvasDiv").find("div[id=" + pointClicked + "]").length; | |
1862 | + // if (Exists == 0) { | |
1863 | + // // if (text.length > 12) { | |
1864 | + // $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:" + (text.length) + "%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
1865 | + // // } | |
1866 | + // // else { | |
1867 | + // // $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:" + (text.length) + "%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
1868 | + // // } | |
1869 | + // } | |
1870 | + // else { | |
1871 | + | |
1872 | + // $("#canvasDiv").find("div[id=" + pointClicked + "]").css("display", "block"); | |
1873 | + | |
1874 | + // } | |
1875 | + | |
1876 | + | |
1877 | + // $scope.speachBubbleArray.push({ xaxis: x, yaxis: y, ids: sub_id }); | |
1878 | + | |
1879 | + // $('.appendDragg').draggable({ | |
1880 | + // drag: function (evt) { | |
1881 | + // $(this).prev('div').css("display", "none"); | |
1882 | + // var bor_id = $(this).next('div').attr('id'); | |
1883 | + // var sub_id1 = $(this).attr('id'); | |
1884 | + // var verticalScrollPosition = canvasDiv.scrollTop; | |
1885 | + // var horizontlScrollPosition = canvasDiv.scrollLeft; | |
1886 | + // for (var m = 0; m <= $scope.speachBubbleArray.length - 1; m++) { | |
1887 | + // if ($scope.speachBubbleArray[m].ids == sub_id1) { | |
1888 | + | |
1889 | + // $scope.angle1($scope.speachBubbleArray[m].xaxis, $scope.speachBubbleArray[m].yaxis, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top, bor_id); | |
1890 | + // break; | |
1891 | + | |
1892 | + // } | |
1893 | + // } | |
1894 | + | |
1895 | + // }, | |
1896 | + // }); | |
1897 | + | |
1898 | + | |
1899 | + | |
1900 | + // $('.dynCross').on('click', function (evt) { | |
1901 | + // $(this).parent().parent().parent().css('display', 'none'); | |
1902 | + | |
1903 | + // // $("#bord").css("display", "none"); | |
1904 | + // // $("#dot").css("display", "none"); | |
1905 | + | |
1906 | + | |
1907 | + // }); | |
1908 | + | |
1909 | + | |
1910 | + // } | |
1911 | + | |
1912 | + | |
1913 | + // else { | |
1914 | + // $scope.multiAnnotationIsON = false; | |
1915 | + | |
1916 | + // $(".com").css("display", "none"); | |
1917 | + // $("#bord").css({ "width": "0px", "display": "none" }); | |
1918 | + | |
1919 | + // if (text.length > 12) { | |
1920 | + | |
1921 | + // $('<div id="dot" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' | |
1922 | + // + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;width:12%;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;"><span>' + text + '</span>' | |
1923 | + // + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
1924 | + // + '<img class="crossDiv_temp" src="/AIA/content/images/speeachBubbleClose.png"></span></div>' | |
1925 | + | |
1926 | + // + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord">' | |
1927 | + // + '</div>').appendTo('#canvasDiv'); | |
1928 | + | |
1929 | + // } | |
1930 | + // else { | |
1931 | + | |
1932 | + | |
1933 | + // $('<div id="dot" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' | |
1934 | + // + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;width:' + (text.length) + '%;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;"><span>' + text + '</span>' | |
1935 | + // + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
1936 | + // + '<img class="crossDiv_temp" src="/AIA/content/images/speeachBubbleClose.png"></span></div>' | |
1937 | + | |
1938 | + // + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord">' | |
1939 | + //+ '</div>').appendTo('#canvasDiv'); | |
1940 | + | |
1941 | + | |
1942 | + // } | |
1943 | + // var Globe = []; | |
1944 | + // Globe.push({ currentX: x, currentY: y }); | |
1945 | + | |
1946 | + // document.getElementById('dot').style.display = 'block'; | |
1947 | + // document.getElementById('dot').style.left = ((Globe[0].currentX) - 10) + 'px'; | |
1948 | + // document.getElementById('dot').style.top = ((Globe[0].currentY) + 10) + 'px'; | |
1949 | + // document.getElementById('sppeachBubble').style.display = 'block'; | |
1950 | + // document.getElementById('sppeachBubble').style.left = (Globe[0].currentX) + 'px'; | |
1951 | + // document.getElementById('sppeachBubble').style.top = (Globe[0].currentY) + 'px'; | |
1952 | + | |
1953 | + // $('#sppeachBubble').draggable( | |
1954 | + // { | |
1955 | + // drag: function (evt) { | |
1956 | + | |
1957 | + // $("#dot").css("display", "none"); | |
1958 | + // var verticalScrollPosition = canvasDiv.scrollTop; | |
1959 | + // var horizontlScrollPosition = canvasDiv.scrollLeft; | |
1960 | + // $scope.angle(x, y, evt.pageX + horizontlScrollPosition - $('#canvasDiv').offset().left, evt.pageY + verticalScrollPosition - $('#canvasDiv').offset().top); | |
1961 | + | |
1962 | + | |
1963 | + // }, | |
1964 | + // }); | |
1965 | + | |
1966 | + | |
1967 | + // $('.crossDiv_temp').on('click', function (evt) { | |
1968 | + // $('#sppeachBubble').css('display', 'none'); | |
1969 | + | |
1970 | + // $("#bord").css("display", "none"); | |
1971 | + // $("#dot").css("display", "none"); | |
1972 | + | |
1973 | + | |
1974 | + // }); | |
1975 | + | |
1976 | + // } | |
1977 | + | |
1978 | + | |
1979 | + //} | |
1980 | + | |
1981 | + | |
1850 | 1982 | $scope.createDynamicSpeechBubble = function (event, text, x, y) { |
1851 | 1983 | |
1852 | 1984 | if (event.ctrlKey) { |
... | ... | @@ -1859,13 +1991,45 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1859 | 1991 | var sub_id = "black" + $scope.i; |
1860 | 1992 | var pointClicked = parseInt(x) + parseInt(y); |
1861 | 1993 | var Exists = $("#canvasDiv").find("div[id=" + pointClicked + "]").length; |
1994 | + // alert(text.length); | |
1862 | 1995 | if (Exists == 0) { |
1863 | - // if (text.length > 12) { | |
1864 | - $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:" + (text.length) + "%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
1865 | - // } | |
1866 | - // else { | |
1867 | - // $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:" + (text.length) + "%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
1868 | - // } | |
1996 | + if (text.length <= 17) { | |
1997 | + $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:10%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
1998 | + } | |
1999 | + else if (text.length > 17 && text.length <= 24) { | |
2000 | + | |
2001 | + $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:13%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
2002 | + | |
2003 | + } | |
2004 | + else if (text.length > 24 && text.length <= 31) { | |
2005 | + | |
2006 | + $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:16%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
2007 | + | |
2008 | + } | |
2009 | + else if (text.length > 31 && text.length <= 38) { | |
2010 | + | |
2011 | + $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:19%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
2012 | + | |
2013 | + } | |
2014 | + else if (text.length > 38 && text.length <= 45) { | |
2015 | + | |
2016 | + $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:22%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
2017 | + | |
2018 | + } | |
2019 | + else if (text.length > 45 && text.length <= 51) { | |
2020 | + | |
2021 | + $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:25%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
2022 | + | |
2023 | + } | |
2024 | + else if (text.length > 51 && text.length <= 62) { | |
2025 | + | |
2026 | + $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:29%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
2027 | + | |
2028 | + } | |
2029 | + | |
2030 | + else { | |
2031 | + $("#canvasDiv").append("<div id ='" + pointClicked + "' class='com'><div style='position:absolute;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);height:15px;width:35px;left:" + (x - 10) + "px;top:" + (y + 10) + "px;'' id='bubble" + $scope.i + "'></div><div data=" + $scope.i + " id=" + sub_id + " class='appendDragg' style='z-index:10000;margin-left:25px;border:1px solid #000;padding:5px 10px;width:" + (text.length) + "%;position:absolute;color:#000;text-align:left;font-size: 12px;background-color:#fff;font-weight:bold;left:" + x + "px;top:" + y + "px;'>" + text + "<div style='z-index:7000;position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;'><img id=" + $scope.i + " class='dynCross' src='/AIA/content/images/speeachBubbleClose.png'></div></div><div style='position:absolute;border:1px solid #000;display:none;z-index:9000;' id='bord" + $scope.i + "'></div></div>"); | |
2032 | + } | |
1869 | 2033 | } |
1870 | 2034 | else { |
1871 | 2035 | |
... | ... | @@ -1916,10 +2080,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1916 | 2080 | $(".com").css("display", "none"); |
1917 | 2081 | $("#bord").css({ "width": "0px", "display": "none" }); |
1918 | 2082 | |
1919 | - if (text.length > 12) { | |
2083 | + if (text.length <= 17) { | |
1920 | 2084 | |
1921 | 2085 | $('<div id="dot" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' |
1922 | - + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;width:12%;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;"><span>' + text + '</span>' | |
2086 | + + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;width:10%;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;"><span>' + text + '</span>' | |
1923 | 2087 | + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' |
1924 | 2088 | + '<img class="crossDiv_temp" src="/AIA/content/images/speeachBubbleClose.png"></span></div>' |
1925 | 2089 | |
... | ... | @@ -1927,6 +2091,82 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1927 | 2091 | + '</div>').appendTo('#canvasDiv'); |
1928 | 2092 | |
1929 | 2093 | } |
2094 | + | |
2095 | + else if (text.length > 17 && text.length <= 24) { | |
2096 | + | |
2097 | + | |
2098 | + $('<div id="dot" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' | |
2099 | + + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;width:13%;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;"><span>' + text + '</span>' | |
2100 | + + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
2101 | + + '<img class="crossDiv_temp" src="/AIA/content/images/speeachBubbleClose.png"></span></div>' | |
2102 | + | |
2103 | + + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord">' | |
2104 | + + '</div>').appendTo('#canvasDiv'); | |
2105 | + | |
2106 | + } | |
2107 | + else if (text.length > 24 && text.length <= 31) { | |
2108 | + | |
2109 | + | |
2110 | + $('<div id="dot" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' | |
2111 | + + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;width:16%;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;"><span>' + text + '</span>' | |
2112 | + + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
2113 | + + '<img class="crossDiv_temp" src="/AIA/content/images/speeachBubbleClose.png"></span></div>' | |
2114 | + | |
2115 | + + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord">' | |
2116 | + + '</div>').appendTo('#canvasDiv'); | |
2117 | + | |
2118 | + } | |
2119 | + else if (text.length > 31 && text.length <= 38) { | |
2120 | + | |
2121 | + | |
2122 | + $('<div id="dot" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' | |
2123 | + + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;width:19%;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;"><span>' + text + '</span>' | |
2124 | + + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
2125 | + + '<img class="crossDiv_temp" src="/AIA/content/images/speeachBubbleClose.png"></span></div>' | |
2126 | + | |
2127 | + + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord">' | |
2128 | + + '</div>').appendTo('#canvasDiv'); | |
2129 | + | |
2130 | + } | |
2131 | + else if (text.length > 38 && text.length <= 45) { | |
2132 | + | |
2133 | + | |
2134 | + $('<div id="dot" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' | |
2135 | + + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;width:22%;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;"><span>' + text + '</span>' | |
2136 | + + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
2137 | + + '<img class="crossDiv_temp" src="/AIA/content/images/speeachBubbleClose.png"></span></div>' | |
2138 | + | |
2139 | + + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord">' | |
2140 | + + '</div>').appendTo('#canvasDiv'); | |
2141 | + | |
2142 | + } | |
2143 | + | |
2144 | + else if (text.length > 45 && text.length <= 51) { | |
2145 | + | |
2146 | + | |
2147 | + $('<div id="dot" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' | |
2148 | + + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;width:25%;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;"><span>' + text + '</span>' | |
2149 | + + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
2150 | + + '<img class="crossDiv_temp" src="/AIA/content/images/speeachBubbleClose.png"></span></div>' | |
2151 | + | |
2152 | + + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord">' | |
2153 | + + '</div>').appendTo('#canvasDiv'); | |
2154 | + | |
2155 | + } | |
2156 | + | |
2157 | + else if (text.length > 51 && text.length <= 62) { | |
2158 | + | |
2159 | + | |
2160 | + $('<div id="dot" style="position:absolute;height:15px;width:35px;display:none;z-index:10000;border-top:2px solid #000;transform:rotate(40deg);-moz-transform:rotate(40deg);-o-transform:rotate(40deg);-ms-transform:rotate(40deg);-webkit-transform:rotate(40deg);"></div>' | |
2161 | + + '<div id="sppeachBubble" style="height:auto!important;z-index:10000;margin-left:25px;border:1px solid #000;display:none;padding:5px 10px;width:29%;position:absolute;color:#000;text-align:left;font-size:12px;background-color:#fff;font-weight:bold;"><span>' + text + '</span>' | |
2162 | + + '<span style="position:absolute;right:-4px;top:-4px;color:#ffffff;cursor:pointer;">' | |
2163 | + + '<img class="crossDiv_temp" src="/AIA/content/images/speeachBubbleClose.png"></span></div>' | |
2164 | + | |
2165 | + + '<div style="position:absolute;border:1px solid #000;display:none;z-index:9000;" id="bord">' | |
2166 | + + '</div>').appendTo('#canvasDiv'); | |
2167 | + | |
2168 | + } | |
2169 | + | |
1930 | 2170 | else { |
1931 | 2171 | |
1932 | 2172 | |
... | ... | @@ -1978,6 +2218,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1978 | 2218 | |
1979 | 2219 | } |
1980 | 2220 | |
2221 | + | |
2222 | + | |
1981 | 2223 | $scope.angle1 = function (cx1, cy1, ex1, ey1, id, id2) { |
1982 | 2224 | |
1983 | 2225 | // console.log(cx1 + " " + cy1); | ... | ... |