https://github.com/rubenv/angular-user-select
Disable user selection dynamically.
https://github.com/rubenv/angular-user-select
Last synced: 22 days ago
JSON representation
Disable user selection dynamically.
- Host: GitHub
- URL: https://github.com/rubenv/angular-user-select
- Owner: rubenv
- License: mit
- Created: 2014-07-11T09:00:03.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2014-07-25T09:30:52.000Z (almost 12 years ago)
- Last Synced: 2026-02-03T02:51:13.317Z (5 months ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# angular-user-select
> Disable user selection dynamically.
[](https://travis-ci.org/rubenv/angular-user-select)
This module provides a service to disable selection on pages dynamically.
You'll need this if you're adding drag/drop interactions or lasso selections.
## Installation
Add angular-user-select to your project:
```
bower install --save angular-user-select
```
Add it to your HTML file:
```html
```
Reference it as a dependency for your app module:
```js
angular.module('myApp', ['rt.userselect']);
```
## Usage
Put the directive on the container where selection should be disabled:
```html
```
Inject it as a service to control it:
```js
angular.module('myApp').controller('TestCtrl', function ($scope, userSelect) {
// Disable selection
userSelect.disable();
// Enable it again
userSelect.enable();
});
```
## License
(The MIT License)
Copyright (C) 2014 by Ruben Vermeersch
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.