Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sv-handle-disable is evaluated on the incorrect element. #132

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ The API is declarative. There are four directives (hooked on attributes) that ne
* `sv-part` - this attribute should be placed on an element that is a container for the `ngRepeat`'ed elements. Its value should be the same as the right hand side expression in `ng-repeat` attribute.
**Optional attributes:**
* `sv-copy` - default `false`. If `true` then elementes dragged out of this container will be copied instead of moved
* `is-grid` - dafault `false`. If `true` then it means that elements on this container are aligned horizontally (multiline possible)
* `sv-grid` - default `false`. If `true` then it means that elements on this container are aligned horizontally (multiline possible)
* `sv-no-revert` - default `false`. If `true` then elements dropped into this container will not be animated
* `sv-center` - to set how the "center" of the container (for dropping into empty container purposes) should be comprehended (more in readme). Allowed values:
* `both` (default) - a point in both vertical and horizontal center
Expand Down
2 changes: 1 addition & 1 deletion src/angular-sortable-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@
if($controllers[1].sortingInProgress()) return;
if(e.button != 0 && e.type === 'mousedown') return;

var svHandleDisabledAttr = e.target.attributes['sv-handle-disabled'];
var svHandleDisabledAttr = handle[0].attributes['sv-handle-disabled'];
if(svHandleDisabledAttr && svHandleDisabledAttr.value === 'true') return;

moveExecuted = false;
Expand Down
Loading