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
ef9454d5
Commit
ef9454d5
authored
Jul 10, 2014
by
Masaru Abe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#12373 #12408 ページ遷移時の拡大率保持とホイールでの上下スクロール対応
parent
491dcbc8
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
121 additions
and
15 deletions
+121
-15
abvw/js/contentview.js
+16
-9
abvw/js/contentview_CreateObjects.js
+61
-4
abvw/js/contentview_Events.js
+40
-1
abvw/js/contentview_GetData.js
+4
-1
No files found.
abvw/js/contentview.js
View file @
ef9454d5
/// <reference path="../common/js/jquery-ui-1.8.23.custom.min.js" />
/// <reference path="../common/js/common.js" />
/// <reference path="contentview_VarDef.js" />
/// <reference path="contentview_CallApi.js" />
/// <reference path="contentview_GetData.js" />
/// <reference path="contentview_InitObjects.js" />
/// <reference path="contentview_Events.js" />
/* change size */
function
sizingScreen
()
{
var
w
,
h
;
...
...
@@ -3683,9 +3675,24 @@ function setDefaultEvent() {
if
(
avwUserEnvObj
.
os
!=
"ipad"
&&
avwUserEnvObj
.
os
!=
"android"
){
document
.
getElementById
(
'main'
).
addEventListener
(
'mousedown'
,
mouseDown_CanvasMain
,
false
);
document
.
getElementById
(
'main'
).
addEventListener
(
'mousemove'
,
mouseMove_
c
anvasMain
,
false
);
document
.
getElementById
(
'main'
).
addEventListener
(
'mousemove'
,
mouseMove_
C
anvasMain
,
false
);
document
.
getElementById
(
'main'
).
addEventListener
(
'mouseup'
,
mouseUp_CanvasMain
,
false
);
//#12408 ホイール対応
// MouseScrollEvent に対応している(FireFox 専用)
if
(
window
.
MouseScrollEvent
){
console
.
log
(
"addEventListener DOMMouseScroll"
);
document
.
getElementById
(
'main'
).
addEventListener
(
'DOMMouseScroll'
,
function
(
event
){
mouseWheel_CanvasMain
(
event
,
event
.
detail
);
},
false
);
// FireFox 以外の主要ブラウザの場合
}
else
{
console
.
log
(
"addEventListener mousewheel"
);
document
.
getElementById
(
'main'
).
addEventListener
(
'mousewheel'
,
function
(
e
){
mouseWheel_CanvasMain
(
event
,
event
.
wheelDelta
);
},
false
);
}
if
(
avwUserEnvObj
.
browser
==
'msie'
)
{
_bWin8TouchEnabled
=
window
.
navigator
.
msPointerEnabled
;
}
else
{
...
...
abvw/js/contentview_CreateObjects.js
View file @
ef9454d5
...
...
@@ -1715,6 +1715,9 @@ var Transition = function () { };
/* Flip Next Page Transition */
Transition
.
prototype
.
flipNextPage
=
function
()
{
//#12373
var
tmpScale
=
1
;
var
w
=
$
(
'#canvasWrapper'
).
width
();
removeObject
();
if
(
animateType
==
animateTypeKeys
.
Type_FadeIn
){
...
...
@@ -1728,15 +1731,19 @@ Transition.prototype.flipNextPage = function () {
if
(
getContent
().
hasNextPage
())
{
tmpScale
=
userScale
;
userScale
=
1
;
flip
(
1
);
if
(
animateType
==
animateTypeKeys
.
Type_Slide
){
$
(
'#canvasWrapper'
).
stop
(
true
).
animate
(
{
left
:
'-'
+
w
+
'px'
},
{
duration
:
animatePeriod
,
complete
:
function
()
{
assignCurrentContentPage
(
1
);
//Change id of canvas
switchCanvas
(
1
);
...
...
@@ -1749,7 +1756,6 @@ Transition.prototype.flipNextPage = function () {
//Change slider
changeSlider
(
getContent
().
pageIndex
);
//Draw marking on current screen
//drawMarkingOnScreen();
...
...
@@ -1791,6 +1797,16 @@ Transition.prototype.flipNextPage = function () {
SetEndLog
(
contentID
);
createLockLayout
(
false
);
initImageCheckMarking
();
//#12373
//console.log("tmpScale:" + tmpScale);
if
(
tmpScale
!=
1
)
{
userScale
=
tmpScale
;
changeScale
(
userScale
);
flip
();
checkDisableButtonZoom
();
}
}
});
}
...
...
@@ -1862,6 +1878,10 @@ Transition.prototype.flipNextPage = function () {
};
/* Flip Previous Page Transition */
Transition
.
prototype
.
flipPreviousPage
=
function
()
{
//#12373
var
tmpScale
=
1
;
var
w
=
$
(
'#canvasWrapper'
).
width
();
removeObject
();
if
(
animateType
==
animateTypeKeys
.
Type_FadeIn
){
...
...
@@ -1872,7 +1892,12 @@ Transition.prototype.flipPreviousPage = function () {
else
{
$
(
'#mainPre'
).
css
(
'display'
,
'block'
);
}
if
(
getContent
().
hasPreviousPage
())
{
if
(
getContent
().
hasPreviousPage
())
{
tmpScale
=
userScale
;
userScale
=
1
;
flip
(
2
);
if
(
animateType
==
animateTypeKeys
.
Type_Slide
){
$
(
'#canvasWrapper'
).
stop
(
true
).
animate
(
{
left
:
w
+
'px'
},
...
...
@@ -1933,6 +1958,17 @@ Transition.prototype.flipPreviousPage = function () {
SetEndLog
(
contentID
);
createLockLayout
(
false
);
initImageCheckMarking
();
//#12373
//console.log("tmpScale:" + tmpScale);
if
(
tmpScale
!=
1
)
{
userScale
=
tmpScale
;
changeScale
(
userScale
);
flip
();
checkDisableButtonZoom
();
}
}
});
}
...
...
@@ -2004,6 +2040,9 @@ Transition.prototype.flipPreviousPage = function () {
/* Flip Page Transition */
Transition
.
prototype
.
flipToPage
=
function
(
index
)
{
//#12373
var
tmpScale
=
userScale
;
var
w
=
$
(
'#main'
).
attr
(
'width'
);
if
(
index
==
getContent
().
pageIndex
)
{
...
...
@@ -2076,6 +2115,15 @@ Transition.prototype.flipToPage = function (index) {
initImageCheckMarking
();
createLockLayout
(
false
);
//#12373
//console.log("tmpScale:" + tmpScale);
if
(
tmpScale
!=
1
)
{
userScale
=
tmpScale
;
changeScale
(
userScale
);
flip
();
}
}
}
);
...
...
@@ -2146,6 +2194,15 @@ Transition.prototype.flipToPage = function (index) {
initImageCheckMarking
();
createLockLayout
(
false
);
//#12373
//console.log("tmpScale:" + tmpScale);
if
(
tmpScale
!=
1
)
{
userScale
=
tmpScale
;
changeScale
(
userScale
);
flip
();
}
}
});
}
...
...
abvw/js/contentview_Events.js
View file @
ef9454d5
...
...
@@ -953,7 +953,46 @@ function onClick_CanvasMain(event) {
cancelClick
=
false
;
};
function
mouseMove_canvasMain
(
event
)
{
//#12408 ホイール対応
function
mouseWheel_CanvasMain
(
event
,
detail
)
{
//console.log("mouseWheel:" + detail);
event
.
preventDefault
();
if
(
_isTouching
){
return
;
}
if
(
ClientData
.
IsAddingMarking
()
==
true
){
return
;
}
if
(
isLoadingObject
){
moveFlag
=
false
;
}
/* base image move when userScale over 1 */
if
(
userScale
!=
1
)
{
//$('#main').css('cursor', 'pointer');
//var sx = 1 / userScale;
var
sy
=
1
/
userScale
;
// calc scaling moving distance
//moveX = Math.round(detail * sx);
moveY
=
Math
.
round
(
detail
*
sy
*
20
);
//20は感覚的な移動量の補正
// redraw
flip
();
zoomVideo
();
closeDialogPopUpText
();
}
};
function
mouseMove_CanvasMain
(
event
)
{
event
.
preventDefault
();
...
...
abvw/js/contentview_GetData.js
View file @
ef9454d5
...
...
@@ -1472,9 +1472,11 @@ function switchCanvas(nav){
destRectPrev
=
destRect
;
destRect
=
destRectNext
;
//#12373
userScale
=
1
;
changeScale
(
userScale
);
flip
();
//#12373
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
}
else
{
...
...
@@ -1508,9 +1510,10 @@ function switchCanvas(nav){
destRectNext
=
destRect
;
destRect
=
destRectPrev
;
//#12373
userScale
=
1
;
//#12373
changeScale
(
userScale
);
flip
();
//END TRB00097 - Editor: Long - Date: 09/30/2013 - Summary : Get All Page size of content
}
...
...
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