Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Disabling dragging of single items #66

Closed
thelucid opened this Issue · 9 comments

2 participants

@thelucid

Firstly, thanks for a great library.

I can't find a way to disable the dragging of single items, I've tried the following but it doesn't work:

{
    onMouseDown: function(item, event, _super) {
      if (item.hasClass('no-drag')) {
        event.preventDefault();
      } else {
        _super(item);
      }
    }
}

Any pointers would be most welcome.

@thelucid

Ok, just seen the 'exclude' option but it doesn't seem to work.

@thelucid

I seems, it's because I have a span inside the li, just doing exclude: '.locked' doesn't work but exclude: '.locked, .locked span' does. Is this a bug?

@johnny
Owner
@thelucid

@johnny Yes, that works. Seems odd that just .locked doesn't.

@johnny
Owner

Could you provide a sample of the html structure you are using and the plugin call. Preferably on jsbin or similar

Then I can better judge if this is a bug

@thelucid

@johnny Here's something I've been playing with: http://codepen.io/thelucid/pen/oluhH

@johnny
Owner

Sorry for not replying sooner. I was ill.

This is a bug and I will try to fix it.

@johnny johnny closed this issue from a commit
Jonas von Andrian fix exclusion of items
closes #66
828d4c1
@johnny johnny closed this in 828d4c1
@johnny
Owner

and its done

@thelucid

Awesome, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.