我有一个按钮栏,其中三个用于图像缩放和滚动,第四个是发送打印图像,通过库完成 panzoom 缩放和滚动,但是如果命令打印(发送成功)。现在如果我返回站点并且想要缩放,不要,我应该怎么做才能让我继续处理图像??
<section>
<div class="panel panel-default">
<div class="panel-heading">
<div class="row">
<div class="col-md-12 btn-group">
<button type="button" class="zoom-in btn btn-default">
<span class="glyphicon glyphicon-zoom-in"></span>
</button>
<button type="button" class="zoom-out btn btn-default">
<span class="glyphicon glyphicon-zoom-out"></span>
</button>
<button type="button" class="reset btn btn-default">
<span class="glyphicon glyphicon-resize-full"></span>
</button>
<button name="printButton" id="printButton" type="button" class="btn btn-default" onclick="printDiv('printableArea')" runat="server">
<span class="glyphicon glyphicon-print"></span>
</button>
</div>
</div>
</div>
<div class="panel-body">
<div class="panzoom">
<div id="printableArea">
<img src="img/descarga.jpg" alt="Visualización del original de la forma migratoria" class="img-responsive">
<script type="text/javascript">
function printDiv(divName) {
var printContents = document.getElementById(divName).innerHTML;
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
}
</script>
</div>
</div>
</div>
</div>
</section>
panzoom 的部分是
(function () {
var $section = $('section').first();
$section.find('.panzoom').panzoom({
$zoomIn: $section.find(".zoom-in"),
$zoomOut: $section.find(".zoom-out"),
$zoomRange: $section.find(".zoom-range"),
$reset: $section.find(".reset")
});
})();