').appendTo('#searchTermListUl_' + windowviewid)
- $compile($e2)($scope);
+ var searchvalue = $("#typedTermName_" + windowviewid).val();
+ var searchfilterdata = $filter('filter')(vocabTermDataArray, searchvalue);
+
+ var totalstructures=0;
+ angular.forEach(searchfilterdata[primaryLexiconIndex].VocabTermData.VocabTerms.Term, function (value2, key2) {
+ totalstructures=totalstructures+1;
+ var $el = $('').appendTo('#searchTermListUl_' + windowviewid);
+ $compile($el)($scope);
+ })
+ var termsTotal = '' + totalstructures + ' Structures';
+ $("#totalTerms").empty();
+ $('#totalTerms').append(termsTotal);
+
$scope.EnableUI();
+
+ if (navigator.userAgent.match(/(iPod|iPhone|iPad|android)/i)) {
+
+ $(document).on("mouseover", "#searchTermListUl_" + windowviewid+ " option", function (e) {
+ $('#searchedTermListPopUp_' + windowviewid).draggable('disable');
+ });
+ $(document).on("click", ".annotation-modal-header", function (e) {
+
+ $('#searchedTermListPopUp_' + windowviewid).draggable('enable');
+
+ });
+ }
+
}
$scope.closeSerachTermListPopUp = function () {
@@ -11682,6 +11571,13 @@ function OnIdentifyClick() {
scope.IdentifyClick(windowviewid);
});
}
+function onDrawingCanvasTouch(event) {
+ console.log('onDrawingCanvasTouch is called ');
+ var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
+ scope.$apply(function () {
+ scope.onDrawingCanvasTouch(event);
+ });
+}
function OnZoom(event) {
var scope = angular.element(document.getElementsByClassName("daBodyView")).scope();
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index f8b24a6..8a42871 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -2535,7 +2535,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
}
-//reset option when load
+ //reset option when load
$rootScope.resetMenuOption = function () {
$timeout(function () {
$rootScope.panelNameWithCb="";
@@ -2732,47 +2732,38 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$rootScope.ShowAnnotationWindow = function () {
var modulePanel = $("#HomeContainerDiv").find("div[id*='ImagePanel']");
- if (modulePanel != undefined && modulePanel.length>0) {
+ if (modulePanel != undefined && modulePanel.length>0) {
for (var index = 0 ; index < modulePanel.length; index++) {
var paneld = modulePanel[index].id;
if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel"))
{
var len = (paneld).split("_").length;
var MultiWinId = (paneld).split("_")[len - 1];
- var PanelElement= $scope.GetPanelElement(paneld);
-
- var canvasElement = PanelElement.canvasElement;
- if (canvasElement == undefined) continue;
-
- $scope.onDrawingCanvasOnModule(canvasElement);
-
+
$rootScope.isAnnotatiomToolBarPopupActive = true;
$rootScope.isAnnotatiomToolBarPopupClosed = false;
$rootScope.isAnnotaionToolBarDrawingModeActive = false;
- if ($rootScope.disableAnnotationtoolOnListManager == true) {
- $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').attr('disabled', 'disabled');
- $('#slider-range-min-2').slider('disable');
- $("#annotationpaintbrushsize").attr('disabled', 'disabled');
- $("#annotationpainteraser").attr('disabled', 'disabled');
-
- }
- else {
- $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');
- $('#slider-range-min-2').slider('enable');
- $("#annotationpaintbrushsize").removeAttr('disabled', 'disabled');
- $("#annotationpainteraser").removeAttr('disabled', 'disabled');
- }
+ if ($rootScope.disableAnnotationtoolOnListManager == true) {
+ $('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').attr('disabled', 'disabled');
+ $('#slider-range-min-2').slider('disable');
+ $("#annotationpaintbrushsize").attr('disabled', 'disabled');
+ $("#annotationpainteraser").attr('disabled', 'disabled');
+
+ }
+ else {
+ $('#AnnotaionPopupDiv').find('input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');
+ $('#slider-range-min-2').slider('enable');
+ $("#annotationpaintbrushsize").removeAttr('disabled', 'disabled');
+ $("#annotationpainteraser").removeAttr('disabled', 'disabled');
+ }
- // $("#annotationpaintbrushsize").attr("href", "#" + canvasPaintId);
- // $("#annotationpainteraser").attr("href", "#" + canvasPaintId);
- $("#annotationpainteraser").removeAttr('disabled', 'disabled');
+ $("#annotationpainteraser").removeAttr('disabled', 'disabled');
$("#OnIdentify").addClass("annotationtoolbartab");
$rootScope.isAnnotationWindowOpen = true;
- $(".annotationTollbar").css("display", "block");
-
+
if(paneld.match("daImagePanel"))
{
$rootScope.daAnnotationToolEvent(MultiWinId);
@@ -2825,11 +2816,22 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
{
$rootScope.picAnnotationToolEvent(MultiWinId);
}
+
+ // var PanelElement= $scope.GetPanelElement(paneld);
+ // var canvasElement = PanelElement.canvasElement;
+ // if (canvasElement == undefined) continue;
+ // $scope.onDrawingCanvasOnModule(canvasElement);
+ // $scope.removeOnDrawingCanvas(canvasElement);
+
}
- }
}
+ $("#annotationTollbar").modal('show');
+ $(".modal-backdrop").css("z-index", "0");
+
+ }
+
var FontFamilyJson = '~/../content/data/json/settings/fontstyle.json';
if ($rootScope.isFontFamilyLoaded == false) {
@@ -2865,7 +2867,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$("#DrawMode").removeClass("annotationtoolbartab");
$('.btnCursor').removeClass('activebtncolor');
- $(".annotationTollbar").css("display", "none");
+ //$(".annotationTollbar").css("display", "none");
+ $("#annotationTollbar").modal('hide');
$rootScope.isAnnotationWindowClose = true;
$('.btnCursor').removeClass('activebtncolor');
$(".btn-annotation").removeClass("activebtncolor");
@@ -2885,8 +2888,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var PanelElement= $scope.GetPanelElement(paneld);
var canvasElement = PanelElement.canvasElement;
$scope.removeOnDrawingCanvas(canvasElement);
-
-
+
if (paneld.match("daImagePanel")) {
if ($("#transparencyScale_" + MultiWinId).css("display") == "block") {
@@ -2965,6 +2967,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
}
$rootScope.CIAnotationIdentifyModeOff = false;
+
$rootScope.OnIdentifyClick = function () {
//clear sketch js event for paint and erase
$.sketch = { tools: {}};
@@ -2995,7 +2998,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
{
var len = (paneld).split("_").length;
var MultiWinId = (paneld).split("_")[len - 1];
-
+
$rootScope.switchCanvas(paneld);
if (paneld.match("daImagePanel")) {
@@ -3062,6 +3065,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
}
+
+ // remove event listener
+ var PanelElement= $scope.GetPanelElement(paneld);
+ var canvasElement = PanelElement.canvasElement;
+ $scope.removeOnDrawingCanvas(canvasElement);
+
}
}
}
@@ -3095,14 +3104,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var MaxZindexVal = Math.max(drawCanvasZindex, paintCanvasZindex, TransCanvasZindex);
MaxZindexVal = MaxZindexVal + 1;
$("#" + canvasId).css("z-index", MaxZindexVal);
- if ($rootScope.currentBodyViewId == "11") {
- $(".ui-wrapper").css("z-index", MaxZindexVal + 1);
- $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
-
- }
- else {
- $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
- }
+ $(".ui-wrapper").css("z-index", MaxZindexVal + 1);
+ $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
+
}
else {
var drawCanvasZindex = $("#" + canvasId).css("z-index");
@@ -3117,12 +3121,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
else {
$("#" + canvasId).css("z-index", MaxZindexVal);
- if ($rootScope.currentBodyViewId == "11") {
- $(".ui-wrapper").css("z-index", MaxZindexVal);
- }
- else {
- $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
- }
+ $(".ui-wrapper").css("z-index", MaxZindexVal);
+ $('#' + ctx.getAttribute("id")).css("z-index", MaxZindexVal);
+
}
@@ -3168,8 +3169,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
$rootScope.DrawingMode = function () {
- //clear sketch js event for paint and erase
- $.sketch = { tools: {}};
+ //clear sketch js event for paint and erase
+ $.sketch = { tools: {}};
//Annotation History
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
$("#OnIdentify").removeClass("annotationtoolbartab");
@@ -3184,7 +3185,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
for (var index = 0 ; index < modulePanel.length; index++) {
var paneld = modulePanel[index].id;
if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel"))
- {
+ {
$rootScope.switchCanvas(paneld);
if(paneld.match("AAImagePanel"))
{
@@ -3232,6 +3233,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
}
+
+ // remove event listener
+ var PanelElement= $scope.GetPanelElement(paneld);
+ var canvasElement = PanelElement.canvasElement;
+ $scope.removeOnDrawingCanvas(canvasElement);
+
}
}
}
@@ -3240,7 +3247,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
// Dissectible Anatomy > Settings should be disable if Annotation is Open.
$rootScope.ShowSettingWindow = function () {
- if ($(".annotationTollbar").css("display") == "block") {
+ if ($("#annotationTollbar").css("display") == "block") {
$('#modal-settings').css("display", "none");
$("#modelsettingsbackground").css("display", "none");
}
@@ -3280,7 +3287,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var canvasElement = PanelElement.canvasElement;
if (canvasElement == null || canvasElement == undefined) continue;
var canvasPaintElement = PanelElement.canvasPaintElement;
-
+
var canvasId = canvasElement.id;
var canvasPaintId = canvasPaintElement.id;
$rootScope.setListManagerZindex = true;
@@ -3311,7 +3318,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
}
-
+
+ $scope.onDrawingCanvasOnModule(canvasElement);
+
}
}
}
@@ -3361,7 +3370,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var canvasElement = PanelElement.canvasElement;
if (canvasElement == null || canvasElement == undefined) continue;
var canvasPaintElement = PanelElement.canvasPaintElement;
-
+
var canvasId = canvasElement.id;
var canvasPaintId = canvasPaintElement.id;
$("#" + canvasPaintId).css("display", "block");
@@ -3392,10 +3401,13 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$('#summary_' + MultiWinId).css("z-index", canvasZIndex);
}
- }
+ }
+
+ $scope.onDrawingCanvasOnModule(canvasElement);
+
}
- }
}
+ }
}
@@ -3439,6 +3451,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
}
+
+ // remove event listener
+ var PanelElement= $scope.GetPanelElement(paneld);
+ var canvasElement = PanelElement.canvasElement;
+ $scope.removeOnDrawingCanvas(canvasElement);
}
}
}
@@ -3466,7 +3483,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var canvasElement = PanelElement.canvasElement;
if (canvasElement == null || canvasElement == undefined) continue;
var canvasPaintElement = PanelElement.canvasPaintElement;
-
+
var canvasId = canvasElement.id;
var canvasPaintId = canvasPaintElement.id;
$rootScope.setListManagerZindex = true;
@@ -3499,6 +3516,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
+ $scope.onDrawingCanvasOnModule(canvasElement);
}
}
@@ -3523,7 +3541,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var canvasElement = PanelElement.canvasElement;
if (canvasElement == null || canvasElement == undefined) continue;
var canvasPaintElement = PanelElement.canvasPaintElement;
-
+
var canvasId = canvasElement.id;
var canvasPaintId = canvasPaintElement.id;
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
@@ -3595,12 +3613,14 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
}
+ // remove event listener
+ $scope.removeOnDrawingCanvas(canvasElement);
+
}
}
}
$rootScope.EraseDrawing = function () {
-
$('.btnCursor').removeClass('activebtncolor');
$(".btn-annotation").removeClass("activebtncolor");
$(".btn-annotation-erase").addClass("activebtncolor");
@@ -3614,12 +3634,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel"))
{
var len = (paneld).split("_").length;
- // var MultiWinId = (paneld).split("_")[len - 1];
+ var MultiWinId = (paneld).split("_")[len - 1];
var PanelElement= $scope.GetPanelElement(paneld);
- var canvasPaintElement = PanelElement.canvasElement;
- if (canvasPaintElement == null || canvasPaintElement == undefined) continue;
+ var canvasElement = PanelElement.canvasElement;
+ if (canvasElement == null || canvasElement == undefined) continue;
+
+ var canvasPaintElement = PanelElement.canvasElement;
var canvasPaintId = canvasPaintElement.id;
+
$rootScope.isAnnotaionToolBarDrawingModeActive = true;
$rootScope.switchCanvasToPaintCanvas(paneld);
@@ -3644,6 +3667,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$("#annotationpainteraser").attr("data-size", parseInt($("#btnBrushSize").val()));
$scope.PaintEraseEvent();
+
+ // remove event listener
+ $scope.removeOnDrawingCanvas(canvasElement);
}
}
@@ -3680,10 +3706,14 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
case 'mouseup':
$rootScope.UnsaveCurriculum = true;
$scope.savePaintAnnotation(this.el.id,this.actions);
-
- case 'mouseout':
- case 'mouseleave':
+ this.stopPainting();
+ break;
case 'touchend':
+ $rootScope.UnsaveCurriculum = true;
+ $scope.savePaintAnnotation(this.el.id,this.actions);
+ break;
+ case 'mouseout':
+ case 'mouseleave':
case 'touchcancel':
this.stopPainting();
}
@@ -3825,7 +3855,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var canvasElement = PanelElement.canvasElement;
if (canvasElement == null || canvasElement == undefined) continue;
var canvasPaintElement = PanelElement.canvasPaintElement;
-
+
var canvasId = canvasElement.id;
var canvasPaintId = canvasPaintElement.id;
$rootScope.setListManagerZindex = true;
@@ -3857,9 +3887,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
+ $scope.onDrawingCanvasOnModule(canvasElement);
+
}
- }
- }
+ }
+ }
}
$rootScope.DrawArrow = function (e) {
@@ -3884,7 +3916,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var canvasElement = PanelElement.canvasElement;
if (canvasElement == null || canvasElement == undefined) continue;
var canvasPaintElement = PanelElement.canvasPaintElement;
-
+
var canvasId = canvasElement.id;
var canvasPaintId = canvasPaintElement.id;
$rootScope.setListManagerZindex = true;
@@ -3916,9 +3948,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
+ $scope.onDrawingCanvasOnModule(canvasElement);
+
}
- }
- }
+ }
+ }
}
$rootScope.DrawText = function () {
//clear sketch js event for paint and erase
@@ -3942,7 +3976,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var canvasElement = PanelElement.canvasElement;
if (canvasElement == null || canvasElement == undefined) continue;
var canvasPaintElement = PanelElement.canvasPaintElement;
-
+
var canvasId = canvasElement.id;
var canvasPaintId = canvasPaintElement.id;
$rootScope.setListManagerZindex = true;
@@ -3974,9 +4008,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
+ $scope.onDrawingCanvasOnModule(canvasElement);
+
}
- }
- }
+ }
+ }
}
@@ -3999,7 +4035,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var canvasElement = PanelElement.canvasElement;
if (canvasElement == null || canvasElement == undefined) continue;
var canvasPaintElement = PanelElement.canvasPaintElement;
-
+
var canvasId = canvasElement.id;
var canvasPaintId = canvasPaintElement.id;
$rootScope.setListManagerZindex = true;
@@ -4031,9 +4067,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
+ $scope.onDrawingCanvasOnModule(canvasElement);
+
}
- }
- }
+ }
+ }
}
@@ -4071,16 +4109,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
else {
if ($("#annotationpaintbrushsize").hasClass("activebtncolor") || $("#annotationpainteraser").hasClass("activebtncolor")) {
- if ($rootScope.currentBodyViewId == "11") { $("#" + canvasPaintId).css("z-index", MaxZindexVal + 1); }
- else { $("#" + canvasPaintId).css("z-index", MaxZindexVal); }
+ $("#" + canvasPaintId).css("z-index", MaxZindexVal + 1);
}
- else {
- if ($rootScope.currentBodyViewId == "11") {
- $("#" + canvasId).css("z-index", MaxZindexVal + 1);
- }
- else {
- $("#" + canvasId).css("z-index", MaxZindexVal);
- }
+ else
+ {
+ $("#" + canvasId).css("z-index", MaxZindexVal + 1);
}
}
@@ -4170,6 +4203,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var paneld = modulePanel[index].id;
if(paneld.match("daImagePanel")||paneld.match("AAImagePanel")||paneld.match("ciImagePanel")||paneld.match("aiImagePanel")||paneld.match("picImagePanel"))
{
+ var len = (paneld).split("_").length;
+ var MultiWinId = (paneld).split("_")[len - 1];
+
if ($("#annotationpaintbrushsize").hasClass('activebtncolor')) {
$("#annotationpaintbrushsize").removeClass('activebtncolor')
$rootScope.switchCanvas(paneld);
@@ -4235,6 +4271,23 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
}
+ $rootScope.changeWidthManager = function () {
+ var borderWidth = 2;
+ var borderColor = "#000";
+ borderWidth = $("#borderWidthCanvasElement option:selected").val();
+ $rootScope.shapestyleborderWidth = Math.round(borderWidth);
+ borderColor = $('#outlineColor .minicolors >.minicolors-swatch > .minicolors-swatch-color').css("background-color");
+
+ if (borderColor != null) {
+ document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor;
+ //$("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid" + borderColor);
+ } else {
+
+ // $("#imgOpacity").parent().css("border", borderWidth + "px" + " " + "solid");
+ document.getElementById("imgOpacity").parentNode.style.border = borderWidth + "px" + " " + "solid" + " " + borderColor;
+
+ }
+ }
$rootScope.enableAnnotationToolBar = function () {
if ($rootScope.disableAnnotationTB == true) {
document.getElementById('modelbackground').style.display = "none";
@@ -5174,6 +5227,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$('.btnCursor').trigger('click');
$(".btn-annotation").removeClass("activebtncolor");
$('.btnCursor').addClass('activebtncolor');
+
}
$rootScope.DrawPinOnModuleItem = function (canvasId, PinNumber,shapestyleborderColor, shapestyleborderWidth, offsetX1, offsetY1, x, y) {
@@ -6097,12 +6151,13 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
window.addEventListener('mouseup', $rootScope.OnPaintCanvasMouseUp);
window.addEventListener("touchend", $rootScope.OnPaintCanvasMouseUp);
-
+
}
}
$scope.removeOnDrawingCanvas = function (annotationCanvas) {
+ if (annotationCanvas != null || annotationCanvas != undefined) {
//remove old event listener
//event code modified .work of only DA,AA,CI,AI,PIC
annotationCanvas.removeEventListener("mousedown", $rootScope.OnPaintCanvasMouseDown);
@@ -6111,7 +6166,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
annotationCanvas.removeEventListener("touchend", $rootScope.OnPaintCanvasMouseUp);
window.removeEventListener('mouseup', $rootScope.OnPaintCanvasMouseUp);
window.removeEventListener("touchend", $rootScope.OnPaintCanvasMouseUp);
-
+
+ }
}
@@ -6143,19 +6199,25 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var horizontlScrollPosition = canvasDiv.scrollLeft;
var $ua = navigator.userAgent;
if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
- var verticalScrollPosition = canvasDiv.scrollTop;
- var horizontlScrollPosition = canvasDiv.scrollLeft;
- $rootScope.offsetX1 = event.pageX + horizontlScrollPosition - $('#' + canvasDivId).offset().left;
- $rootScope.offsetY1 = event.pageY + verticalScrollPosition - $('#' + canvasDivId).offset().top;
+ if(event.type == 'touchstart' || event.type == 'touchmove' || event.type == 'touchend' || event.type == 'touchcancel'){
+ // var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
+ var touch = event.touches[0] || event.changedTouches[0];
+ var verticalScrollPosition = canvasDiv.scrollTop;
+ var horizontlScrollPosition = canvasDiv.scrollLeft;
+ $rootScope.offsetX1 = touch.pageX + horizontlScrollPosition - $('#' + canvasDivId).offset().left;
+ $rootScope.offsetY1 = touch.pageY + verticalScrollPosition - $('#' + canvasDivId).offset().top;
+ }
+
}
- else {
+ else
+ {
$rootScope.offsetX1 = event.offsetX;
$rootScope.offsetY1 = event.offsetY;
}
// ctx.clearRect(0, 0, 2277, 3248);
- canvasElement.addEventListener('mousemove', $rootScope.OnPaintCanvasMouseMove);
- canvasElement.addEventListener("touchmove", $rootScope.OnPaintCanvasMouseMove);
+ canvasElement.addEventListener('mousemove', $rootScope.OnPaintCanvasMouseMove,false);
+ canvasElement.addEventListener("touchmove", $rootScope.OnPaintCanvasMouseMove,false);
}
}
}
@@ -6206,9 +6268,21 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var verticalScrollPosition = canvasDiv.scrollTop;
var horizontlScrollPosition = canvasDiv.scrollLeft;
- $rootScope.x =Math.round(event.pageX + horizontlScrollPosition - $('#' + canvasDivId).offset().left);
- $rootScope.y =Math.round(event.pageY + verticalScrollPosition - $('#' + canvasDivId).offset().top);
-
+ var $ua = navigator.userAgent;
+ if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
+ if(event.type == 'touchstart' || event.type == 'touchmove' || event.type == 'touchend' || event.type == 'touchcancel'){
+ // var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
+ var touch = event.touches[0] || event.changedTouches[0];
+ $rootScope.x = touch.pageX + horizontlScrollPosition - $('#' + canvasDivId).offset().left;
+ $rootScope.y = touch.pageY + verticalScrollPosition - $('#' + canvasDivId).offset().top;
+ }
+ }
+ else
+ {
+ $rootScope.x =Math.round(event.pageX + horizontlScrollPosition - $('#' + canvasDivId).offset().left);
+ $rootScope.y =Math.round(event.pageY + verticalScrollPosition - $('#' + canvasDivId).offset().top);
+ }
+
if($rootScope.shapeType=="Rectangle"|| $rootScope.shapeType=="Circle"|| $rootScope.shapeType=="TextArea")
{
//birendra
@@ -6235,7 +6309,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
}
-
+
// var ctx = canvasElement.getContext("2d");
// var PaintCanvasctx = canvasPaintElement.getContext("2d");
// activate for unsave curriculum
@@ -6323,8 +6397,21 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
currentCanvasId=canvasId;
var verticalScrollPosition = canvasDiv.scrollTop;
var horizontlScrollPosition = canvasDiv.scrollLeft;
- $rootScope.MouseMoveXAxis = event.pageX + horizontlScrollPosition - $('#' + canvasDivId).offset().left;
- $rootScope.MouseMoveYAxis = event.pageY + verticalScrollPosition - $('#' + canvasDivId).offset().top;
+ var $ua = navigator.userAgent;
+ if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
+ if(event.type == 'touchstart' || event.type == 'touchmove' || event.type == 'touchend' || event.type == 'touchcancel'){
+ // var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0];
+ var touch = event.touches[0] || event.changedTouches[0];
+ $rootScope.MouseMoveXAxis = touch.pageX + horizontlScrollPosition - $('#' + canvasDivId).offset().left;
+ $rootScope.MouseMoveYAxis = touch.pageY + verticalScrollPosition - $('#' + canvasDivId).offset().top;
+ }
+
+ }
+ else
+ {
+ $rootScope.MouseMoveXAxis = event.pageX + horizontlScrollPosition - $('#' + canvasDivId).offset().left;
+ $rootScope.MouseMoveYAxis = event.pageY + verticalScrollPosition - $('#' + canvasDivId).offset().top;
+ }
switch ($rootScope.shapeType) {
case "Line":
@@ -6455,7 +6542,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$rootScope.onDrawingCanvasClick = function (event) {
-
if (event != undefined && (event.target.id).match("canvasDA")) {
if ($rootScope.isAnnotaionToolBarDrawingModeActive == false) {
@@ -6693,8 +6779,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$('#listManager').css('display', 'block');
$("#listManager").css("visibility", "visible");
- $('#listManager').draggable();
-
+
// register event for search list manager
$(document).on("mouseover", "#termList option", function (e) {
$('#termList option[selected="selected"]').attr("selected", false);
@@ -6775,14 +6860,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
if(selectedPanel.match("daImagePanel"))
{
- // $rootScope.$broadcast('dalistManagerEvent', windowviewid);
$rootScope.dalistManagerEvent(windowviewid);
$("#termList").attr("onclick", "if (typeof(this.selectedIndex) != 'undefined') onListManagerTermSelection(this.options[this.selectedIndex].id, true)");
}
else if(selectedPanel.match("AAImagePanel"))
{
- // $rootScope.$broadcast('aalistManagerEvent', windowviewid);
$rootScope.aalistManagerEvent(windowviewid);
$("#termList").attr("onclick", "if (typeof(this.selectedIndex) != 'undefined') onSearchItemSelection(this.options[this.selectedIndex].id)");
@@ -6825,8 +6908,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
console.log('listManager closed');
$rootScope.disableAnnotationtoolOnListManager = false;
if (paneld.match("daImagePanel") || paneld.match("AAImagePanel")) {
- // $("#annotationpaintbrushsize").attr("href", "#" + canvasPaintId);
- // $("#annotationpainteraser").attr("href", "#" + canvasPaintId);
if ($rootScope.disableAnnotationtoolOnListManager == false) {
$('#AnnotaionPopupDiv').find('a,input, textarea, button, select,img,div').removeAttr('disabled', 'disabled');
$('#slider-range-min-2').slider('enable');
@@ -6834,7 +6915,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$("#annotationpainteraser").removeAttr('disabled', 'disabled');
$("#annotationpaintbrushsize").css('pointer-events', 'auto');
$("#annotationpainteraser").css('pointer-events', 'auto');
- if ($(".annotationTollbar").css("display") == "block") {
+ if ($("#annotationTollbar").css("display") == "block") {
$rootScope.switchCanvasToPaintCanvas(paneld);
}
}
@@ -6865,6 +6946,9 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
//setrtings
$rootScope.SetSettingActiveTab = function (tabToSet) {
$rootScope.SettingsTab = tabToSet;
+ if (navigator.userAgent.match(/(iPod|iPhone|iPad|android)/i)) {
+ $("#modal-settings").draggable('disable');
+ }
};
$rootScope.loadsettings = function () {
@@ -7322,13 +7406,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$timeout(function () {
- var $ua = navigator.userAgent;
- if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
-
- }
- else {
- SetFrameToPrint();
- }
+ SetFrameToPrint();
}, 500);
};
@@ -7367,14 +7445,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
if(pageno==modulePanel.length-1)
{
$timeout(function () {
-
- var $ua = navigator.userAgent;
- if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
-
- }
- else {
- SetFrameToPrint();
- }
+ // working for all device
+ SetFrameToPrint();
}, pageno * 400+500);
@@ -7388,29 +7460,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
function CollectPrintData(canvasDivId, pageno, panelTitle) {
// Birendra
- // create page to store print image data
- var $ua = navigator.userAgent;
- if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
- $("#" + canvasDivId).append("");
- html2canvas($("#" + canvasDivId), {
- onrendered: function (canvas) {
- var newWindow = window.open('');
- newWindow.document.body.appendChild(canvas);
- newWindow.focus();
- newWindow.print();
- $("#" + canvasDivId).children('#exportlogo').remove();
- newWindow.close();
-
- //***** old code ********/
- // var imgsrc = canvas.toDataURL("image/png");
- // var printContent = '
';
- // var newPrintWindow = window.open();
- // $(newPrintWindow.document.body).html(printContent);
- // newPrintWindow.print();
- }
- });
- }
- else {
+ // create page to store print image data for all devices
html2canvas($("#" + canvasDivId), {
onrendered: function (canvas) {
var dataURL = canvas.toDataURL("image/jpeg");
@@ -7450,10 +7500,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
});
-
-
- }
-
}
@@ -7518,10 +7564,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
var curPosture = panelTitle;
if (document.getElementById('jsPanel-1')) {
+
if (dataURL == "" || dataURL == undefined) {
setTimeout(function () {
- $("#btnPrint").attr("id", canvas.id);
+ // $("#btnPrint").attr("id", canvas.id.replace("#",""));
document.getElementById('imgPortrait').setAttribute('src', dataURL);
document.getElementById('imgLandscape').setAttribute('src', dataURL);
document.getElementById('spnModulePor').innerHTML = curModule;
@@ -7537,7 +7584,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
else {
setTimeout(function () {
- $("#btnPrint").attr("id", canvas.id);
+ // $("#btnPrint").attr("id", canvas.id.replace("#",""));
document.getElementById('imgPortrait').setAttribute('src', dataURL);
document.getElementById('imgLandscape').setAttribute('src', dataURL);
@@ -7569,26 +7616,15 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
}
});
- $timeout(function () {
- var $ua = navigator.userAgent;
- if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
- var printContainerWidth = $("#printcontainer").css("width");
- $("#printcontainer").css({ "width": "100%", "min-width": printContainerWidth });
- var jspanelContainerWidth = $("#jsPanel-1 .jsPanel-content").css("width");
- $("#jsPanel-1 .jsPanel-content").css({ "width": "100%", "min-width": jspanelContainerWidth });
- $("#jsPanel-1").css("width", "100%");
-
- }
- }, 500)
};
$scope.printImagePreview = function (event) {
- PrintDivContentByID('printBoxPor', event.target.id);
+ PrintDivContentByID('printBoxPor');
}
- function PrintDivContentByID(id, canvasDivId) {
+ function PrintDivContentByID(id) {
if (id == 'printBoxPor') {
$("#printPSOptions").val("100%");
ResizeImage(1);
@@ -7597,22 +7633,6 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$(document).ready(function () {
contents = document.getElementById(id).innerHTML;
});
-
- // code for printng in ipads
- var $ua = navigator.userAgent;
- if (($ua.match(/(iPod|iPhone|iPad|android)/i))) {
- $("#" + canvasDivId).append("");
- html2canvas($("#" + canvasDivId), {
- onrendered: function (canvas) {
- var imgsrc = canvas.toDataURL("image/png");
- var printContent = '
';
- var newPrintWindow = window.open();
- $(newPrintWindow.document.body).html(printContent);
- newPrintWindow.print();
- }
- });
- }
- else {
var frame1 = $('');
frame1[0].name = "frame1";
frame1.css({ "position": "absolute", "top": "-1000000px" });
@@ -7634,8 +7654,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
window.frames["frame1"].print();
frame1.remove();
}, 500);
- }
- console.log('close');
+
}
@@ -7852,6 +7871,11 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
RestrictListDiv.style.display = 'block';
$(".restrict-carret-icon").css({ "transform": "rotate(90deg)", "-moz-transform": "rotate(90deg)", "-webkit-transform": "rotate(90deg)", "-ms-transform": "rotate(90deg)" });
+ if (navigator.userAgent.match(/(iPod|iPhone|iPad|android)/i)) {
+
+ $("#listManager").draggable('disable');
+ }
+
}
$rootScope.reDirectURLToAdmin = function () {
@@ -7909,15 +7933,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$("#cursor-block").html();
}
- var $ue = navigator.userAgent;
- if (($ue.match(/(iPod|iPhone|iPad|android)/i))) {
-
- $("#text_area").click(function () {
- $("#annotationTextModal").draggable('disable');
- }).blur(function () {
- $("#annotationTextModal").draggable('enable');
- });
- }
+
$rootScope.CheckRefresh = function (e) {
//Checking if 'REFRESHED' or 'RELOADED'
if ((e.keyCode === 116) || (e.keyCode == 82 && e.ctrlKey))
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
index 5c0a84e..3030733 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/LabExercController.js
@@ -524,11 +524,14 @@ function ($scope, $rootScope, pages, log, $http, $timeout, DataService, $filter,
//reset option list manager and annotation
//call when module loaded
$rootScope.resetMenuOption();
- // call from while open module in CB
- $("#labImagePanel_" + windowviewid).on('click', function (event) {
- var pnlName = event.currentTarget.id;
- $rootScope.resetMenuOptionOnClick(pnlName);
-
+
+ //remove pre event
+ $("#labImagePanel_" + windowviewid).off("click touchstart");
+
+ $("#labImagePanel_" + windowviewid).on('click touchstart', function (event) {
+ //after drawing annotation click not work on iPad/Android device
+ var pnlName = event.currentTarget.id;
+ $rootScope.resetMenuOptionOnClick(pnlName);
});
}
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js
index 0ca5000..17f6bd8 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyAnimationController.js
@@ -442,11 +442,15 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
//call when module loaded
$rootScope.resetMenuOption();
// call from while open module in CB
- $("#vidImagePanel_" + windowviewid).on('click', function (event) {
- var pnlName = event.currentTarget.id;
- $rootScope.resetMenuOptionOnClick(pnlName);
-
- });
+ //remove pre event
+ $("#vidImagePanel_" + windowviewid).off("click touchstart");
+
+ $("#vidImagePanel_" + windowviewid).on('click touchstart', function (event) {
+ //after drawing annotation click not work on iPad/Android device
+ var pnlName = event.currentTarget.id;
+ $rootScope.resetMenuOptionOnClick(pnlName);
+ });
+
}
}]);
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js
index b29e59d..446d51d 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/MyPictureController.js
@@ -278,10 +278,10 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
theme: 'success',
currentController: 'MyPictureController',
parentSlug: $scope.GetPICwindowStoreData(windowviewid, 'parentSlugName'),
- content: '
'+
+ content: '
'+
'
'+
'
'+
- '
' +
+ '
' +
'' +
'
'+
'
',
@@ -376,14 +376,18 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
var canvasDIvHeight = $('#picImagePanel_' + windowviewid+ " .jsPanel-content").height();
- $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight);
+ $('#canvasDivPIC_' + windowviewid).css('height', canvasDIvHeight);
+ var canvas = document.getElementById("canvasPIC_" + windowviewid);
+ var canvasPaint = document.getElementById("canvasPaintPIC_" + windowviewid);
+
+ canvas.height = canvasDIvHeight;
+ canvasPaint.height = canvasDIvHeight
+ canvas.width = screen.width;
+ canvasPaint.width = screen.width;
var openedImage = document.getElementById('mypic_' + windowviewid );
openedImage.src = selectedpicture;
openedImage.onload = function () {
- //$("#mypic_"+windowviewid).css("width", this.width + "px");
- // $("#mypic_"+windowviewid).css("height", this.height + "px");
-
$scope.JsPanelclick(windowviewid);
var annotationData= $scope.picOpenInOtherModules.annotationData;
@@ -424,18 +428,20 @@ function ($scope, $window, $rootScope, $compile, $http, log, $location, $timeout
//call when module loaded
$rootScope.resetMenuOption();
- // call from while open module in CB
- $("#picImagePanel_" + windowviewid).on('click', function (event) {
-
- var pnlName = event.currentTarget.id;
- $rootScope.resetMenuOptionOnClick(pnlName);
-
- // store image for export while click on panel
-
- var currentViewTitle = $scope.GetPICwindowStoreData(windowviewid, 'currentViewTitle');
- $rootScope.StoreTitleName(currentViewTitle);
- $rootScope.StoreOrgImageName(currentViewTitle);
+ //remove pre event
+ $("#picImagePanel_" + windowviewid).off("click touchstart");
+
+ $("#picImagePanel_" + windowviewid).on('click touchstart', function (event) {
+ //after drawing annotation click not work on iPad/Android device
+ var pnlName = event.currentTarget.id;
+ $rootScope.resetMenuOptionOnClick(pnlName);
+ // store image for export while click on panel
+ var currentViewTitle = $scope.GetPICwindowStoreData(windowviewid, 'currentViewTitle');
+ $rootScope.StoreTitleName(currentViewTitle);
+ $rootScope.StoreOrgImageName(currentViewTitle);
+
});
+
}
}])
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
index 61bedd4..db9873e 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/TileViewListController.js
@@ -971,21 +971,24 @@ function ($scope, $window, $rootScope, $compile, $http, $log, $location, $timeou
$scope.JsPanelclick = function (windowviewid) {
//reset option list manager and annotation
//call when module loaded
- $rootScope.resetMenuOption();
- // call from while open module in CB
- $("#AAImagePanel_" + windowviewid).on('click', function (event) {
-
- var pnlName=event.currentTarget.id;
- $rootScope.resetMenuOptionOnClick(pnlName);
- var titlt = $("#AAImagePanel_" + windowviewid).childNodes;
-
- // store image for export while click on panel
-
- var currentViewTitle = $scope.GetAAwindowStoreData(windowviewid, 'currentViewTitle');
- var imageName = $scope.GetAAwindowStoreData(windowviewid, 'imageName');
- $rootScope.StoreTitleName(currentViewTitle);
- $rootScope.StoreOrgImageName(imageName);
+ $rootScope.resetMenuOption();
+ //remove pre event
+ $("#AAImagePanel_" + windowviewid).off("click touchstart");
+
+ $("#AAImagePanel_" + windowviewid).on('click touchstart', function (event) {
+ //after drawing annotation click not work on iPad/Android device
+ var pnlName=event.currentTarget.id;
+ $rootScope.resetMenuOptionOnClick(pnlName);
+ var titlt = $("#AAImagePanel_" + windowviewid).childNodes;
+
+ // store image for export while click on panel
+
+ var currentViewTitle = $scope.GetAAwindowStoreData(windowviewid, 'currentViewTitle');
+ var imageName = $scope.GetAAwindowStoreData(windowviewid, 'imageName');
+ $rootScope.StoreTitleName(currentViewTitle);
+ $rootScope.StoreOrgImageName(imageName);
});
+
}
$scope.setPreClickBtnCss = function (windowviewid) {
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/LabExerc-view.html b/400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/LabExerc-view.html
index 2140c1d..0d95888 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/LabExerc-view.html
+++ b/400-SOURCECODE/AIAHTML5.Web/app/views/LabExerc/LabExerc-view.html
@@ -19,4 +19,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
index fcd7993..9e0534c 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
+++ b/400-SOURCECODE/AIAHTML5.Web/app/views/aa/atlas-anatomy-detail.html
@@ -67,10 +67,10 @@