使用滚动条向下滚动时,使框保持静止 [英] Make the boxes stay still when scrolling down using the scroll bar

查看:134
本文介绍了使用滚动条向下滚动时,使框保持静止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我单击一个框时,可以在屏幕上拖动它.您可以单击文件夹图标以打开信息视图,并且由于文本太多,因此会出现滚动条.

when I click a box, i can drag it around the screen. You can click the folder icon to open up information view, and a scroll bar will appear because there are a lot of text.

问题:当我使用鼠标滚动滚动条时,它也会同时拖动框.单击滚动条以移动框时如何使其不移动框?

Problem: when i use my mouse to scroll the scrollbar, it also drags the boxes as well. How do I make it not move the box when I click the scroll bar to move the bar?

我正在使用jsPlumb.draggable()启用拖动.

I am using jsPlumb.draggable() to enable dragging.

jsfiddle: http://jsfiddle.net/7PuN3/2/

jsfiddle: http://jsfiddle.net/7PuN3/2/

推荐答案

我将停止/开始拖动:

$(function(){   
$('#1 .button_wrap').on('click', function(e){
    e.stopPropagation();
    $(".info").html(newHtml).show();
    jsPlumb.setDraggable("1", false)


});});


$(function(){
    $("#1").on("click", ".info .ui-icon-close", function(){
        $(".info").hide();
        jsPlumb.setDraggable("1", true)
    });
});

然后在您的CSS中添加此类,而不是在禁用拖动时让div消失:

then in your css add this class, not to let the div fade when dragging is disabled:

.ui-state-disabled{opacity: 1;}

这篇关于使用滚动条向下滚动时,使框保持静止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆