diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js index a7d404f..62328af 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/CurrBuildController.js @@ -520,23 +520,19 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ $scope.convertDownLoad = function (curriculumobject,myfileName) { var blob = new Blob([angular.toJson(curriculumobject, true)], { type: 'text/json' }); - - if (window.navigator && window.navigator.msSaveOrOpenBlob) { - window.navigator.msSaveOrOpenBlob(blob, myfileName); - } - else - { - document.execCommand("SaveAs", true, myfileName); - - var event = document.createEvent('MouseEvents'), - saveElement = document.createElement('a'); - saveElement.download = myfileName; - saveElement.href = window.URL.createObjectURL(blob); - saveElement.dataset.downloadurl = ['text/json', saveElement.download, saveElement.href].join(':'); - event.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); - saveElement.dispatchEvent(event); - - } + + // document.execCommand("SaveAs", true, myfileName); + + // var event = document.createEvent('MouseEvents'), + // saveElement = document.createElement('a'); + // saveElement.download = myfileName; + // saveElement.href = window.URL.createObjectURL(blob); + // saveElement.dataset.downloadurl = ['text/json', saveElement.download, saveElement.href].join(':'); + // event.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); + // saveElement.dispatchEvent(event); + + //save file saver handle for all browser + saveAs(blob, filename); } $scope.checkCompatibility = function (curriculumobject) { @@ -1780,22 +1776,20 @@ function ($scope, $rootScope, pages, log, Modules, $http, $compile, $location, $ var blob = new Blob([angular.toJson($rootScope.dynamicUpdatedJsonForSaveCB, true)], { type: 'text/json' }); } - if (window.navigator && window.navigator.msSaveOrOpenBlob) { - window.navigator.msSaveOrOpenBlob(blob, filename); - } - else - { - document.execCommand("SaveAs", true, filename); + // document.execCommand("SaveAs", true, filename); - var event = document.createEvent('MouseEvents'), - saveElement = document.createElement('a'); - saveElement.download = filename; - saveElement.href = window.URL.createObjectURL(blob); - saveElement.dataset.downloadurl = ['text/json', saveElement.download, saveElement.href].join(':'); - event.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); - saveElement.dispatchEvent(event); + // var event = document.createEvent('MouseEvents'), + // saveElement = document.createElement('a'); + // saveElement.download = filename; + // saveElement.href = window.URL.createObjectURL(blob); + // saveElement.dataset.downloadurl = ['text/json', saveElement.download, saveElement.href].join(':'); + // event.initEvent('click', true, false, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null); + // saveElement.dispatchEvent(event); + + //save file saver handle for all browser + saveAs(blob, filename); - } + // } $scope.SectionContentForExportCB=[]; $rootScope.dynamicUpdatedJsonForExportCB = ""; $rootScope.dynamicUpdatedJsonForSaveCB = ""; diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js index 0359f33..1b1270d 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/DAController.js @@ -5878,6 +5878,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l // var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; var touch = e.touches[0] || e.changedTouches[0]; var currentMousePosition = $scope.getMousePos(touch.pageX,touch.pageY,windowviewid); + } + else + { + var currentMousePosition = $scope.getMousePos(e.pageX,e.pageY,windowviewid); } } else @@ -5951,6 +5955,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l var touch = e.touches[0] || e.changedTouches[0]; var currentMousePosition = $scope.getMousePos(touch.pageX,touch.pageY,windowviewid); } + else + { + var currentMousePosition = $scope.getMousePos(e.pageX,e.pageY,windowviewid); + } } else { @@ -6013,7 +6021,11 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l // var touch = e.originalEvent.touches[0] || e.originalEvent.changedTouches[0]; var touch = e.touches[0] || e.changedTouches[0]; var currentMousePosition = $scope.getMousePos(touch.pageX,touch.pageY,windowviewid); - } + } + else + { + var currentMousePosition = $scope.getMousePos(e.pageX,e.pageY,windowviewid); + } } else { @@ -11379,11 +11391,10 @@ AIA.controller("DAController", ["$scope", "$rootScope", "$compile", "$http", "$l $('#searchedTermListPopUp_' + windowviewid).draggable({containment:'#daViewDA_' + windowviewid}); - setTimeout(() => { + setTimeout(function () { $scope.FillSearchList(windowviewid); }, 100); - - + } $scope.FillSearchList = function (windowviewid) { diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js index ec700e1..2bebb72 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js +++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js @@ -6068,9 +6068,19 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data } function longest_string(str_ara) { - let max = str_ara[0].length; - str_ara.map(v => max = Math.max(max, v.length)); - var result = str_ara.filter(v => v.length == max); + var max = str_ara[0].length; + + str_ara.map(function(v){ + max = Math.max(max, v.length); + }); + + var result = str_ara.filter(function (v) { + return v.length == max; + }); + + //expression not working on ie 11 + // str_ara.map(v => max = Math.max(max, v.length)); + //var result = str_ara.filter(v => v.length == max); return result; } @@ -6170,8 +6180,8 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data var storeLine = ''; //---- - let isDrawing = false; - let currentCanvasId = ''; + var isDrawing = false; + var currentCanvasId = ''; $scope.onDrawingCanvasOnModule = function (annotationCanvas) { //remove old event listener @@ -6239,17 +6249,20 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data 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 + { + $rootScope.offsetX1 = event.offsetX ; + $rootScope.offsetY1 = event.offsetY ; + } } else { - $rootScope.offsetX1 = event.offsetX; - $rootScope.offsetY1 = event.offsetY; + $rootScope.offsetX1 = event.offsetX ; + $rootScope.offsetY1 = event.offsetY ; } // ctx.clearRect(0, 0, 2277, 3248); @@ -6312,7 +6325,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data 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); + } } else { @@ -6441,7 +6459,12 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data 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; + } } else diff --git a/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html b/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html index 94d2545..77869ba 100644 --- a/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html +++ b/400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html @@ -3,7 +3,7 @@
-

+

diff --git a/400-SOURCECODE/AIAHTML5.Web/body-view-wp.js b/400-SOURCECODE/AIAHTML5.Web/body-view-wp.js index 1bb3d13..c7fa48b 100644 --- a/400-SOURCECODE/AIAHTML5.Web/body-view-wp.js +++ b/400-SOURCECODE/AIAHTML5.Web/body-view-wp.js @@ -18,7 +18,7 @@ loadBodyViewData = function (currentBodyViewId) { bodyRegionData = JSON.parse(req.responseText); - console.log("bodyRegionData returned: " + bodyRegionData); + // console.log("bodyRegionData returned: " + bodyRegionData); loadLayerDataForCurrentBodyView(currentBodyViewId) } @@ -45,7 +45,7 @@ loadLayerDataForCurrentBodyView = function (currentBodyViewId) { if (req.readyState == 4 && req.status == 200) { bodyLayerData = JSON.parse(req.responseText); - console.log("data returned: " + bodyLayerData); + // console.log("data returned: " + bodyLayerData); loadBodyArtData(); } @@ -68,7 +68,7 @@ loadBodyArtData = function () { req.onreadystatechange = function () { if (req.readyState == 4 && req.status == 200) { bodyArtData = JSON.parse(req.responseText); - console.log("data returned: " + bodyArtData); + // console.log("data returned: " + bodyArtData); self.postMessage({ 'bodyRegionData': bodyRegionData, diff --git a/400-SOURCECODE/AIAHTML5.Web/extract-wp.js b/400-SOURCECODE/AIAHTML5.Web/extract-wp.js index fb4adeb..2339e08 100644 --- a/400-SOURCECODE/AIAHTML5.Web/extract-wp.js +++ b/400-SOURCECODE/AIAHTML5.Web/extract-wp.js @@ -1,6 +1,6 @@ previousGrayImageDataList = []; getLocationForMatchedTermsInWholeBody = function (termList, maskCanvasData, coloredImageData, grayImageData, bodyRegionId, canvasId) { - console.log('for bodyRegionId: ' + bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")) + // console.log('for bodyRegionId: ' + bodyRegionId + ', time: ' + new Date().toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1")) var masklen = maskCanvasData.data.length; var maskData = maskCanvasData.data; diff --git a/400-SOURCECODE/AIAHTML5.Web/index.aspx b/400-SOURCECODE/AIAHTML5.Web/index.aspx index 03e5372..e0af5e7 100644 --- a/400-SOURCECODE/AIAHTML5.Web/index.aspx +++ b/400-SOURCECODE/AIAHTML5.Web/index.aspx @@ -1585,7 +1585,6 @@ - @@ -1652,11 +1651,13 @@ + + - +