ducksboard / gridster.js

gridster.js is a jQuery plugin that makes building intuitive draggable layouts from elements spanning multiple columns
http://gridster.net/
MIT License
6.04k stars 1.2k forks source link

Can I only drag the box on its title area? #569

Closed tsball closed 8 years ago

tsball commented 8 years ago

I do not want user drag the whole box, can I limit the drag area in the title

. For example, now it can drag any area in the
  • , I want to drag the
    and the whole
  • moves.

    • Title
    <script type="text/javascript">
        $(function(){
      $(".gridster ul").gridster({
            widget_margins: [10, 10],
            widget_base_dimensions: [140, 140],
            widget_selector: "li"
          }
    
        });
        });
    </script>

    Refer to this issue: https://github.com/ducksboard/gridster.js/issues/490

    How can I cancel the moving in my callback? I can not find a cancel property. draggable: { stop: function(event, ui){

              }

    }

  • tsball commented 8 years ago