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

Documentation: Add class 'gridster-no-drag' on element to disable draggable. #483

Open
natee opened this issue Jun 15, 2017 · 0 comments
Open

Comments

@natee
Copy link

natee commented Jun 15, 2017

angular-gridster allows us to disable draggable when click some elements, but there were no documents about how to use it.

  1. Add a class 'gridster-no-drag'
	// only works if you have jQuery
	if ($target.closest && $target.closest('.gridster-no-drag').length) {
		return false;
	}
  1. Add a directive
.directive('gridsterNoDrag', function() {
	return {
		restrict: 'A',
		link: function(scope, $element) {
			$element.addClass('gridster-no-drag');
		}
	};
})
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

1 participant