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
eaccfcfd
Commit
eaccfcfd
authored
Jan 13, 2021
by
Kim Eunchul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#41178【課題5】[TTSSBiz Web]PDF閲覧時障害
parent
8f029a2a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
14 deletions
+60
-14
abvw/js/contentview.js
+60
-14
No files found.
abvw/js/contentview.js
View file @
eaccfcfd
...
...
@@ -4781,16 +4781,14 @@ CONTENTVIEW.flip = function(opt) {
if
(
CONTENTVIEW
.
srcRect
.
left
<
0
)
{
CONTENTVIEW
.
srcRect
.
left
=
0
;
CONTENTVIEW
.
srcRect
.
right
=
CONTENTVIEW
.
srcRect
.
left
+
CONTENTVIEW
.
srcRect
.
width
;
}
if
(
CONTENTVIEW
.
srcRect
.
right
>
offscreen
.
width
)
{
}
else
if
(
CONTENTVIEW
.
srcRect
.
right
>
offscreen
.
width
)
{
CONTENTVIEW
.
srcRect
.
left
=
offscreen
.
width
-
CONTENTVIEW
.
srcRect
.
width
;
CONTENTVIEW
.
srcRect
.
right
=
offscreen
.
width
;
}
if
(
CONTENTVIEW
.
srcRect
.
top
<
0
)
{
CONTENTVIEW
.
srcRect
.
top
=
0
;
CONTENTVIEW
.
srcRect
.
bottom
=
CONTENTVIEW
.
srcRect
.
top
+
CONTENTVIEW
.
srcRect
.
height
;
}
if
(
CONTENTVIEW
.
srcRect
.
bottom
>
offscreen
.
height
)
{
}
else
if
(
CONTENTVIEW
.
srcRect
.
bottom
>
offscreen
.
height
)
{
CONTENTVIEW
.
srcRect
.
top
=
offscreen
.
height
-
CONTENTVIEW
.
srcRect
.
height
;
CONTENTVIEW
.
srcRect
.
bottom
=
offscreen
.
height
;
}
...
...
@@ -5124,31 +5122,52 @@ CONTENTVIEW.flip = function(opt) {
context
.
translate
(
-
(
canvas
.
width
/
2
),
-
(
canvas
.
height
/
2
));
let
w
=
CONTENTVIEW
.
srcRect
.
right
-
CONTENTVIEW
.
srcRect
.
left
;
let
h
=
CONTENTVIEW
.
srcRect
.
bottom
-
CONTENTVIEW
.
srcRect
.
top
;
//if(w > width) w = width;
//if(h > height) h = height;
try
{
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
catch
(
error
)
{
if
(
w
>
width
)
w
=
width
;
if
(
h
>
height
)
h
=
height
;
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
}
else
{
context
.
translate
(
canvas
.
width
/
2
,
canvas
.
height
/
2
);
context
.
rotate
(
$
(
rotatebtnR
).
attr
(
'angle'
)
*
Math
.
PI
/
180
);
context
.
translate
(
-
(
canvas
.
width
/
2
),
-
(
canvas
.
height
/
2
));
let
w
=
CONTENTVIEW
.
srcRect
.
right
-
CONTENTVIEW
.
srcRect
.
left
;
let
h
=
CONTENTVIEW
.
srcRect
.
bottom
-
CONTENTVIEW
.
srcRect
.
top
;
//if(w > width) w = width;
// if(h > height) h = height;
try
{
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
CONTENTVIEW
.
destRect
.
top
,
width
,
height
);
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
catch
(
error
)
{
if
(
w
>
width
)
w
=
width
;
if
(
h
>
height
)
h
=
height
;
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
}
}
else
{
let
w
=
CONTENTVIEW
.
srcRect
.
right
-
CONTENTVIEW
.
srcRect
.
left
;
let
h
=
CONTENTVIEW
.
srcRect
.
bottom
-
CONTENTVIEW
.
srcRect
.
top
;
// if(w > width) w = width;
// if(h > height) h = height;
try
{
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
CONTENTVIEW
.
destRect
.
top
,
width
,
height
);
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
catch
(
error
)
{
if
(
w
>
width
)
w
=
width
;
if
(
h
>
height
)
h
=
height
;
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
}
context
.
restore
();
}
...
...
@@ -5314,25 +5333,52 @@ CONTENTVIEW.flip = function(opt) {
context
.
translate
(
-
(
canvas
.
width
/
2
),
-
(
canvas
.
height
/
2
));
let
w
=
CONTENTVIEW
.
srcRect
.
right
-
CONTENTVIEW
.
srcRect
.
left
;
let
h
=
CONTENTVIEW
.
srcRect
.
bottom
-
CONTENTVIEW
.
srcRect
.
top
;
try
{
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
catch
(
error
)
{
if
(
w
>
width
)
w
=
width
;
if
(
h
>
height
)
h
=
height
;
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
}
else
{
context
.
translate
(
canvas
.
width
/
2
,
canvas
.
height
/
2
);
context
.
rotate
(
$
(
rotatebtnR
).
attr
(
'angle'
)
*
Math
.
PI
/
180
);
context
.
translate
(
-
(
canvas
.
width
/
2
),
-
(
canvas
.
height
/
2
));
let
w
=
CONTENTVIEW
.
srcRect
.
right
-
CONTENTVIEW
.
srcRect
.
left
;
let
h
=
CONTENTVIEW
.
srcRect
.
bottom
-
CONTENTVIEW
.
srcRect
.
top
;
try
{
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
CONTENTVIEW
.
destRect
.
top
,
width
,
height
);
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
catch
(
error
)
{
if
(
w
>
width
)
w
=
width
;
if
(
h
>
height
)
h
=
height
;
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
}
}
else
{
let
w
=
CONTENTVIEW
.
srcRect
.
right
-
CONTENTVIEW
.
srcRect
.
left
;
let
h
=
CONTENTVIEW
.
srcRect
.
bottom
-
CONTENTVIEW
.
srcRect
.
top
;
try
{
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
CONTENTVIEW
.
destRect
.
top
,
width
,
height
);
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
catch
(
error
)
{
if
(
w
>
width
)
w
=
width
;
if
(
h
>
height
)
h
=
height
;
context
.
drawImage
(
offscreen
,
CONTENTVIEW
.
srcRect
.
left
,
CONTENTVIEW
.
srcRect
.
top
,
w
,
h
,
CONTENTVIEW
.
destRect
.
left
,
(
canvas
.
height
-
height
)
/
2
,
width
,
height
);
}
}
context
.
restore
();
...
...
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