Commit 23a2156a8be12711e35b6bffe6bd93d957daf75c

Authored by Amrita Vishnoi
1 parent ec6ce39f

AnnotationToolBar missing code merged in this.

400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
... ... @@ -175,6 +175,8 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
175 175 $(".btn-annotation-rectangle").addClass("activebtncolor");
176 176 }
177 177 $rootScope.paintBrush = function () {
  178 +
  179 + $('.btnCursor').addClass('activebtncolor');
178 180 $rootScope.switchCanvasToPaintCanvas();
179 181  
180 182 $rootScope.shapeType = "FreeStylePaint";
... ... @@ -258,28 +260,36 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
258 260 $rootScope.shapestyleFillColor = "#fff";
259 261 $rootScope.shapestyleFillBorderColor = "black";
260 262 $rootScope.shapestyleborderWidth = 2;
261   -
  263 + $rootScope.shapestyleborderStyles = "solid";
262 264 $rootScope.shapestyle = function (id) {
263 265  
  266 + document.getElementById('modelbackground').style.display = "none";
  267 +
264 268 $rootScope.shapestyleOpacity = $("#" + id).css('opacity');
265 269 $rootScope.shapestyleFillColor = $("#" + id).parent().css('background-color');
266   - $rootScope.shapestyleFillBorderColor = $("#" + id).parent().css('border');
267   - var a = $rootScope.shapestyleFillBorderColor;
268   - var b = a.split("px");
269   - // alert(b);
270   - $rootScope.shapestyleborderWidth = b[0];
271   -
272   - // alert(b[0]);
273   - //alert(b[1]);
274   - var c = b[1].split("solid");
275   - // alert(c[1]);
276   - $rootScope.shapestyleborderColor = c[1];
  270 + $rootScope.shapestyleborderColor = $("#" + id).parent().css("border-top-color");
  271 + $rootScope.shapestyleborderWidthSeparatingPixel = $("#" + id).parent().css("border-top-width");
  272 + var pixelSeparation = $rootScope.shapestyleborderWidthSeparatingPixel;
  273 + var intPart = pixelSeparation.split("p");
277 274  
  275 + $rootScope.shapestyleborderWidth = intPart[0];
  276 + $rootScope.shapestyleborderStyles = "solid";
278 277  
279   - // alert($rootScope.shapestyleFillColor);
280 278 $('#editshapestyle').modal('hide');
281 279 }
282 280  
  281 + $rootScope.enableAnnotationToolBar = function () {
  282 +
  283 + document.getElementById('modelbackground').style.display = "block";
  284 + $("#editshapestyle").modal('show');
  285 +
  286 + }
  287 +
  288 + $rootScope.disableAnnotationToolBar = function () {
  289 +
  290 + document.getElementById('modelbackground').style.display = "none";
  291 +
  292 + }
283 293  
284 294  
285 295 //----End-------------
... ... @@ -560,7 +570,7 @@ AIA.controller("HomeController", ["$rootScope", "Modules", "$log", "$location",
560 570 var openViewLen = $rootScope.openViews.length;
561 571 var currentOpenViewId = $rootScope.openViews[openViewLen - 1].BodyViewId;
562 572 $rootScope.isSettingEventAlredayDispachted = true;
563   - $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId },true);
  573 + $rootScope.$broadcast('reloadDABodyViewEvent', { reloadDABodyViewId: currentOpenViewId }, true);
564 574 }
565 575 else {
566 576 $rootScope.$broadcast('reloadDAControllerEvent', true);
... ...