Skip to content

Conversation

dmackerman
Copy link

Not sure if this is horribly inefficient, but it works. You can pass in an expression into sv-disabled and the drag events will be disabled.

Example:

<div sv-root sv-part="goals.allGoals" sv-disabled="goals.sortEnabled" sv-on-sort="goals.onGoalSort($item, $partFrom, $partTo, $indexFrom, $indexTo)">
    <div sv-placeholder class="ks-reorder-placeholder"></div>
    <div sv-element>Something</div>
</div>

Also general code sanity cleanup, spacing - done automatically by my formatter. Can remove that if you want!

@jsancho
Copy link

jsancho commented Sep 4, 2015

hi @dmackerman thanks for this, spot on with what I was looking for.
I'm not the repo owner but general etiquette is that you should respect the original spacing and indentation. It's quite cumbersome to go over your specific changes otherwise.
ta!

@caiocpricci2
Copy link

Recreated this pul request keeping the code style and added a new sv-element-draggable option to disable a single element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants