This commit is contained in:
Zhuk Viatcheslav
2020-04-29 14:41:23 +03:00
parent cb02e1df33
commit 5c31d34edd
4 changed files with 20 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
body { body {
width: 87%; width: 80%;
margin: 0px auto; margin: 0px auto;
margin-top: 2%; margin-top: 2%;
background: #f5f5f5; background: #f5f5f5;

View File

@@ -40,4 +40,7 @@ loadingTask.promise.then(function(pdf) {
}, function (reason) { }, function (reason) {
// PDF loading error // PDF loading error
console.error(reason); console.error(reason);
}); });

View File

@@ -75,6 +75,17 @@ function pdfzoomout(){
} }
var cnt = 100;
function resize_plus(){
var div = document.getElementById("the-canvas");
cnt += 2;
div.style.width = cnt+"%";
}
function resize_minus(){
var div = document.getElementById("the-canvas");
cnt -= 2;
div.style.width = cnt+"%";
}
function getzoom(){ function getzoom(){
var name = 'pdfscale'; var name = 'pdfscale';

View File

@@ -22,11 +22,11 @@
<div id="zoomnav"> <div id="zoomnav">
<div class="zoompdf zoom-loop">🔍</div> <div class="zoompdf zoom-loop">🔍</div>
<div class="zoompdf"> <div class="zoompdf">
<div onclick="pdfzoomin()"> <div id="title_plus" onclick="resize_plus()">
<span id="title_plus">+</span> <span >+</span>
</div> </div>
<div onclick="pdfzoomout()"> <div id="title_minus" onclick="resize_minus()">
<span id="title_minus"></span> <span></span>
</div> </div>
</div> </div>
</div> </div>