Commit 44d0a50538fccc2a2632216dce836e664368ce68

Authored by unknown
1 parent 43203ab4

Implemented Identity Functionality in Annotation ToolBar

400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -904,8 +904,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
904 904 }
905 905 $rootScope.CIAnotationIdentifyModeOff = false;
906 906 $rootScope.OnIdentifyClick = function () {
907   -
908   -
  907 +
909 908 $("#OnIdentify").addClass("annotationtoolbartab");
910 909 $("#DrawMode").removeClass("annotationtoolbartab");
911 910  
... ... @@ -943,6 +942,27 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
943 942 $("#aaDetailViewCanvas").css("z-index", a);
944 943 }
945 944  
  945 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  946 +
  947 + for (var j = 0; j <= $rootScope.aaPinDataArray.length - 1; j++) {
  948 +
  949 + if (($rootScope.jcanvasObjectArray[i].x <= parseInt($rootScope.aaPinDataArray[j]._HeadX) && $rootScope.jcanvasObjectArray[i].y <= parseInt($rootScope.aaPinDataArray[j]._HeadY)) && (($rootScope.jcanvasObjectArray[i].x + $rootScope.jcanvasObjectArray[i].width) >= parseInt($rootScope.aaPinDataArray[j]._HeadX) && ($rootScope.jcanvasObjectArray[i].y + $rootScope.jcanvasObjectArray[i].height) >= parseInt($rootScope.aaPinDataArray[j]._HeadY)) || ($rootScope.jcanvasObjectArray[i].x <= parseInt($rootScope.aaPinDataArray[j]._PinX) && $rootScope.jcanvasObjectArray[i].y <= parseInt($rootScope.aaPinDataArray[j]._PinY)) && (($rootScope.jcanvasObjectArray[i].x + $rootScope.jcanvasObjectArray[i].width) >= parseInt($rootScope.aaPinDataArray[j]._PinX) && ($rootScope.jcanvasObjectArray[i].y + $rootScope.jcanvasObjectArray[i].height) >= parseInt($rootScope.aaPinDataArray[j]._PinY))) {
  950 +
  951 + var pinName = 'Pin_' + $rootScope.aaPinDataArray[j]._PinId;
  952 + var pinArcName = 'PinArc_' + $rootScope.aaPinDataArray[j]._PinId;
  953 +
  954 + $('#aaDetailViewCanvas').setLayer(pinName, {
  955 + visible: false // set to true instead to show the layer again
  956 + }).drawLayers();
  957 +
  958 + $('#aaDetailViewCanvas').setLayer(pinArcName, {
  959 + visible: false // set to true instead to show the layer again
  960 + }).drawLayers();
  961 +
  962 + }
  963 + }
  964 + }
  965 +
946 966 }
947 967 }
948 968  
... ... @@ -1039,6 +1059,27 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1039 1059  
1040 1060 $rootScope.switchToAACanvas();
1041 1061  
  1062 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  1063 +
  1064 + for (var j = 0; j <= $rootScope.aaPinDataArray.length - 1; j++) {
  1065 +
  1066 + if (($rootScope.jcanvasObjectArray[i].x <= parseInt($rootScope.aaPinDataArray[j]._HeadX) && $rootScope.jcanvasObjectArray[i].y <= parseInt($rootScope.aaPinDataArray[j]._HeadY)) && (($rootScope.jcanvasObjectArray[i].x + $rootScope.jcanvasObjectArray[i].width) >= parseInt($rootScope.aaPinDataArray[j]._HeadX) && ($rootScope.jcanvasObjectArray[i].y + $rootScope.jcanvasObjectArray[i].height) >= parseInt($rootScope.aaPinDataArray[j]._HeadY)) || ($rootScope.jcanvasObjectArray[i].x <= parseInt($rootScope.aaPinDataArray[j]._PinX) && $rootScope.jcanvasObjectArray[i].y <= parseInt($rootScope.aaPinDataArray[j]._PinY)) && (($rootScope.jcanvasObjectArray[i].x + $rootScope.jcanvasObjectArray[i].width) >= parseInt($rootScope.aaPinDataArray[j]._PinX) && ($rootScope.jcanvasObjectArray[i].y + $rootScope.jcanvasObjectArray[i].height) >= parseInt($rootScope.aaPinDataArray[j]._PinY))) {
  1067 +
  1068 + var pinName = 'Pin_' + $rootScope.aaPinDataArray[j]._PinId;
  1069 + var pinArcName = 'PinArc_' + $rootScope.aaPinDataArray[j]._PinId;
  1070 +
  1071 + $('#aaDetailViewCanvas').setLayer(pinName, {
  1072 + visible: true // set to true instead to show the layer again
  1073 + }).drawLayers();
  1074 +
  1075 + $('#aaDetailViewCanvas').setLayer(pinArcName, {
  1076 + visible: true // set to true instead to show the layer again
  1077 + }).drawLayers();
  1078 +
  1079 + }
  1080 + }
  1081 + }
  1082 +
1042 1083 }
1043 1084  
1044 1085 }
... ... @@ -1746,9 +1787,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1746 1787 $(".btn-annotation").removeClass("activebtncolor");
1747 1788 $('.btnCursor').addClass('activebtncolor');
1748 1789 }
1749   -
  1790 + $rootScope.jcanvasObjectArray = [];
1750 1791 $rootScope.DrawRectangleOnModuleItem = function (canvasId, RectNumber, shapestyleFillColor, shapestyleborderColor, shapestyleOpacity, shapestyleborderWidth, offsetX1, offsetY1, x, y) {
1751   -
1752 1792 if ($rootScope.isRectanglePreviewCompleted == true) {
1753 1793 $rootScope.isRectanglePreviewCompleted = false;
1754 1794 $(canvasId).addLayer({
... ... @@ -1766,11 +1806,44 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1766 1806 height: Math.abs(y - offsetY1),
1767 1807  
1768 1808 resizeFromCenter: false,
1769   -
  1809 + add: function (layer) {
  1810 +
  1811 + if ($location.path() == "/module-item-view") {
  1812 + $rootScope.jcanvasObjectArray.push({ "name": layer.name, "x": layer.x, "y": layer.y, "width": layer.width, "height": layer.height });
  1813 + }
  1814 + },
1770 1815 dblclick: function () {
1771 1816  
1772 1817 },
1773   -
  1818 + dragstop: function (layer) {
  1819 +
  1820 + if ($location.path() == "/module-item-view") {
  1821 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  1822 + if ($rootScope.jcanvasObjectArray[i].name == layer.name) {
  1823 + $rootScope.jcanvasObjectArray[i].x = layer.x;
  1824 + $rootScope.jcanvasObjectArray[i].y = layer.y;
  1825 + $rootScope.jcanvasObjectArray[i].width = layer.width;
  1826 + $rootScope.jcanvasObjectArray[i].height = layer.height;
  1827 + }
  1828 + }
  1829 + }
  1830 + },
  1831 + change: function (layer) {
  1832 +
  1833 + if ($location.path() == "/module-item-view") {
  1834 + if ($rootScope.isRectangleInAAClicked == true) {
  1835 + $rootScope.isRectangleInAAClicked = false;
  1836 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  1837 + if ($rootScope.jcanvasObjectArray[i].name == layer.name) {
  1838 + $rootScope.jcanvasObjectArray[i].x = layer.x;
  1839 + $rootScope.jcanvasObjectArray[i].y = layer.y;
  1840 + $rootScope.jcanvasObjectArray[i].width = layer.width;
  1841 + $rootScope.jcanvasObjectArray[i].height = layer.height;
  1842 + }
  1843 + }
  1844 + }
  1845 + }
  1846 + },
1774 1847 click: function (layer) {
1775 1848 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
1776 1849 //jcanvas property
... ... @@ -1783,8 +1856,13 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1783 1856 fillStyle: '#fff',
1784 1857 strokeStyle: '#c33',
1785 1858 strokeWidth: 2,
1786   - width: 5, height: 5,
1787   - cornerRadius: 3
  1859 + width: 10, height: 10,
  1860 + cornerRadius: 3,
  1861 + click: function () {
  1862 + if ($location.path() == "/module-item-view") {
  1863 + $rootScope.isRectangleInAAClicked = true;
  1864 + }
  1865 + }
1788 1866 }
1789 1867 }).drawLayers();
1790 1868 }
... ... @@ -1794,6 +1872,7 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1794 1872 }
1795 1873 },
1796 1874 mouseout: function (layer) {
  1875 +
1797 1876 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
1798 1877 //jcanvas property
1799 1878 layer.draggable = true;
... ... @@ -1805,7 +1884,8 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1805 1884 strokeStyle: 'yellow',
1806 1885 strokeWidth: 0,
1807 1886 width: 0, height: 0,
1808   - cornerRadius: 0
  1887 + cornerRadius: 0,
  1888 +
1809 1889 }
1810 1890  
1811 1891 }).drawLayers();
... ... @@ -1826,8 +1906,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1826 1906 fillStyle: '#fff',
1827 1907 strokeStyle: '#c33',
1828 1908 strokeWidth: 2,
1829   - width: 5, height: 5,
1830   - cornerRadius: 3
  1909 + width: 10, height: 10,
  1910 + cornerRadius: 3,
  1911 + click: function () {
  1912 + if ($location.path() == "/module-item-view") {
  1913 + $rootScope.isRectangleInAAClicked = true;
  1914 + }
  1915 + }
  1916 +
1831 1917 }
1832 1918 }).drawLayers();
1833 1919 }
... ... @@ -1864,6 +1950,41 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1864 1950 // Place a handle at each side and each corner
1865 1951 resizeFromCenter: false,
1866 1952 handlePlacement: 'both',
  1953 + add: function (layer) {
  1954 +
  1955 + if ($location.path() == "/module-item-view") {
  1956 + $rootScope.jcanvasObjectArray.push({ "name": layer.name, "x": layer.x, "y": layer.y, "width": layer.width, "height": layer.height });
  1957 + }
  1958 + },
  1959 + dragstop: function (layer) {
  1960 +
  1961 + if ($location.path() == "/module-item-view") {
  1962 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  1963 + if ($rootScope.jcanvasObjectArray[i].name == layer.name) {
  1964 + $rootScope.jcanvasObjectArray[i].x = layer.x;
  1965 + $rootScope.jcanvasObjectArray[i].y = layer.y;
  1966 + $rootScope.jcanvasObjectArray[i].width = layer.width;
  1967 + $rootScope.jcanvasObjectArray[i].height = layer.height;
  1968 + }
  1969 + }
  1970 + }
  1971 + },
  1972 + change: function (layer) {
  1973 +
  1974 + if ($location.path() == "/module-item-view") {
  1975 + if ($rootScope.isRectangleInAAClicked == true) {
  1976 + $rootScope.isRectangleInAAClicked = false;
  1977 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  1978 + if ($rootScope.jcanvasObjectArray[i].name == layer.name) {
  1979 + $rootScope.jcanvasObjectArray[i].x = layer.x;
  1980 + $rootScope.jcanvasObjectArray[i].y = layer.y;
  1981 + $rootScope.jcanvasObjectArray[i].width = layer.width;
  1982 + $rootScope.jcanvasObjectArray[i].height = layer.height;
  1983 + }
  1984 + }
  1985 + }
  1986 + }
  1987 + },
1867 1988 click: function (layer) {
1868 1989 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
1869 1990 //jcanvas property
... ... @@ -1876,7 +1997,12 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1876 1997 fillStyle: '#fff',
1877 1998 strokeStyle: '#c33',
1878 1999 strokeWidth: 2,
1879   - radius: 3
  2000 + radius: 7,
  2001 + click: function () {
  2002 + if ($location.path() == "/module-item-view") {
  2003 + $rootScope.isRectangleInAAClicked = true;
  2004 + }
  2005 + }
1880 2006 }
1881 2007 }).drawLayers();
1882 2008 }
... ... @@ -1919,7 +2045,13 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
1919 2045 strokeStyle: '#c33',
1920 2046 strokeWidth: 2,
1921 2047 // width: 5, height: 5,
1922   - radius: 3
  2048 + radius: 7,
  2049 + click: function () {
  2050 + if ($location.path() == "/module-item-view") {
  2051 +
  2052 + $rootScope.isRectangleInAAClicked = true;
  2053 + }
  2054 + }
1923 2055 }
1924 2056 }).drawLayers();
1925 2057 }
... ... @@ -2196,10 +2328,47 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2196 2328  
2197 2329 $rootScope.TextAreaRectID = layer.name;
2198 2330 $rootScope.rectDimension.push({ width: layer.width, height: layer.height, x: layer.x, y: layer.y });
  2331 +
  2332 + if ($location.path() == "/module-item-view") {
  2333 + $rootScope.jcanvasObjectArray.push({ "name": layer.name, "x": layer.x, "y": layer.y, "width": layer.width, "height": layer.height });
  2334 + }
  2335 +
  2336 +
2199 2337 // $rootScope.CurrentWidth = layer.width;
2200 2338 // $rootScope.CurrentHeight = layer.height;
2201 2339  
2202 2340 },
  2341 +
  2342 + dragstop: function (layer) {
  2343 +
  2344 + if ($location.path() == "/module-item-view") {
  2345 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  2346 + if ($rootScope.jcanvasObjectArray[i].name == layer.name) {
  2347 + $rootScope.jcanvasObjectArray[i].x = layer.x;
  2348 + $rootScope.jcanvasObjectArray[i].y = layer.y;
  2349 + $rootScope.jcanvasObjectArray[i].width = layer.width;
  2350 + $rootScope.jcanvasObjectArray[i].height = layer.height;
  2351 + }
  2352 + }
  2353 + }
  2354 + },
  2355 + change: function (layer) {
  2356 +
  2357 + if ($location.path() == "/module-item-view") {
  2358 + if ($rootScope.isRectangleInAAClicked == true) {
  2359 + $rootScope.isRectangleInAAClicked = false;
  2360 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  2361 + if ($rootScope.jcanvasObjectArray[i].name == layer.name) {
  2362 + $rootScope.jcanvasObjectArray[i].x = layer.x;
  2363 + $rootScope.jcanvasObjectArray[i].y = layer.y;
  2364 + $rootScope.jcanvasObjectArray[i].width = layer.width;
  2365 + $rootScope.jcanvasObjectArray[i].height = layer.height;
  2366 + }
  2367 + }
  2368 + }
  2369 + }
  2370 + },
  2371 +
2203 2372 click: function (layer) {
2204 2373 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
2205 2374 //jcanvas property
... ... @@ -2212,8 +2381,13 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2212 2381 fillStyle: '#fff',
2213 2382 strokeStyle: '#c33',
2214 2383 strokeWidth: 2,
2215   - width: 5, height: 5,
2216   - cornerRadius: 3
  2384 + width: 10, height: 10,
  2385 + cornerRadius: 3,
  2386 + click: function () {
  2387 + if ($location.path() == "/module-item-view") {
  2388 + $rootScope.isRectangleInAAClicked = true;
  2389 + }
  2390 + }
2217 2391 }
2218 2392 }).drawLayers();
2219 2393 }
... ... @@ -2296,8 +2470,13 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2296 2470 fillStyle: '#fff',
2297 2471 strokeStyle: '#c33',
2298 2472 strokeWidth: 2,
2299   - width: 5, height: 5,
2300   - cornerRadius: 3
  2473 + width: 10, height: 10,
  2474 + cornerRadius: 3,
  2475 + click: function () {
  2476 + if ($location.path() == "/module-item-view") {
  2477 + $rootScope.isRectangleInAAClicked = true;
  2478 + }
  2479 + }
2301 2480 }
2302 2481 }).drawLayers();
2303 2482  
... ... @@ -2597,7 +2776,24 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2597 2776 var TextAreaLayerName = layer.name;
2598 2777 var TextAreaLayerNameAftrSplit = TextAreaLayerName.split("_");
2599 2778 $rootScope.postFixLayerNumber = TextAreaLayerNameAftrSplit[1];
  2779 + if ($location.path() == "/module-item-view") {
  2780 + $rootScope.jcanvasObjectArray.push({ "name": layer.name, "x": layer.x, "y": layer.y, "width": layer.width, "height": layer.height });
  2781 + }
2600 2782 },
  2783 + dragstop: function (layer) {
  2784 +
  2785 + if ($location.path() == "/module-item-view") {
  2786 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  2787 + if ($rootScope.jcanvasObjectArray[i].name == layer.name) {
  2788 + $rootScope.jcanvasObjectArray[i].x = layer.x;
  2789 + $rootScope.jcanvasObjectArray[i].y = layer.y;
  2790 + $rootScope.jcanvasObjectArray[i].width = layer.width;
  2791 + $rootScope.jcanvasObjectArray[i].height = layer.height;
  2792 + }
  2793 + }
  2794 + }
  2795 + },
  2796 +
2601 2797 click: function (layer) {
2602 2798  
2603 2799 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
... ... @@ -2616,8 +2812,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2616 2812 fillStyle: '#fff',
2617 2813 strokeStyle: '#c33',
2618 2814 strokeWidth: 2,
2619   - width: 7, height: 7,
2620   - cornerRadius: 3
  2815 + width: 10, height: 10,
  2816 + cornerRadius: 3,
  2817 + click: function () {
  2818 + debugger;
  2819 + if ($location.path() == "/module-item-view") {
  2820 + $rootScope.isRectangleInAAClicked = true;
  2821 + }
  2822 + }
2621 2823  
2622 2824 }
2623 2825 }).drawLayers();
... ... @@ -2804,10 +3006,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2804 3006 fillStyle: '#fff',
2805 3007 strokeStyle: '#c33',
2806 3008 strokeWidth: 2,
2807   - width: 7, height: 7,
  3009 + width: 10, height: 10,
2808 3010 cornerRadius: 3,
2809 3011 click: function () {
  3012 + debugger
2810 3013 $rootScope.isTextAReaRectangleClicked = true;
  3014 + if ($location.path() == "/module-item-view") {
  3015 + $rootScope.isRectangleInAAClicked = true;
  3016 + }
2811 3017 }
2812 3018  
2813 3019 }
... ... @@ -2831,12 +3037,27 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2831 3037 x: layer.x,
2832 3038 y: layer.y
2833 3039 });
2834   -
2835 3040 //}
2836 3041 $rootScope.textXAxisAftrResize = layer.x;
2837 3042 $rootScope.textYAxisAftrResize = layer.y;
2838 3043 }
2839 3044 }
  3045 +
  3046 + if ($location.path() == "/module-item-view") {
  3047 +
  3048 + if ($rootScope.isRectangleInAAClicked == true) {
  3049 + $rootScope.isRectangleInAAClicked = false;
  3050 + debugger;
  3051 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  3052 + if ($rootScope.jcanvasObjectArray[i].name == layer.name) {
  3053 + $rootScope.jcanvasObjectArray[i].x = layer.x;
  3054 + $rootScope.jcanvasObjectArray[i].y = layer.y;
  3055 + $rootScope.jcanvasObjectArray[i].width = layer.width;
  3056 + $rootScope.jcanvasObjectArray[i].height = layer.height;
  3057 + }
  3058 + }
  3059 + }
  3060 + }
2840 3061 }
2841 3062  
2842 3063 }).drawText({
... ... @@ -2937,6 +3158,22 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2937 3158 var TextAreaLayerName = layer.name;
2938 3159 var TextAreaLayerNameAftrSplit = TextAreaLayerName.split("_");
2939 3160 $rootScope.postFixLayerNumberAftrEdit = TextAreaLayerNameAftrSplit[1];
  3161 + if ($location.path() == "/module-item-view") {
  3162 + $rootScope.jcanvasObjectArray.push({ "name": layer.name, "x": layer.x, "y": layer.y, "width": layer.width, "height": layer.height });
  3163 + }
  3164 + },
  3165 + dragstop: function (layer) {
  3166 +
  3167 + if ($location.path() == "/module-item-view") {
  3168 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  3169 + if ($rootScope.jcanvasObjectArray[i].name == layer.name) {
  3170 + $rootScope.jcanvasObjectArray[i].x = layer.x;
  3171 + $rootScope.jcanvasObjectArray[i].y = layer.y;
  3172 + $rootScope.jcanvasObjectArray[i].width = layer.width;
  3173 + $rootScope.jcanvasObjectArray[i].height = layer.height;
  3174 + }
  3175 + }
  3176 + }
2940 3177 },
2941 3178 click: function (layer) {
2942 3179 if ($rootScope.isAnnotaionToolBarDrawingModeActive == true) {
... ... @@ -2956,8 +3193,16 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
2956 3193 fillStyle: '#fff',
2957 3194 strokeStyle: '#c33',
2958 3195 strokeWidth: 2,
2959   - width: 7, height: 7,
2960   - cornerRadius: 3
  3196 + width: 10, height: 10,
  3197 + cornerRadius: 3,
  3198 + click: function () {
  3199 + debugger;
  3200 +
  3201 + if ($location.path() == "/module-item-view") {
  3202 + $rootScope.isRectangleInAAClicked = true;
  3203 + }
  3204 + }
  3205 +
2961 3206 }
2962 3207 }).drawLayers();
2963 3208 }
... ... @@ -3097,10 +3342,14 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3097 3342 fillStyle: '#fff',
3098 3343 strokeStyle: '#c33',
3099 3344 strokeWidth: 2,
3100   - width: 7, height: 7,
  3345 + width: 10, height: 10,
3101 3346 cornerRadius: 3,
3102 3347 click: function () {
3103 3348 $rootScope.isTextAReaRectangleClickedAftrEdit = true;
  3349 + if ($location.path() == "/module-item-view") {
  3350 + debugger;
  3351 + $rootScope.isRectangleInAAClicked = true;
  3352 + }
3104 3353 }
3105 3354 }
3106 3355 }).drawLayers();
... ... @@ -3129,6 +3378,24 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3129 3378 //}
3130 3379 $rootScope.editTextXAxisAftrResize = layer.x;
3131 3380 $rootScope.editTextYAxisAftrResize = layer.y;
  3381 +
  3382 +
  3383 + }
  3384 + }
  3385 +
  3386 + if ($location.path() == "/module-item-view") {
  3387 +
  3388 + if ($rootScope.isRectangleInAAClicked == true) {
  3389 + $rootScope.isRectangleInAAClicked = false;
  3390 + debugger;
  3391 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  3392 + if ($rootScope.jcanvasObjectArray[i].name == layer.name) {
  3393 + $rootScope.jcanvasObjectArray[i].x = layer.x;
  3394 + $rootScope.jcanvasObjectArray[i].y = layer.y;
  3395 + $rootScope.jcanvasObjectArray[i].width = layer.width;
  3396 + $rootScope.jcanvasObjectArray[i].height = layer.height;
  3397 + }
  3398 + }
3132 3399 }
3133 3400 }
3134 3401 }
... ... @@ -3205,14 +3472,30 @@ function ($rootScope, Modules, $log, $location, $timeout, DataService, Authentic
3205 3472 $("#canvas").removeLayer($rootScope.canvasLayerNameCollection[0].textareaRectangle).drawLayers();
3206 3473 $("#canvas").removeLayer($rootScope.canvasLayerNameCollection[0].textareaString).drawLayers();
3207 3474 $rootScope.shapeTypeText = "";
  3475 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
  3476 +
  3477 + if ($rootScope.canvasLayerNameCollection[0].textareaRectangle == $rootScope.jcanvasObjectArray[i].name) {
  3478 +
  3479 + $rootScope.jcanvasObjectArray.splice(i, 1);
  3480 +
  3481 + }
  3482 + // console.log($rootScope.jcanvasObjectArray);
  3483 + }
3208 3484  
3209 3485 }
3210 3486 else {
3211 3487  
3212 3488 $("#canvas").removeLayer($rootScope.canvasLayerNameCollection).drawLayers();
3213   - }
  3489 + if ($location.path() == "/module-item-view") {
  3490 + for (var i = 0; i <= $rootScope.jcanvasObjectArray.length - 1; i++) {
3214 3491  
  3492 + if ($rootScope.canvasLayerNameCollection == $rootScope.jcanvasObjectArray[i].name) {
3215 3493  
  3494 + $rootScope.jcanvasObjectArray.splice(i, 1);
  3495 + }
  3496 + }
  3497 + }
  3498 + }
3216 3499 }
3217 3500  
3218 3501 });
... ...
400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
... ... @@ -173,8 +173,8 @@
173 173 <div class="row">
174 174  
175 175 <div class=" col-sm-12 img-thumbnail canvasDivClass" id="canvasDiv" style="overflow: scroll;">
176   - <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="3248" class="canvas-annotationStyle1"></canvas>
177   - <canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="2277" height="3248" class="canvas-annotationStyle"></canvas>
  176 + <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="2277" height="725" class="canvas-annotationStyle1"></canvas>
  177 + <canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="2277" height="725" class="canvas-annotationStyle"></canvas>
178 178  
179 179 <img id="modItemImage" alt="" title="" style="left:0px;top:0px;position:absolute">
180 180 <!--<div class="clearfix">
... ...