This module makes an Element to be constrained when dragged or repositioned.
With nodejs:
The module constrain
is a typical browser-module.
In the browser:
For browser-usage, ITSA has a predefined loaderfiles. Once included, a global ITSA
object with default features is available. For customized loaderfiles, read: Customized build.
<script src="/itsabuild-min.js"></script>
The constrian
-plugin makes an Element to constrain to another Element
or window
, specified by selector
. This constrain-effect will be active whenever the Element is dragged or repositioned.
The preferred way is to set the focusmanager through HTML, because you don't need client-side rendering:
<div plugin-constrain="true"></div>
<div plugin-constrain="true" constrain-selector=".container"></div>
A node can also be constrained by using the plugin which gets returned by the module (when required):
<div id=mynode></div>
<script>
var ITSA = require('itsa'),
mynode = document.getAll('#mynode');
mynode.plug('constrain');
</script>
Table of Contents