Commit 4cc0f451978292b48d47cb03fccaf1f2aa9a50e4
1 parent
1f0696b6
added transparency scale.
1. for lateral arm, transaprency is having issue. 2. transparency scale hide below the titlebar of jspanel.
Showing
3 changed files
with
91 additions
and
19 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js
... | ... | @@ -844,7 +844,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
844 | 844 | |
845 | 845 | var annotationText = $scope.GetAnnotationText(parseInt(RGBColor)); |
846 | 846 | |
847 | - if ($('#speechBubbleTrns').length > 0) | |
847 | + if ($('#speechBubbleTrns').length > 0) | |
848 | 848 | $('#speechBubbleTrns').remove(); |
849 | 849 | |
850 | 850 | if ($('#speechBubble').length > 0) { |
... | ... | @@ -1005,7 +1005,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1005 | 1005 | |
1006 | 1006 | } |
1007 | 1007 | |
1008 | - if ($('#speechBubbleTrns').length > 0) | |
1008 | + if ($('#speechBubbleTrns').length > 0) | |
1009 | 1009 | $('#speechBubbleTrns').remove(); |
1010 | 1010 | |
1011 | 1011 | if ($('#speechBubble').length > 0) { |
... | ... | @@ -1347,7 +1347,7 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1347 | 1347 | |
1348 | 1348 | $scope.isTransparencyActivated = true; |
1349 | 1349 | // alert('transparencyClicked' + $scope.isTransparencyActivated) |
1350 | - document.getElementById('btnTranparency').className = 'transparencySelected' | |
1350 | + $('#btnTranparency').addClass('tButtonActive'); | |
1351 | 1351 | var canvasDiv = document.getElementById('canvasDiv'); |
1352 | 1352 | var verticalScrollPosition = canvasDiv.scrollTop; |
1353 | 1353 | var horizontlScrollPosition = canvasDiv.scrollLeft; |
... | ... | @@ -1506,7 +1506,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1506 | 1506 | |
1507 | 1507 | $(".ui-wrapper").css("z-index", "6000"); |
1508 | 1508 | |
1509 | - // $('#transparencyScale').modal('show'); | |
1509 | + // $('#transparencyScale').modal('show'); | |
1510 | + | |
1510 | 1511 | //canvasDiv.removeEventListener('mouseup', arguments.callee); |
1511 | 1512 | //canvasDiv.removeEventListener('mousedown', arguments.callee); |
1512 | 1513 | //canvasDiv.removeEventListener('mousemove', arguments.callee); |
... | ... | @@ -1519,9 +1520,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1519 | 1520 | } |
1520 | 1521 | }) |
1521 | 1522 | |
1522 | - $('#transparencyScale').modal('show'); | |
1523 | + // $('#transparencyScale').modal('show'); | |
1524 | + $('#transparencyScale').css('position', 'absolute') | |
1525 | + $('#transparencyScale').css('top', parseInt(transparencyCanvas.style.top) - 100) | |
1526 | + $('#transparencyScale').css('left', parseInt(transparencyCanvas.style.left)) | |
1527 | + $('#transparencyScale').css('visibility', 'visible') | |
1528 | + $('#transparencyScale').css("z-index", "9000") | |
1529 | + | |
1530 | + | |
1531 | + | |
1523 | 1532 | |
1524 | 1533 | document.getElementById('canvasDiv').removeEventListener("mouseup", mouseUpListener); |
1534 | + $('#btnTranparency').removeClass('btn-black'); | |
1535 | + | |
1536 | + $('#btnTranparency').addClass('tButtonActive'); | |
1525 | 1537 | } |
1526 | 1538 | |
1527 | 1539 | $scope.loadTransparencyImage = function(bodyRegionId, Height, Width, X, Y, IsMirror, TransparencyBoxStartX, TransparencyEndX, TransparencyBoxStartY, TransparencyBoxEndY, scope, isLayerChanged, isTransparencyChanged) { |
... | ... | @@ -1642,19 +1654,20 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
1642 | 1654 | |
1643 | 1655 | var ctx = document.getElementById('transparencyCanvas').getContext('2d'); |
1644 | 1656 | |
1645 | - var image = ctx.getImageData(XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage); | |
1657 | + var imageDa = ctx.getImageData(XforTransImage, YforTransImage, WidthforTransImage, HeightforTransImage); | |
1646 | 1658 | |
1647 | 1659 | // get the image data values |
1648 | - var imageData = image.data; | |
1660 | + var imageData = imageDa.data; | |
1649 | 1661 | var length = imageData.length; |
1650 | 1662 | // set every fourth value to 50 |
1651 | 1663 | for (var i = 3; i < length; i += 4) { |
1652 | 1664 | imageData[i] = ((255) * (parseInt(transNumber))) / 100; |
1653 | 1665 | } |
1654 | 1666 | // after the manipulation, reset the data |
1655 | - image.data = imageData; | |
1667 | + // imageDa.data = imageData; | |
1656 | 1668 | // and put the imagedata back to the canvas |
1657 | - ctx.putImageData(image, XforTransImage, YforTransImage); | |
1669 | + ctx.putImageData(imageDa, XforTransImage, YforTransImage); | |
1670 | + | |
1658 | 1671 | |
1659 | 1672 | } |
1660 | 1673 | else { |
... | ... | @@ -2268,8 +2281,8 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2268 | 2281 | |
2269 | 2282 | |
2270 | 2283 | $scope.onTransparencyChange = function(ev, ui){ |
2271 | - debugger; | |
2272 | - alert('t change') | |
2284 | + //debugger; | |
2285 | + // alert('t change') | |
2273 | 2286 | $scope.transNumber = ui.value; |
2274 | 2287 | |
2275 | 2288 | var tCanvas = document.getElementById('transparencyCanvas'); |
... | ... | @@ -2335,9 +2348,10 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2335 | 2348 | while (elements.length > 0) { |
2336 | 2349 | elements[0].parentNode.removeChild(elements[0]); |
2337 | 2350 | } |
2338 | - var txtTransparencyChange = document.getElementById("txtTransparencyChange"); | |
2339 | - txtTransparencyChange.value = 0; | |
2340 | - document.getElementById('txtLayerNumber').value = 0; | |
2351 | + //var txtTransparencyChange = document.getElementById("txtTransparencyChange"); | |
2352 | + //txtTransparencyChange.value = 0; | |
2353 | + // document.getElementById('txtLayerNumber').value = 0; | |
2354 | + $("#txtlayerNumber").val(0); | |
2341 | 2355 | $('#sliderHandle').tabindex = 0; |
2342 | 2356 | if (document.getElementById('tempCanvas') != null) { |
2343 | 2357 | $('#tempCanvas').remove(); |
... | ... | @@ -2351,8 +2365,13 @@ function ($scope, $rootScope, $compile, $http, $log, $location, $timeout, DA, Mo |
2351 | 2365 | $scope.isTransparencyActivated = false; |
2352 | 2366 | //}) |
2353 | 2367 | } |
2368 | + $('#transparencyScale').css('visibility', 'hidden') | |
2369 | + | |
2370 | + // document.getElementById('btnTranparency').className = 't-transparency' | |
2371 | + $('#btnTranparency').removeClass('tButtonActive'); | |
2372 | + $('#btnTranparency').addClass('btn-black'); | |
2354 | 2373 | document.getElementById('btnTranparency').removeEventListener("click", onTransparencyButtonClick); |
2355 | - document.getElementById('btnTranparency').className = 't-transparency' | |
2374 | + | |
2356 | 2375 | } |
2357 | 2376 | |
2358 | 2377 | $scope.createSpeechBubbleOnTransparencyBox = function (event, text1, text2, x, y) { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/views/da/da-view.html
... | ... | @@ -128,11 +128,12 @@ |
128 | 128 | </div> |
129 | 129 | <div class="clearfix"></div> |
130 | 130 | |
131 | - <div class="modal fade bs-example-modal-sm" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" id="transparencyScale"> | |
131 | + <!--to prevent transparency scale from closing on click anywhere outside set data-backdrop="static" data-keyboard="false" --> | |
132 | + <!--<div class="modal fade bs-example-modal-sm" tabindex="-1" aria-labelledby="mySmallModalLabel" id="transparencyScale" data-backdrop="static" data-keyboard="false"> | |
132 | 133 | <div class="modal-dialog modal-sm"> |
133 | 134 | <div class="modal-content"> |
134 | 135 | <div class="modal-header annotation-modal-header"> |
135 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="CloseTransparencyBox()"><span aria-hidden="true">×</span></button> | |
136 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="CloseTransparencyBox()"><span aria-hidden="true">×</span></button> | |
136 | 137 | <h4 class="modal-title">Transparency</h4> |
137 | 138 | </div> |
138 | 139 | <div class="modal-body"> |
... | ... | @@ -146,8 +147,45 @@ |
146 | 147 | </div> |
147 | 148 | </div> |
148 | 149 | </div> |
150 | + </div>--> | |
151 | + <!--<div class="ui-widget-content" id="transparencyScale" style="width: 350px; height: 130px;visibility:hidden;display:block;float:left"> | |
152 | + <div class="modal-dialog modal-sm"> | |
153 | + <div class="modal-content"> | |
154 | + <div class="modal-header annotation-modal-header"> | |
155 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="CloseTransparencyBox()"><span aria-hidden="true">×</span></button> | |
156 | + <h4>Transparency</h4> | |
157 | + </div> | |
158 | + <div> | |
159 | + <div class="row"> | |
160 | + <div class="col-sm-12"> | |
161 | + <div class="padded25"> | |
162 | + <div class="slider"></div> | |
163 | + </div> | |
164 | + </div> | |
165 | + </div> | |
166 | + </div> | |
167 | + </div> | |
168 | + </div> | |
169 | + </div>--> | |
170 | + <div class="ui-widget-content" id="transparencyScale" style="width: 350px; height: 150px;visibility:hidden;display:block;float:left"> | |
171 | + <div > | |
172 | + <div > | |
173 | + <div class="modal-header annotation-modal-header"> | |
174 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close" ng-click="CloseTransparencyBox()"><span aria-hidden="true">×</span></button> | |
175 | + <h4>Transparency</h4> | |
176 | + </div> | |
177 | + <div> | |
178 | + <div class="row"> | |
179 | + <div class="col-sm-12"> | |
180 | + <div class="padded25"> | |
181 | + <div class="slider"></div> | |
182 | + </div> | |
183 | + </div> | |
184 | + </div> | |
185 | + </div> | |
186 | + </div> | |
187 | + </div> | |
149 | 188 | </div> |
150 | - | |
151 | 189 | </div> |
152 | 190 | <script> |
153 | 191 | $(window).load(function () { |
... | ... | @@ -210,7 +248,11 @@ $(window).load(function () { |
210 | 248 | |
211 | 249 | </script> |
212 | 250 | });--> |
213 | - | |
251 | +<script> | |
252 | + $(function () { | |
253 | + $("#transparencyScale").draggable(); | |
254 | + }); | |
255 | +</script> | |
214 | 256 | |
215 | 257 | <script> |
216 | 258 | $(function () { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/themes/default/css/bootstrap/3.3.6/main.css
... | ... | @@ -697,3 +697,14 @@ textarea { |
697 | 697 | width: 100px; / width of the spinner gif / |
698 | 698 | height: 102px; /*hight of the spinner gif +2px to fix IE8 issue */ |
699 | 699 | } |
700 | + | |
701 | +/*to make the background fully visible on transparency box draw*/ | |
702 | +.modal-backdrop.in { | |
703 | + opacity: 0; | |
704 | +} | |
705 | + | |
706 | +.tButtonActive { | |
707 | + background-color: #1B92D0; | |
708 | + border-color: #1B92D0; | |
709 | + color: #ffffff; | |
710 | +} | |
700 | 711 | \ No newline at end of file | ... | ... |