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

How to stop movement sv-on-start #121

Open
ferozahmed26 opened this issue Apr 6, 2017 · 1 comment
Open

How to stop movement sv-on-start #121

ferozahmed26 opened this issue Apr 6, 2017 · 1 comment

Comments

@ferozahmed26
Copy link

ferozahmed26 commented Apr 6, 2017

I need to stop a movement of a sv-element when drag start or has any disable drag

at Html sv-root sv-on-start="cellDragStart($item, $part, $index, $helper)"

and in my controller
$scope.cellDragStart = function ($item, $part, $index, $helper) { console.log($item); console.log($part); console.log($index); console.log($helper); $helper.element.stop() }
But it doesn't work

@hold-baby
Copy link

在sv-element上添加一个标识属性 我使用的是lang=“0”;
在源码中找到 function onMousedown 大概在400行左右,
if($element.context.lang){ if($element.context.lang=="0"){ return; } }
添加以上判断 有lang=0的元素就不会被拖动

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

No branches or pull requests

2 participants