在rails 4.2.2项目中,我对html元素(而不是图像)使用了panzoom jquery,对于相同的页面,我使用了annotator插件。现在的问题是注释器不工作,因为我不能选择页面中的任何单词。由于panzoom,整个html正在移动(拖动),我如何禁用其中的“拖动”选项?
由http://www.jqueryscript.net/zoom/jQuery-Plugin-For-Panning-Zooming-Any-Elements-panzoom.html推荐
在视图中,
<div class="buttons">
<button class="zoom-in btn btn-default btn-xs">+ Zoom In</button>
<button class="zoom-out btn btn-default btn-xs">- Zoom Out</button>
<button class="reset btn-sm btn btn-primary">Reset</button>
</div>
<div class="panzoom" style="height: 480px;">
<%= render :file => @path %>
</div>
$(".panzoom").panzoom({
$zoomIn: $(".zoom-in"),
$zoomOut: $(".zoom-out"),
$zoomRange: $(".zoom-range"),
$reset: $(".reset")
});发布于 2016-02-02 10:12:31
$section.find('.panzoom').panzoom({
disablePan: true,
$zoomIn: $section.find(".zoom-in"),
$zoomOut: $section.find(".zoom-out"),
$zoomRange: $section.find(".zoom-range"),
$reset: $section.find(".reset")
});https://stackoverflow.com/questions/32753395
复制相似问题