Commit c830214b by Masaru Abe

マーキングが表示されないバグ対応

parent 3b0d015a
......@@ -120,7 +120,7 @@ CONTENTVIEW.displayCanvasDraw = function() {
&& dataMarking[nIndex].pageNo == CONTENTVIEW.changePageIndex(CONTENTVIEW_GETDATA.getPageIndex())) {
var img = new Image();
img.onload = function () {
CONTENTVIEW_GENERAL.context_draw.drawImage(img, 0, 0, CONTENTVIEW_GENERAL.canvas_draw.width, CONTENTVIEW_GENERAL.canvas_draw.height);
/*set flag has image */
......@@ -3139,19 +3139,24 @@ CONTENTVIEW.ContentPage.prototype.addPageObjects = function (pageObjects) {
//Start Function: No.4 - Editor : Long - Date : 08/09/2013 - Summary: Edit function to draw on multi canvas
/* drawing for current page */
CONTENTVIEW.ContentPage.prototype.drawPage = function (context, opt) {
if( opt == undefined || opt == null){
opt = 0;
}
//console.log("CONTENTVIEW.ContentPage.prototype.drawPage:" + opt);
/*set status is loading page */
CONTENTVIEW_GENERAL.isLoadingObject = true;
/* lock all controls in page */
CONTENTVIEW_GENERAL.disableAllControl();
/* init array image */
CONTENTVIEW_GENERAL.arrImage = [];
CONTENTVIEW_GENERAL.nCountObjectLoad = 0;
CONTENTVIEW_GENERAL.nCountObjectLoad[opt] = 0;
$('#divImageLoading').css('display', 'block');
//var width = this.image.width;
//var height = this.image.height;
//START TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF){
if(opt == null || opt == 0){
......@@ -3265,9 +3270,9 @@ CONTENTVIEW.ContentPage.prototype.drawPage = function (context, opt) {
objPageTemp[i].drawPageObject(context, opt);
}
else {
CONTENTVIEW_GENERAL.nCountObjectLoad++;
CONTENTVIEW_GENERAL.nCountObjectLoad[opt]++;
if (CONTENTVIEW_GENERAL.nCountObjectLoad == objPageTemp.length) {
if (CONTENTVIEW_GENERAL.nCountObjectLoad[opt] == objPageTemp.length) {
/* draw marking */
CONTENTVIEW.drawMarkingOnScreen(opt);
......@@ -3333,6 +3338,9 @@ CONTENTVIEW.ContentPage.prototype.drawPage = function (context, opt) {
else {
/* draw marking */
CONTENTVIEW.drawMarkingOnScreen(opt);
//var removeTimeOut = setTimeout(function(){
// CONTENTVIEW.drawMarkingOnScreen(opt);
//}, 500);
/*set status is loading page */
if(CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_PDF || CONTENTVIEW_GENERAL.contentType == COMMON.ContentTypeKeys.Type_NoFile){
......
......@@ -286,6 +286,10 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.hitTest = function (px, py) {
//Start Function: No.4 - Editor : Long - Date: 08/09/2013 - Summary : Edit function to draw object on next page
CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context, opt) {
if(opt == undefined || opt == null){
opt = 0;
}
var nObjectCnt = 0;
//#11478
var tempRatioWidth = 1;
......@@ -294,7 +298,8 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
var canvasHeight = 0;
//Check which pageObject to be count
if(opt == null || opt == 0){
if(opt == 0){
nObjectCnt = CONTENTVIEW_GENERAL.pageObjects.length;
//#11478
......@@ -344,6 +349,7 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
}
if (this.visible) {
/* init data */
var mediaType = this.mediaType;
var displayBorder = this.displayBorder;
......@@ -364,7 +370,7 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
//END TRB00046 - Editor : Long - Date: 09/19/2013 - Summary : Fix for draw video object at center
if (mediaType == '5') {
CONTENTVIEW_GENERAL.nCountObjectLoad++;
CONTENTVIEW_GENERAL.nCountObjectLoad[opt]++;
context.strokeStyle = "black";
context.lineWidth = "1";
context.strokeRect(x, y, w, h);
......@@ -372,13 +378,16 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
CONTENTVIEW.flip(opt);
}
if (this.imageUrl != '') {
/* init image */
var img = new Image();
img.onload = function () {
CONTENTVIEW_GENERAL.nCountObjectLoad++;
CONTENTVIEW_GENERAL.nCountObjectLoad[opt]++;
/* create object store value image */
var objTemp = [];
......@@ -436,7 +445,8 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
CONTENTVIEW.flip(opt);
if (CONTENTVIEW_GENERAL.nCountObjectLoad >= nObjectCnt) {
//console.log("CONTENTVIEW_GENERAL.nCountObjectLoad:" + opt + " "+ CONTENTVIEW_GENERAL.nCountObjectLoad[opt] + " nObjectCnt:" + nObjectCnt);
if (CONTENTVIEW_GENERAL.nCountObjectLoad[opt] >= nObjectCnt) {
/* draw marking */
CONTENTVIEW.drawMarkingOnScreen(opt);
......@@ -519,7 +529,10 @@ CONTENTVIEW_CREATEOBJECT.PageObject.prototype.drawPageObject = function (context
img.src = this.imageUrl;
}
else {
if (CONTENTVIEW_GENERAL.nCountObjectLoad >= nObjectCnt) {
//console.log("mediaType:" + mediaType);
//console.log("tempUrl:" + tempUrl);
if (CONTENTVIEW_GENERAL.nCountObjectLoad[opt] >= nObjectCnt) {
/* draw marking */
CONTENTVIEW.drawMarkingOnScreen(opt);
......
......@@ -406,7 +406,7 @@ CONTENTVIEW_GENERAL.ready = function(){
CONTENTVIEW_GENERAL.posXPopupMemo = 0;
CONTENTVIEW_GENERAL.posYPopupMemo = 0;
CONTENTVIEW_GENERAL.contentName = '';
CONTENTVIEW_GENERAL.nCountObjectLoad = 0;
CONTENTVIEW_GENERAL.nCountObjectLoad = new Array(3);
CONTENTVIEW_GENERAL.nAjaxLoad = 0;
CONTENTVIEW_GENERAL.isClearDrawing = false;
CONTENTVIEW_GENERAL.isDrawing = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment