Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
check
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abook_web
check
Commits
72f4ab05
Commit
72f4ab05
authored
Nov 17, 2014
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
コメント整理のみ
parent
c737f459
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
269 deletions
+20
-269
abvw/js/contentview.js
+20
-269
No files found.
abvw/js/contentview.js
View file @
72f4ab05
...
...
@@ -16,14 +16,7 @@ CONTENTVIEW.srcRectNext = new CONTENTVIEW_CREATEOBJECT.Rect(0, 0, 0, 0);
CONTENTVIEW
.
srcRectPrev
=
new
CONTENTVIEW_CREATEOBJECT
.
Rect
(
0
,
0
,
0
,
0
);
CONTENTVIEW
.
destRectNext
=
new
CONTENTVIEW_CREATEOBJECT
.
Rect
(
0
,
0
,
0
,
0
);
CONTENTVIEW
.
destRectPrev
=
new
CONTENTVIEW_CREATEOBJECT
.
Rect
(
0
,
0
,
0
,
0
);
//CONTENTVIEW.moveXNext = 0;
//CONTENTVIEW.moveYNext = 0;
//CONTENTVIEW.moveXPrev = 0;
//CONTENTVIEW.moveYPrev = 0;
//END TRB00097
//CONTENTVIEW.isDestPositionDetect = false;
//CONTENTVIEW.destPosX = 0;
//CONTENTVIEW.destPosY = 0;
CONTENTVIEW
.
moveX
=
0
;
CONTENTVIEW
.
moveY
=
0
;
CONTENTVIEW
.
userScale
=
1
;
...
...
@@ -31,22 +24,15 @@ CONTENTVIEW.userScaleNow = 1;
CONTENTVIEW
.
scaleDelta
=
0.5
;
CONTENTVIEW
.
scaleX
;
CONTENTVIEW
.
scaleY
;
//CONTENTVIEW.canvasObject;
//CONTENTVIEW.contextObject;
CONTENTVIEW
.
objType4_5
=
[];
CONTENTVIEW
.
moveFlag
=
false
;
CONTENTVIEW
.
cancelClick
=
false
;
//CONTENTVIEW.timeCreateMemo;
//CONTENTVIEW.imageData;
//CONTENTVIEW.isLoadBackgroundComplete = false;
CONTENTVIEW
.
isExistDrawing
=
false
;
CONTENTVIEW
.
leftCanvas
=
0
;
CONTENTVIEW
.
topCanvas
=
0
;
//CONTENTVIEW.count = 0;
CONTENTVIEW
.
srcAudioType0
=
''
;
CONTENTVIEW
.
TypeAudio0
;
...
...
@@ -57,7 +43,6 @@ CONTENTVIEW.TypeAudio2;
CONTENTVIEW
.
scaleFactor
=
1.1
;
/**
* constants
*/
...
...
@@ -685,15 +670,6 @@ CONTENTVIEW.handleCopyTextData = function(data, pos) {
$
(
'#divCopyText'
).
children
().
remove
();
$
(
'#divCopyText'
).
append
(
'<li class="last">'
+
I18N
.
i18nText
(
'txtNoTextCopy'
)
+
'</li>'
);
// $("#divCopyText").dialog({
// show: "blind",
// modal: true,
// resizable:false,
// width: CONTENTVIEW_GENERAL.WIDTH_DIALOG_COPYTEXT,
// height: CONTENTVIEW_GENERAL.HEIGHT_DIALOG_COPYTEXT_NO_COPYTEXT,
// title: I18N.i18nText('txtTextCopy'),
// position: pos});
//title start
$
(
'#bookmarkBoxHdCT'
).
children
().
remove
();
$
(
'#bookmarkBoxHdCT'
).
html
(
'<a id="copyTextClosing" class="delete" style="padding-top:0px;"> </a>'
);
...
...
@@ -707,13 +683,10 @@ CONTENTVIEW.handleCopyTextData = function(data, pos) {
$
(
'#boxCopyText'
).
draggable
({
handle
:
"h1"
});
$
(
"#boxCopyText"
).
offset
({
left
:
w
,
top
:
h
});
$
(
"#divCopyText"
).
show
();
//$("#divCopyText").offset({left:"45%",top:(45% + $('#bookmarkBoxHdCT').height())});
//$("#boxCopyText").offset({left:"45%",top:"45%"});
}
else
{
/* create data on dialog */
$
(
'#divCopyText'
).
children
().
remove
();
//$('#divCopyText').append('<li class="last">' + sPageText + '</li>');
var
strPattern
=
"
\
n"
;
var
strTemp
=
sPageText
;
...
...
@@ -722,22 +695,11 @@ CONTENTVIEW.handleCopyTextData = function(data, pos) {
$
(
'#divCopyText'
).
append
(
'<div class="last" id="txtTextCopy" style="word-wrap:break-word;line-height: 20px">'
+
strTemp
+
'</div>'
);
/* display dialog */
// $("#divCopyText").dialog({
// show: "blind",
// modal: true,
// width: CONTENTVIEW_GENERAL.WIDTH_DIALOG_COPYTEXT,
// height:CONTENTVIEW_GENERAL.HEIGHT_DIALOG_COPYTEXT,
// resizable: false,
// title: I18N.i18nText('txtTextCopy'),
// position: pos});
//title start
$
(
'#bookmarkBoxHdCT'
).
children
().
remove
();
$
(
'#bookmarkBoxHdCT'
).
html
(
'<a id="copyTextClosing" class="delete" style="padding-top:0px;"> </a>'
);
$
(
"#copyTextClosing"
).
click
(
CONTENTVIEW_EVENTS
.
closeCopyTextBox
);
$
(
'#bookmarkBoxHdCT'
).
append
(
I18N
.
i18nText
(
'txtTextCopy'
));
//title end
//COMMON.lockLayout();
...
...
@@ -746,15 +708,6 @@ CONTENTVIEW.handleCopyTextData = function(data, pos) {
//$('#boxCopyText').draggable({ handle: "h1" });
$
(
"#boxCopyText"
).
offset
({
left
:
w
,
top
:
h
});
$
(
"#divCopyText"
).
show
();
//$("#divCopyText").offset({left:w,top:(h + $('#bookmarkBoxHdCT').height())});
//$("#boxCopyText").offset({left:"45%",top:"45%"});
/*$('#bookmarkBoxHdCT').mousedown(function(){
$('#boxCopyText').draggable({ handle: "h1" });
});
$('#bookmarkBoxHdCT').mouseup(function(){
$('#boxCopyText').unbind('draggable');
});*/
if
(
COMMON
.
isTouchDevice
()
==
true
)
{
document
.
getElementById
(
'bookmarkBoxHdCT'
).
addEventListener
(
'touchstart'
,
CONTENTVIEW
.
eventStart_CopyText
,
false
);
...
...
@@ -763,12 +716,6 @@ CONTENTVIEW.handleCopyTextData = function(data, pos) {
document
.
getElementById
(
'bookmarkBoxHdCT'
).
addEventListener
(
'mousedown'
,
CONTENTVIEW
.
eventStart_CopyText
,
false
);
document
.
getElementById
(
'bookmarkBoxHdCT'
).
addEventListener
(
'mouseup'
,
CONTENTVIEW
.
eventEnd_CopyText
,
false
);
}
/*$('#boxCopyText h1').touchstart(function(e){
});
$('#boxCopyText h1').touchend(function(e){
});*/
}
};
...
...
@@ -840,9 +787,7 @@ CONTENTVIEW.searchHandle = function() {
var
imgTemp
=
new
Image
();
imgTemp
.
onload
=
function
()
{
if
(
imgTemp
.
width
>
imgTemp
.
height
)
{
$
(
"img.imgbox"
).
attr
(
'height'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'height'
);
$
(
"img.imgbox"
).
attr
(
'width'
,
'43'
);
...
...
@@ -870,9 +815,7 @@ CONTENTVIEW.searchHandle = function() {
var
imgTemp
=
new
Image
();
imgTemp
.
onload
=
function
()
{
if
(
imgTemp
.
width
>
imgTemp
.
height
)
{
$
(
"img.imgbox"
).
attr
(
'height'
,
''
);
$
(
"img.imgbox"
).
removeAttr
(
'height'
);
$
(
"img.imgbox"
).
attr
(
'width'
,
'43'
);
...
...
@@ -916,64 +859,6 @@ CONTENTVIEW.searchHandle = function() {
}
};
/* load data to dialog search */
/*
CONTENTVIEW.loadDataToDialogSearch = function(searchResultTemp) {
var contentPage = CONTENTVIEW_GENERAL.dataWebContentPage.pages;
var myRegExp = new RegExp($('#txtSearch').val());
var searchResult = [];
//search content
for (var nIndex = 0; nIndex < contentPage.length; nIndex++) {
if (myRegExp.test(contentPage[nIndex].pageText)) {
//var n = jQuery.inArray(contentPage[nIndex].pageNo,searchResultTemp);
for (var n = 0; n < searchResultTemp.length; n++) {
if (searchResultTemp[n].pageNo == contentPage[nIndex].pageNo) {
searchResult.push(searchResultTemp[n]);
break;
}
}
}
}
// create data on dialog
$('#divSearchResult').children().remove();
for (var nIndex = 0; nIndex < searchResult.length; nIndex++) {
$('#divSearchResult').append(
' <li id="' + CONTENTVIEW.changePageNo(searchResult[nIndex].pageNo) + '">' +
' <img class="imgbox" src="' + COMMON.formatStringBase64(searchResult[nIndex].pageThumbnail) + '"/>' +
' <span class="mdltext">' +
I18N.i18nText('txtPage') + (CONTENTVIEW.changePageNo(searchResult[nIndex].pageNo) + 1) + '<br /> ' +
COMMON.htmlEncode(COMMON.truncate(searchResult[nIndex].pageText, 20)) +
' </span>' +
' </li>'
);
//Resize Image
var imgTemp = new Image();
imgTemp.onload = function () {
if (imgTemp.width > imgTemp.height) {
$("img.imgbox").attr('height', '');
$("img.imgbox").removeAttr('height');
$("img.imgbox").attr('width', '43');
}
else {
$("img.imgbox").attr('width', '');
$("img.imgbox").removeAttr('width');
$("img.imgbox").attr('height', '43');
}
};
imgTemp.src = COMMON.formatStringBase64(searchResult[nIndex].pageThumbnail);
}
};
*/
CONTENTVIEW
.
playBGMOfPage
=
function
(
page_index_bg
)
{
if
(
CONTENTVIEW_GENERAL
.
avwUserEnvObj
.
os
==
"ipad"
)
{
if
(
$
(
'#playaudiopage'
).
children
().
length
>
0
)
{
...
...
@@ -1045,9 +930,6 @@ CONTENTVIEW.showErrorScreen = function() {
// エラーメッセージの表示
var
errMes
=
I18N
.
i18nText
(
'msgPageImgErr'
);
//if( errMsg == undefined || errMsg == "" ){
// errMes = I18N.i18nText('msgPageImgErr');
//}
$
(
'#divImageLoading'
).
css
(
'display'
,
'none'
);
COMMON
.
lockLayout
();
/* show error messages */
...
...
@@ -1124,8 +1006,7 @@ CONTENTVIEW.changePage = function(page_index) {
if
(
CONTENTVIEW_GENERAL
.
contentType
==
COMMON
.
ContentTypeKeys
.
Type_PDF
){
console
.
log
(
"CONTENTVIEW.changePage"
);
//console.log("CONTENTVIEW.changePage");
AVWEB
.
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
CONTENTVIEW_GENERAL
.
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
page_index
+
1
},
function
(
data
)
{
...
...
@@ -1255,10 +1136,10 @@ CONTENTVIEW.drawMouseMove = function(contextDraw, ev) {
{
x
:
CONTENTVIEW_GENERAL
.
sx
-
quotSize
,
y
:
CONTENTVIEW_GENERAL
.
sy
+
halfSize
}
];
var
ptEnd
=
[
{
x
:
ev
.
_x
-
quotSize
,
y
:
ev
.
_y
-
halfSize
},
{
x
:
ev
.
_x
+
quotSize
,
y
:
ev
.
_y
-
halfSize
},
{
x
:
ev
.
_x
+
quotSize
,
y
:
ev
.
_y
+
halfSize
},
{
x
:
ev
.
_x
-
quotSize
,
y
:
ev
.
_y
+
halfSize
}
{
x
:
ev
.
_x
-
quotSize
,
y
:
ev
.
_y
-
halfSize
},
{
x
:
ev
.
_x
+
quotSize
,
y
:
ev
.
_y
-
halfSize
},
{
x
:
ev
.
_x
+
quotSize
,
y
:
ev
.
_y
+
halfSize
},
{
x
:
ev
.
_x
-
quotSize
,
y
:
ev
.
_y
+
halfSize
}
];
if
(
CONTENTVIEW_GENERAL
.
sx
>
ev
.
_x
)
{
if
(
CONTENTVIEW_GENERAL
.
sy
>
ev
.
_y
)
{
...
...
@@ -1277,7 +1158,7 @@ CONTENTVIEW.drawMouseMove = function(contextDraw, ev) {
contextDraw
.
globalCompositeOperation
=
'lighter'
;
contextDraw
.
closePath
();
contextDraw
.
beginPath
();
//
蟾ヲ荳翫↓謠冗判縺吶k蝣エ蜷・
//
contextDraw
.
moveTo
(
ptStart
[
1
].
x
,
ptStart
[
1
].
y
);
contextDraw
.
lineTo
(
ptStart
[
2
].
x
,
ptStart
[
2
].
y
);
contextDraw
.
lineTo
(
ptStart
[
3
].
x
,
ptStart
[
3
].
y
);
...
...
@@ -1301,8 +1182,7 @@ CONTENTVIEW.drawMouseMove = function(contextDraw, ev) {
contextDraw
.
globalCompositeOperation
=
'lighter'
;
contextDraw
.
closePath
();
contextDraw
.
beginPath
();
// 蟾ヲ荳九↓謠冗判縺吶k蝣エ蜷・
//
contextDraw
.
moveTo
(
ptStart
[
0
].
x
,
ptStart
[
0
].
y
);
contextDraw
.
lineTo
(
ptStart
[
1
].
x
,
ptStart
[
1
].
y
);
contextDraw
.
lineTo
(
ptStart
[
2
].
x
,
ptStart
[
2
].
y
);
...
...
@@ -1324,8 +1204,7 @@ CONTENTVIEW.drawMouseMove = function(contextDraw, ev) {
contextDraw
.
globalCompositeOperation
=
'lighter'
;
contextDraw
.
closePath
();
contextDraw
.
beginPath
();
// 蟾ヲ縺ォ謠冗判縺吶k蝣エ蜷・
//
contextDraw
.
moveTo
(
ptStart
[
1
].
x
,
ptStart
[
1
].
y
);
contextDraw
.
lineTo
(
ptStart
[
2
].
x
,
ptStart
[
2
].
y
);
contextDraw
.
lineTo
(
ptEnd
[
3
].
x
,
ptEnd
[
3
].
y
);
...
...
@@ -1349,8 +1228,7 @@ CONTENTVIEW.drawMouseMove = function(contextDraw, ev) {
contextDraw
.
globalCompositeOperation
=
'lighter'
;
contextDraw
.
closePath
();
contextDraw
.
beginPath
();
// 蜿ウ荳翫↓謠冗判縺吶k蝣エ蜷・
//
contextDraw
.
moveTo
(
ptStart
[
2
].
x
,
ptStart
[
2
].
y
);
contextDraw
.
lineTo
(
ptStart
[
3
].
x
,
ptStart
[
3
].
y
);
contextDraw
.
lineTo
(
ptStart
[
0
].
x
,
ptStart
[
0
].
y
);
...
...
@@ -1375,7 +1253,7 @@ CONTENTVIEW.drawMouseMove = function(contextDraw, ev) {
contextDraw
.
closePath
();
contextDraw
.
beginPath
();
//
蜿ウ荳九↓謠冗判縺吶k蝣エ蜷・
//
contextDraw
.
moveTo
(
ptStart
[
3
].
x
,
ptStart
[
3
].
y
);
contextDraw
.
lineTo
(
ptStart
[
0
].
x
,
ptStart
[
0
].
y
);
contextDraw
.
lineTo
(
ptStart
[
1
].
x
,
ptStart
[
1
].
y
);
...
...
@@ -1397,8 +1275,7 @@ CONTENTVIEW.drawMouseMove = function(contextDraw, ev) {
contextDraw
.
globalCompositeOperation
=
'lighter'
;
contextDraw
.
closePath
();
contextDraw
.
beginPath
();
// 蜿ウ縺ォ謠冗判縺吶k蝣エ蜷・
//
contextDraw
.
moveTo
(
ptStart
[
3
].
x
,
ptStart
[
3
].
y
);
contextDraw
.
lineTo
(
ptStart
[
0
].
x
,
ptStart
[
0
].
y
);
contextDraw
.
lineTo
(
ptEnd
[
1
].
x
,
ptEnd
[
1
].
y
);
...
...
@@ -1420,8 +1297,7 @@ CONTENTVIEW.drawMouseMove = function(contextDraw, ev) {
contextDraw
.
globalCompositeOperation
=
'lighter'
;
contextDraw
.
closePath
();
contextDraw
.
beginPath
();
// 荳翫↓謠冗判縺吶k蝣エ蜷・
//
contextDraw
.
moveTo
(
ptStart
[
2
].
x
,
ptStart
[
2
].
y
);
contextDraw
.
lineTo
(
ptStart
[
3
].
x
,
ptStart
[
3
].
y
);
contextDraw
.
lineTo
(
ptEnd
[
0
].
x
,
ptEnd
[
0
].
y
);
...
...
@@ -1441,8 +1317,7 @@ CONTENTVIEW.drawMouseMove = function(contextDraw, ev) {
contextDraw
.
globalCompositeOperation
=
'lighter'
;
contextDraw
.
closePath
();
contextDraw
.
beginPath
();
// 荳九↓謠冗判縺吶k蝣エ蜷・
//
contextDraw
.
moveTo
(
ptStart
[
0
].
x
,
ptStart
[
0
].
y
);
contextDraw
.
lineTo
(
ptStart
[
1
].
x
,
ptStart
[
1
].
y
);
contextDraw
.
lineTo
(
ptEnd
[
2
].
x
,
ptEnd
[
2
].
y
);
...
...
@@ -1462,8 +1337,7 @@ CONTENTVIEW.drawMouseMove = function(contextDraw, ev) {
contextDraw
.
globalCompositeOperation
=
'lighter'
;
contextDraw
.
closePath
();
contextDraw
.
beginPath
();
// 遘サ蜍輔↑縺励・蝣エ蜷・
//
contextDraw
.
moveTo
(
ptStart
[
0
].
x
,
ptStart
[
0
].
y
);
contextDraw
.
lineTo
(
ptStart
[
1
].
x
,
ptStart
[
1
].
y
);
contextDraw
.
lineTo
(
ptStart
[
2
].
x
,
ptStart
[
2
].
y
);
...
...
@@ -1485,7 +1359,6 @@ CONTENTVIEW.drawMouseMove = function(contextDraw, ev) {
CONTENTVIEW_GENERAL
.
sx
=
ev
.
_x
;
CONTENTVIEW_GENERAL
.
sy
=
ev
.
_y
;
}
};
...
...
@@ -1619,7 +1492,6 @@ CONTENTVIEW.tool_drawing = function() {
}
};
this
.
mouseup
=
function
(
ev
)
{
if
(
tool
.
started
)
{
//tool.mousemove(ev);
...
...
@@ -1665,7 +1537,6 @@ CONTENTVIEW.tool_drawing = function() {
ev
.
preventDefault
();
};
this
.
touchmove
=
function
(
ev
)
{
...
...
@@ -1687,7 +1558,6 @@ CONTENTVIEW.tool_drawing = function() {
ev
.
preventDefault
();
};
this
.
touchend
=
function
(
ev
)
{
...
...
@@ -2050,8 +1920,7 @@ CONTENTVIEW.changePageWithoutSlide = function(pageMove) {
if
(
CONTENTVIEW_GENERAL
.
contentType
==
COMMON
.
ContentTypeKeys
.
Type_PDF
){
console
.
log
(
"CONTENTVIEW.changePageWithoutSlide"
);
//console.log("CONTENTVIEW.changePageWithoutSlide");
AVWEB
.
avwGrabContentPageImage
(
ClientData
.
userInfo_accountPath
(),
{
contentId
:
CONTENTVIEW_GENERAL
.
contentID
,
sid
:
ClientData
.
userInfo_sid
(),
pageNo
:
pageMove
+
1
},
function
(
data
)
{
...
...
@@ -2363,7 +2232,7 @@ CONTENTVIEW.handleForContentTypeVideo = function(resourceUrl){
var
myVideo
=
document
.
getElementById
(
"content_video"
);
if
(
myVideo
.
paused
)
{
myVideo
.
play
();
myVideo
.
play
();
}
$
(
"#contentVideoConfirm"
).
hide
();
...
...
@@ -2525,41 +2394,6 @@ CONTENTVIEW.enableControlForMediaAndHtmlType = function(){
};
//Enable control for type image and none
//function enableControlForImageAndNoneType(){
// /* set cursor pointer*/
// $("#imgHome").css('cursor', 'pointer');
// $("#imgBack").css('cursor', 'pointer');
//
// $("#control_screen").removeClass();
// $("#control_screen_2").removeClass();
//
// $('#imgHome').bind('click', CONTENTVIEW_EVENTS.imgHome_click);
// $('#imgHome').removeClass();
//
// $('#imgBack').bind('click', CONTENTVIEW_EVENTS.imgBack_click);
// $('#imgBack').removeClass();
//
// $("#control_screen").bind('click', CONTENTVIEW.fullScreenForNotPdfType);
// $("#control_screen_2").bind('click', CONTENTVIEW.originalScreenForNotPdfType);
//
// if (COMMON.isTouchDevice() == true) {/* set css for device */
// $('#imgHome').addClass('home_device');
// $('#imgBack').addClass('back_device');
//
// $("#control_screen").addClass('toolbar_device');
// //$("#control_screen_2").addClass('toolbar_device');
// $("#control_screen_2").addClass('toolbar_close_device');
//
// } else { /* set css for PC */
// $('#imgHome').addClass('home');
// $('#imgBack').addClass('back');
//
// $("#control_screen").addClass('toolbar');
// $("#control_screen_2").addClass('toolbar_close');
// }
//};
//Full screen function for not pdf type
CONTENTVIEW
.
fullScreenForNotPdfType
=
function
(){
...
...
@@ -3255,41 +3089,9 @@ CONTENTVIEW.ContentPage.prototype.drawPage = function (context, opt) {
CONTENTVIEW_GENERAL
.
widthEachPrevPageApi
=
CONTENTVIEW_GENERAL
.
widthContentImage
;
CONTENTVIEW_GENERAL
.
heightEachPrevPageApi
=
CONTENTVIEW_GENERAL
.
heightContentImage
;
}
/* set width canvas */
/*
if (width > height) {
if (CONTENTVIEW_GENERAL.widthContentImage > CONTENTVIEW_GENERAL.heightContentImage) {
CONTENTVIEW_GENERAL.widthEachPage = CONTENTVIEW_GENERAL.widthContentImage;
CONTENTVIEW_GENERAL.heightEachPage = CONTENTVIEW_GENERAL.heightContentImage;
} else {
CONTENTVIEW_GENERAL.widthEachPage = CONTENTVIEW_GENERAL.heightContentImage;
CONTENTVIEW_GENERAL.heightEachPage = CONTENTVIEW_GENERAL.widthContentImage;
}
} else {
if (CONTENTVIEW_GENERAL.widthContentImage < CONTENTVIEW_GENERAL.heightContentImage) {
CONTENTVIEW_GENERAL.widthEachPage = CONTENTVIEW_GENERAL.widthContentImage;
CONTENTVIEW_GENERAL.heightEachPage = CONTENTVIEW_GENERAL.heightContentImage;
} else {
CONTENTVIEW_GENERAL.widthEachPage = heightContentImage;
CONTENTVIEW_GENERAL.heightEachPage = CONTENTVIEW_GENERAL.widthContentImage;
}
}*/
if
(
CONTENTVIEW_GENERAL
.
contentType
==
COMMON
.
ContentTypeKeys
.
Type_PDF
){
//#11478
//if(opt == null || opt == 0){
// $("#offscreen").attr('height', CONTENTVIEW_GENERAL.heightEachPage);
// $("#offscreen").attr('width', CONTENTVIEW_GENERAL.widthEachPage);
//}
//else if(opt == 1){
// $("#offscreenNext").attr('height', CONTENTVIEW_GENERAL.heightEachNextPage);
// $("#offscreenNext").attr('width', CONTENTVIEW_GENERAL.widthEachNextPage);
//}
//else if(opt == 2){
// $("#offscreenPre").attr('height', CONTENTVIEW_GENERAL.heightEachPrevPage);
// $("#offscreenPre").attr('width', CONTENTVIEW_GENERAL.widthEachPrevPage);
//}
//
}
else
{
if
(
opt
==
null
||
opt
==
0
){
...
...
@@ -3713,13 +3515,13 @@ CONTENTVIEW.setDefaultEvent = function() {
//#12408 ホイール対応
// MouseScrollEvent に対応している(FireFox 専用)
if
(
window
.
MouseScrollEvent
){
//console.log("addEventListener DOMMouseScroll");
//console.log("addEventListener DOMMouseScroll");
document
.
getElementById
(
'main'
).
addEventListener
(
'DOMMouseScroll'
,
function
(
event
){
CONTENTVIEW_EVENTS
.
mouseWheel_CanvasMain
(
event
,
event
.
detail
);
},
false
);
// FireFox 以外の主要ブラウザの場合
}
else
{
//console.log("addEventListener mousewheel");
//console.log("addEventListener mousewheel");
var
mousewheelevent
=
'onwheel'
in
document
?
'wheel'
:
'onmousewheel'
in
document
?
'mousewheel'
:
'DOMMouseScroll'
;
document
.
getElementById
(
'main'
).
addEventListener
(
mousewheelevent
,
function
(
e
){
CONTENTVIEW_EVENTS
.
mouseWheel_CanvasMain
(
event
,
-
(
e
.
wheelDelta
/
40
));
...
...
@@ -4104,11 +3906,6 @@ CONTENTVIEW.screenToImage = function(x, y) {
return
pt
;
};
////Start Function : No.4 - Editor : Long - Date: 08/09/2013 - Summary : Edit function adjust page to draw multi canvas
///* Adjust page size */
//CONTENTVIEW.adjustPage = function(opt) {
// CONTENTVIEW.drawCanvas(opt);
//};
/* draw Canvas */
CONTENTVIEW
.
drawCanvas
=
function
(
opt
)
{
...
...
@@ -4143,7 +3940,6 @@ CONTENTVIEW.drawCanvas = function(opt) {
CONTENTVIEW
.
draw
(
context
,
2
);
}
};
//End Function : No.4 - Editor : Long - Date: 08/09/2013 - Summary : Edit function adjust page to draw multi canvas
/* draw memo */
CONTENTVIEW
.
drawMemoOnScreen
=
function
(
opt
)
{
...
...
@@ -4783,12 +4579,6 @@ CONTENTVIEW.flip = function(opt) {
CONTENTVIEW_GENERAL
.
isFirstLoad
=
false
;
}
//CONTENTVIEW.leftCanvas = destX;
//CONTENTVIEW.topCanvas = destY;
// change scale
//CONTENTVIEW.scaleX = offscreen.width / width;
//CONTENTVIEW.scaleY = offscreen.height / height;
// draw canvas
context
.
clearRect
(
0
,
0
,
canvas
.
width
,
canvas
.
height
);
...
...
@@ -4802,17 +4592,6 @@ CONTENTVIEW.flip = function(opt) {
};
//End Function : No.4 - Editor : Long - Date: 08/09/2013 - Summary : Edit function to draw multi canvas
///* handle display controls of video */
//CONTENTVIEW.showControlsVideo = function(target) {
// $(target).click(function () {
// $(target).attr('controls', '');
// });
// $(target).mouseout(function () {
// $(target).removeAttr('controls');
// });
// $(target).removeAttr('controls');
//};
/* show video*/
CONTENTVIEW
.
showVideoObject
=
function
(
x
,
y
,
width
,
height
,
src
,
isFullscreen
)
{
...
...
@@ -5138,17 +4917,6 @@ CONTENTVIEW.zoomVideo = function() {
}
};
//未使用
//var zoom = function (clicks) {
//
// var pt = CONTENTVIEW_GENERAL.context_main.transformedPoint(lastX, lastY);
// CONTENTVIEW_GENERAL.context_main.translate(lastX, lastY);
// var factor = Math.pow(CONTENTVIEW.scaleFactor, clicks);
// CONTENTVIEW_GENERAL.context_main.scale(factor, factor);
// maxposY += CONTENTVIEW_GENERAL.canvas_main.width * (factor - 1);
// CONTENTVIEW_GENERAL.context_main.translate(-lastX, -lastY);
//};
// Adds ctx.getTransform() - returns an SVGMatrix
// Adds ctx.transformedPoint(x,y) - returns an SVGPoint
CONTENTVIEW
.
trackTransforms
=
function
(
ctx
)
{
...
...
@@ -5512,24 +5280,6 @@ CONTENTVIEW.changeScale = function(scale) {
}
};
///* change Scale screen*/
//CONTENTVIEW.changeScaleDrawCanvas = function(scale) {
// var canvas = document.getElementById('draw_canvas');
// var offScreen = document.getElementById('draw_canvas');
//
// var sc = CONTENTVIEW.srcRect.center();
//
// var sw = offScreen.width, sh = offScreen.height;
// sw /= scale;
// sh /= scale;
// CONTENTVIEW.srcRect.left = sc.x - Math.floor(sw / 2);
// CONTENTVIEW.srcRect.top = sc.y - Math.floor(sh / 2);
// CONTENTVIEW.srcRect.right = CONTENTVIEW.srcRect.left + sw;
// CONTENTVIEW.srcRect.bottom = CONTENTVIEW.srcRect.top + sh;
// CONTENTVIEW.srcRect.width = sw;
// CONTENTVIEW.srcRect.height = sh;
//};
//Start Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
CONTENTVIEW
.
is3DObject
=
function
(
pageContent
){
...
...
@@ -5545,3 +5295,4 @@ CONTENTVIEW.is3DObject = function(pageContent){
return
result
;
};
//End Function : No.9 - Editor : Long - Date : 08/16/2013 - Summary :
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment