Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pdf-html
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
施贇杰
pdf-html
Commits
ada20c7f
Commit
ada20c7f
authored
Apr 18, 2022
by
shiyunjie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update viewer
parent
c072b64e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
viewer.html
iframe/web/viewer.html
+5
-5
No files found.
iframe/web/viewer.html
View file @
ada20c7f
...
...
@@ -109,12 +109,12 @@ See https://github.com/adobe-type-tools/cmap-resources
document
.
addEventListener
(
"touchmove"
,
(
e
)
=>
{
if
(
e
.
scale
!==
1
&&
isiOSXZ
)
{
e
.
preventDefault
();
//
e.preventDefault();
}
},
{
passive
:
false
});
viewer
.
addEventListener
(
"touchstart"
,
(
e
)
=>
{
e
.
preventDefault
();
//
e.preventDefault();
if
(
e
.
touches
.
length
>
1
)
{
startX
=
(
e
.
touches
[
0
].
pageX
+
e
.
touches
[
1
].
pageX
)
/
2
;
startY
=
(
e
.
touches
[
0
].
pageY
+
e
.
touches
[
1
].
pageY
)
/
2
;
...
...
@@ -122,7 +122,7 @@ See https://github.com/adobe-type-tools/cmap-resources
}
else
{
initialPinchDistance
=
0
;
}
});
}
,
false
);
viewer
.
addEventListener
(
"touchmove"
,
(
e
)
=>
{
console
.
log
(
'viewer_touchmove'
)
...
...
@@ -137,7 +137,7 @@ See https://github.com/adobe-type-tools/cmap-resources
viewer
.
style
.
transform
=
`scale(
${
pinchScale
}
)`
;
viewer
.
style
.
transformOrigin
=
`
${
originX
}
px
${
originY
}
px`
;
});
}
,
false
);
viewer
.
addEventListener
(
"touchend"
,
(
e
)
=>
{
if
(
initialPinchDistance
<=
0
)
{
return
;
}
...
...
@@ -153,7 +153,7 @@ See https://github.com/adobe-type-tools/cmap-resources
container
.
scrollTop
+=
dy
*
(
pinchScale
-
1
);
reset
();
});
}
,
false
);
}
enablePinchZoom
();
/* if(!isWeixin){
...
...
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