Commit 31fa4f5cc2cefcb7a6dcbe2b7e4436210c354449
1 parent
1f6c80dc
Updated CI module and Admin user form
Showing
1 changed file
with
20 additions
and
4 deletions
400-SOURCECODE/AIAHTML5.Web/app/controllers/AIController.js
... | ... | @@ -721,9 +721,9 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
721 | 721 | theme: 'success', |
722 | 722 | currentController: 'AIController', |
723 | 723 | parentSlug: 'ADAM-images', |
724 | - content: '<div class="col-sm-12"><div class="container-fluid"><div class="row"><div class=" col-sm-12 img-thumbnail canvasDivClass" id="canvasDiv" style="overflow: scroll;" align="center"><canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="1195" height="460" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1; left: 0px;"></canvas> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1195" height="460" class="canvas-annotationStyle1" style="position: absolute;z-index:0; left: 0px;"></canvas>' + | |
724 | + content: '<div class="col-sm-12"><div class="container-fluid"><div class="row"><div class=" col-sm-12 img-thumbnail canvasDivClass" id="canvasDiv" style="overflow: scroll;" align="center"><canvas id="canvas" ng-click="onDrawingCanvasClick($event)" width="1340" class="canvas-annotationStyle" style="position: absolute; background-color: transparent;z-index:1; left: 0px;"></canvas> <canvas id="canvasPaint" ng-click="FreeStylePaint($event)" width="1340" class="canvas-annotationStyle1" style="position: absolute;z-index:0; left: 0px;"></canvas>' + | |
725 | 725 | |
726 | - '<img src="' + $scope.clickedAIImage + '" alt="" title="" class="img-responsive ">' + | |
726 | + '<img src="' + $scope.clickedAIImage + '" alt="" title="" id="aimage" class="img-responsive ">' + | |
727 | 727 | '</div>' + |
728 | 728 | '</div></div></div></div>', |
729 | 729 | //ajax: { |
... | ... | @@ -745,8 +745,24 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout |
745 | 745 | $('#aiSpinner').css('visibility', 'hidden'); |
746 | 746 | var canvas = document.getElementById("canvas"); |
747 | 747 | var canvasPaint = document.getElementById("canvasPaint"); |
748 | - //canvas.height = $(".img-thumbnail").height(); | |
749 | - //canvasPaint.height = $(".img-thumbnail").height(); | |
748 | + | |
749 | + var imageheight = $("#aimage").height(); | |
750 | + var canvasDivheight = $(window).outerHeight() - 150; | |
751 | + | |
752 | + if (canvasDivheight > imageheight) | |
753 | + { | |
754 | + canvas.height = canvasDivheight; | |
755 | + canvasPaint.height = canvasDivheight; | |
756 | + } | |
757 | + else | |
758 | + { | |
759 | + canvas.height = imageheight; | |
760 | + canvasPaint.height = imageheight; | |
761 | + } | |
762 | + | |
763 | + canvas.width = $(window).outerWidth() - 81; | |
764 | + canvasPaint.width = $(window).outerWidth() - 81; | |
765 | + | |
750 | 766 | }); |
751 | 767 | $rootScope.currentSlug = 'adam-images-detail'; |
752 | 768 | $rootScope.openViews.push( | ... | ... |