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
d45fb58d
Commit
d45fb58d
authored
Jun 03, 2014
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
拡大イベント対応
parent
ebc197e9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
7 deletions
+82
-7
abvw/common/js/common.js
+15
-7
abvw/js/contentview.js
+66
-0
abvw/js/contentview_CreateObjects.js
+1
-0
No files found.
abvw/common/js/common.js
View file @
d45fb58d
...
...
@@ -2404,7 +2404,6 @@ function SetObjectLog( strContentId, objectLog ){
for
(
var
nIndex
=
0
;
nIndex
<
arrContentLogs
.
length
;
nIndex
++
)
{
if
(
arrContentLogs
[
nIndex
].
contentid
==
strContentId
)
{
//ObjectLog追加
arrContentLogs
[
nIndex
].
objectLogArray
.
push
(
objectLog
);
...
...
@@ -2437,6 +2436,7 @@ function SetObjectLogActionTime( strContentId, objectId, actionTime ){
Register reading log of content to server by calling api
*/
function
RegisterLog
()
{
var
arrContentLogs
=
ClientData
.
ContentLogData
();
var
isError
=
false
;
...
...
@@ -2498,11 +2498,12 @@ function RegisterLog() {
pageLogJson
=
"{ header:[
\"
pageNo
\"
,
\"
readingStartDate
\"
,
\"
readingEndDate
\"
,
\"
readingTime
\"
],lines:"
;
pageLogJson
=
pageLogJson
+
JSON
.
stringify
(
lines
);
pageLogJson
=
pageLogJson
+
"}"
;
//
alert
("JSON:" + pageLogJson);
//
console.log
("JSON:" + pageLogJson);
}
}
var
objectLogArray
=
arrContentLogs
[
nIndex
].
objectLogArray
;
//詳細ログオプションが有効ならページ閲覧ログデータ作成
if
(
objectLogArray
.
length
>
0
){
...
...
@@ -2514,7 +2515,7 @@ function RegisterLog() {
actionDate
=
new
Date
(
objectLogArray
[
nIndex2
].
actionDate
);
var
line
=
[];
if
(
objectLogArray
[
nIndex2
].
objectId
){
if
(
objectLogArray
[
nIndex2
].
objectId
!=
null
){
line
.
push
(
actionDate
.
jpDateTimeString1
());
line
.
push
(
objectLogArray
[
nIndex2
].
pageNo
);
line
.
push
(
objectLogArray
[
nIndex2
].
objectId
);
...
...
@@ -2527,18 +2528,25 @@ function RegisterLog() {
line
.
push
(
objectLogArray
[
nIndex2
].
locationY
);
line
.
push
(
objectLogArray
[
nIndex2
].
locationHeight
);
line
.
push
(
objectLogArray
[
nIndex2
].
locationWidth
);
if
(
objectLogArray
[
nIndex2
].
eventType
!=
null
){
line
.
push
(
objectLogArray
[
nIndex2
].
eventType
);
}
else
{
line
.
push
(
""
);
}
lines
.
push
(
line
);
//alert("ObjectLog Line:" + JSON.stringify( line ) );
//console.log("ObjectLog Line:" + JSON.stringify( line ) );
}
}
//
alert
("ObjectLog Lines:" + JSON.stringify( lines ) );
//
console.log
("ObjectLog Lines:" + JSON.stringify( lines ) );
if
(
lines
.
length
>
0
){
objectLogJson
=
"{ header:[
\"
actionDate
\"
,
\"
pageNo
\"
,
\"
objectId
\"
,
\"
resourceId
\"
,
\"
mediaType
\"
,
\"
actionType
\"
,
\"
actionValue
\"
,
\"
actionTime
\"
,
\"
locationX
\"
,
\"
locationY
\"
,
\"
locationHeight
\"
,
\"
locationWidth
\"
],"
;
objectLogJson
=
"{ header:[
\"
actionDate
\"
,
\"
pageNo
\"
,
\"
objectId
\"
,
\"
resourceId
\"
,
\"
mediaType
\"
,
\"
actionType
\"
,
\"
actionValue
\"
,
\"
actionTime
\"
,
\"
locationX
\"
,
\"
locationY
\"
,
\"
locationHeight
\"
,
\"
locationWidth
\"
,
\"
eventType
\"
],"
;
objectLogJson
=
objectLogJson
+
"lines:"
;
objectLogJson
=
objectLogJson
+
JSON
.
stringify
(
lines
);
objectLogJson
=
objectLogJson
+
"}"
;
//
alert
("JSON:" + objectLogJson);
//
console.log
("JSON:" + objectLogJson);
}
}
...
...
abvw/js/contentview.js
View file @
d45fb58d
...
...
@@ -3566,6 +3566,7 @@ var isDestPositionDetect = false;
var
destPosX
=
0
,
destPosY
=
0
;
var
moveX
=
0
,
moveY
=
0
;
var
userScale
=
1
;
var
userScaleNow
=
1
;
var
scaleDelta
=
0.5
;
var
scaleX
,
scaleY
;
var
canvasObject
;
...
...
@@ -5316,6 +5317,7 @@ function screenFit() {
context_main
.
clearRect
(
0
,
0
,
canvas_main
.
width
,
canvas_main
.
height
);
srcRect
=
new
Rect
(
0
,
0
,
offScreen
.
width
,
offScreen
.
height
);
userScale
=
1
;
userScaleNow
=
1
;
moveX
=
0
;
moveY
=
0
;
...
...
@@ -5343,6 +5345,14 @@ function screenFit() {
/* change Scale screen*/
function
changeScale
(
scale
)
{
//拡大か判定
var
isZoom
=
false
;
if
(
userScaleNow
<
scale
){
isZoom
=
true
;
}
userScaleNow
=
scale
;
var
canvas
=
document
.
getElementById
(
'main'
);
var
offScreen
=
document
.
getElementById
(
'offscreen'
);
...
...
@@ -5415,6 +5425,62 @@ function changeScale(scale) {
srcRect
.
bottom
=
Math
.
round
(
srcRect
.
top
+
sh
);
srcRect
.
width
=
srcRect
.
right
-
srcRect
.
left
;
srcRect
.
height
=
srcRect
.
bottom
-
srcRect
.
top
;
if
(
isZoom
){
//var tempRatioWidth = offScreen.width / widthEachPageApi;
var
tempRatioWidth
=
widthEachPageApi
/
offScreen
.
width
;
if
(
tempRatioWidth
>
1
){
tempRatioWidth
=
1
;
}
//var tempRatioHeight = offScreen.height / heightEachPageApi;
var
tempRatioHeight
=
heightEachPageApi
/
offScreen
.
height
;
if
(
tempRatioHeight
>
1
){
tempRatioHeight
=
1
;
}
var
tmpX
=
0
;
var
tmpY
=
0
;
if
(
srcRect
.
top
>
0
){
tmpX
=
Math
.
round
(
srcRect
.
top
*
tempRatioWidth
);
}
if
(
srcRect
.
left
>
0
){
tmpY
=
Math
.
round
(
srcRect
.
left
*
tempRatioHeight
);
}
var
tmpW
=
Math
.
round
(
srcRect
.
width
*
tempRatioWidth
);
var
tmpH
=
Math
.
round
(
srcRect
.
height
*
tempRatioHeight
);
var
zoomX
=
tmpX
+
Math
.
round
(
tmpH
/
2
);
var
zoomY
=
tmpY
+
Math
.
round
(
tmpW
/
2
);
//console.log("tempRatio.width:height " + tempRatioWidth + "," + tempRatioHeight);
//console.log("srcRect.left:top " + srcRect.left + "," + srcRect.top);
//console.log("srcRect.width:height " + srcRect.width + "," + srcRect.height);
//console.log("tmpX.Y " + tmpX + "," + tmpY);
//console.log("tmpW.H " + tmpW + "," + tmpH);
//console.log("zoomX.Y " + zoomX + "," + zoomY);
//詳細ログ作成
var
objectLog
=
new
ObjectLogEntity
();
objectLog
.
contentid
=
contentID
;
objectLog
.
pageNo
=
getPageIndex
()
+
1
;
//0始まりのページ番号
objectLog
.
objectId
=
0
;
objectLog
.
resourceId
=
""
;
objectLog
.
mediaType
=
""
;
objectLog
.
actionType
=
"101"
;
//拡大アクション定数
objectLog
.
actionValue
=
""
;
objectLog
.
actionTime
=
"0"
;
objectLog
.
locationX
=
zoomX
;
objectLog
.
locationY
=
zoomY
;
objectLog
.
locationHeight
=
""
;
objectLog
.
locationWidth
=
""
;
objectLog
.
eventType
=
"5"
;
//暫定でピンチアウト
SetObjectLog
(
contentID
,
objectLog
);
//---
}
};
/* change Scale screen*/
function
changeScaleDrawCanvas
(
scale
)
{
...
...
abvw/js/contentview_CreateObjects.js
View file @
d45fb58d
...
...
@@ -2028,6 +2028,7 @@ Transition.prototype.flipToPage = function (index) {
});
//change pageIndex and image bookmark
userScale
=
1
;
userScaleNow
=
1
;
//START TRB00097
//changeScale(userScale);
srcRect
=
new
Rect
(
0
,
0
,
0
,
0
);
...
...
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