<! DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>Drag - Documentation</title>

    <script src="scripts/prettify/prettify.js"></script>
    <script src="scripts/prettify/lang-css.js"></script>
    <! --[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![ endif]-->
    <script>
        function saveVerticalScrollPosition(evt){
            window.localStorage.setItem('navscrollpos', evt.target.scrollTop);
        }
        function loadVerticalScrollPosition(){
            var nav = document.querySelector('nav');
            nav.scrollTop = window.localStorage.getItem('navscrollpos');
        }
    </script>
    <link type="text/css" rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>

<input type="checkbox" id="nav-trigger" class="nav-trigger" />
<label for="nav-trigger" class="navicon-button x">
  <div class="navicon"></div>
</label>

<label for="nav-trigger" class="overlay"></label>

<nav onscroll='saveVerticalScrollPosition(event)'>
    <h2><a href="index.html">Home</a></h2><h3>Modules</h3><ul><li><a href="module-altspace.html">altspace</a><ul class='methods'><li data-type='method'><a href="module-altspace.html#.getDocument">getDocument</a></li><li data-type='method'><a href="module-altspace.html#.getEnclosure">getEnclosure</a></li><li data-type='method'><a href="module-altspace.html#.getGamepads">getGamepads</a></li><li data-type='method'><a href="module-altspace.html#.getSpace">getSpace</a></li><li data-type='method'><a href="module-altspace.html#.getThreeJSDebugInfo">getThreeJSDebugInfo</a></li><li data-type='method'><a href="module-altspace.html#.getThreeJSRenderer">getThreeJSRenderer</a></li><li data-type='method'><a href="module-altspace.html#.getThreeJSTrackingSkeleton">getThreeJSTrackingSkeleton</a></li><li data-type='method'><a href="module-altspace.html#.getUser">getUser</a></li><li data-type='method'><a href="module-altspace.html#.open">open</a></li></ul></li><li><a href="module-altspace_utilities_behaviors.html">altspace/utilities/behaviors</a></li><li><a href="module-altspace_utilities_codePen.html">altspace/utilities/codePen</a><ul class='methods'><li data-type='method'><a href="module-altspace_utilities_codePen.html#.ensureInVR">ensureInVR</a></li><li data-type='method'><a href="module-altspace_utilities_codePen.html#.getAuthorId">getAuthorId</a></li><li data-type='method'><a href="module-altspace_utilities_codePen.html#.getPenId">getPenId</a></li><li data-type='method'><a href="module-altspace_utilities_codePen.html#.setName">setName</a></li></ul></li><li><a href="module-altspace_utilities_shims.html">altspace/utilities/shims</a></li><li><a href="module-altspace_utilities_shims_bubbling.html">altspace/utilities/shims/bubbling</a></li><li><a href="module-altspace_utilities_shims_cursor.html">altspace/utilities/shims/cursor</a><ul class='methods'><li data-type='method'><a href="module-altspace_utilities_shims_cursor.html#.init">init</a></li></ul></li><li><a href="module-altspace_utilities_sync.html">altspace/utilities/sync</a><ul class='methods'><li data-type='method'><a href="module-altspace_utilities_sync.html#.connect">connect</a></li></ul></li></ul><h3>Namespaces</h3><ul><li><a href="THREE.html">THREE</a></li></ul><h3>Classes</h3><ul><li><a href="module-altspace-AltRenderer.html">AltRenderer</a><ul class='methods'><li data-type='method'><a href="module-altspace-AltRenderer.html#render">render</a></li></ul></li><li><a href="module-altspace_utilities_behaviors. Behavior.html">Behavior</a><ul class='methods'><li data-type='method'><a href="module-altspace_utilities_behaviors. Behavior.html#awake">awake</a></li><li data-type='method'><a href="module-altspace_utilities_behaviors. Behavior.html#dispose">dispose</a></li><li data-type='method'><a href="module-altspace_utilities_behaviors. Behavior.html#start">start</a></li><li data-type='method'><a href="module-altspace_utilities_behaviors. Behavior.html#update">update</a></li></ul></li><li><a href="module-altspace_utilities_behaviors. Bob.html">Bob</a></li><li><a href="module-altspace_utilities_behaviors. ButtonStateStyle.html">ButtonStateStyle</a></li><li><a href="module-altspace_utilities_sync-Connection.html">Connection</a></li><li><a href="module-altspace-Document.html">Document</a><ul class='methods'><li data-type='method'><a href="module-altspace-Document.html#reset">reset</a></li></ul></li><li><a href="module-altspace_utilities_behaviors. Drag.html">Drag</a></li><li><a href="module-altspace-Enclosure.html">Enclosure</a><ul class='methods'><li data-type='method'><a href="module-altspace-Enclosure.html#exitFullspace">exitFullspace</a></li><li data-type='method'><a href="module-altspace-Enclosure.html#requestFullspace">requestFullspace</a></li></ul></li><li><a href="module-altspace-Gamepad.html">Gamepad</a><ul class='methods'><li data-type='method'><a href="module-altspace-Gamepad.html#preventDefault">preventDefault</a></li></ul></li><li><a href="module-altspace-GamepadButton.html">GamepadButton</a></li><li><a href="module-altspace_utilities_behaviors. GamepadControls.html">GamepadControls</a></li><li><a href="module-altspace_utilities_behaviors. HoverColor.html">HoverColor</a></li><li><a href="module-altspace_utilities_behaviors. HoverScale.html">HoverScale</a></li><li><a href="module-altspace_utilities_behaviors. JointCollisionEvents.html">JointCollisionEvents</a></li><li><a href="module-altspace_utilities_behaviors. Layout.html">Layout</a></li><li><a href="THREE.Object3D.html">Object3D</a><ul class='methods'><li data-type='method'><a href="THREE.Object3D.html#addBehavior">addBehavior</a></li><li data-type='method'><a href="THREE.Object3D.html#addBehaviors">addBehaviors</a></li><li data-type='method'><a href="THREE.Object3D.html#getBehaviorByType">getBehaviorByType</a></li><li data-type='method'><a href="THREE.Object3D.html#removeAllBehaviors">removeAllBehaviors</a></li><li data-type='method'><a href="THREE.Object3D.html#removeBehavior">removeBehavior</a></li><li data-type='method'><a href="THREE.Object3D.html#updateBehaviors">updateBehaviors</a></li></ul></li><li><a href="module-altspace_utilities_behaviors. Object3DSync.html">Object3DSync</a><ul class='methods'><li data-type='method'><a href="module-altspace_utilities_behaviors. Object3DSync.html#takeOwnership">takeOwnership</a></li></ul></li><li><a href="module-altspace_utilities_shims. OBJMTLLoader.html">OBJMTLLoader</a><ul class='methods'><li data-type='method'><a href="module-altspace_utilities_shims. OBJMTLLoader.html#.load">load</a></li></ul></li><li><a href="module-altspace-Popup.html">Popup</a><ul class='methods'><li data-type='method'><a href="module-altspace-Popup.html#hide">hide</a></li><li data-type='method'><a href="module-altspace-Popup.html#show">show</a></li></ul></li><li><a href="THREE.Scene.html">Scene</a><ul class='methods'><li data-type='method'><a href="THREE.Scene.html#updateAllBehaviors">updateAllBehaviors</a></li></ul></li><li><a href="module-altspace_utilities_behaviors. SceneSync.html">SceneSync</a><ul class='methods'><li data-type='method'><a href="module-altspace_utilities_behaviors. SceneSync.html#destroy">destroy</a></li><li data-type='method'><a href="module-altspace_utilities_behaviors. SceneSync.html#instantiate">instantiate</a></li></ul></li><li><a href="module-altspace_utilities. Simulation.html">Simulation</a></li><li><a href="module-altspace_utilities_behaviors. Spin.html">Spin</a></li><li><a href="module-altspace_utilities_behaviors. SteamVRInput.html">SteamVRInput</a></li><li><a href="module-altspace_utilities_behaviors. SteamVRTrackedObject.html">SteamVRTrackedObject</a></li><li><a href="module-altspace_utilities_behaviors. TouchpadRotate.html">TouchpadRotate</a></li><li><a href="module-altspace-TrackingJoint.html">TrackingJoint</a></li><li><a href="module-altspace-TrackingSkeleton.html">TrackingSkeleton</a><ul class='methods'><li data-type='method'><a href="module-altspace-TrackingSkeleton.html#getJoint">getJoint</a></li></ul></li><li><a href="module-altspace-User.html">User</a></li><li><a href="Window.html">Window</a></li></ul><h3>Events</h3><ul><li><a href="module-altspace-User.html#.event:avatarchange">avatarchange</a></li><li><a href="Window.html#event:blur">blur</a></li><li><a href="THREE.Object3D.html#.event:cursordown">cursordown</a></li><li><a href="THREE.Object3D.html#.event:cursorenter">cursorenter</a></li><li><a href="THREE.Object3D.html#.event:cursorleave">cursorleave</a></li><li><a href="THREE.Scene.html#event:cursormove">cursormove</a></li><li><a href="THREE.Object3D.html#.event:cursorup">cursorup</a></li><li><a href="module-altspace_utilities_behaviors. Drag.html#.event:dragstart">dragstart</a></li><li><a href="module-altspace_utilities_behaviors. Drag.html#.event:dragstop">dragstop</a></li><li><a href="Window.html#event:focus">focus</a></li><li><a href="module-altspace. Enclosure.html#event:fullspacechange">fullspacechange</a></li><li><a href="module-altspace_utilities_behaviors. JointCollisionEvents.html#.event:jointcollision">jointcollision</a></li><li><a href="module-altspace_utilities_behaviors. JointCollisionEvents.html#.event:jointcollisionenter">jointcollisionenter</a></li><li><a href="module-altspace_utilities_behaviors. JointCollisionEvents.html#.event:jointcollisionleave">jointcollisionleave</a></li><li><a href="module-altspace_utilities_behaviors. Object3DSync.html#.event:ownershipgained">ownershipgained</a></li><li><a href="module-altspace_utilities_behaviors. Object3DSync.html#.event:ownershiplost">ownershiplost</a></li><li><a href="module-altspace.html#event:touchpaddown">touchpaddown</a></li><li><a href="module-altspace.html#event:touchpadgesture">touchpadgesture</a></li><li><a href="module-altspace.html#event:touchpadmove">touchpadmove</a></li><li><a href="module-altspace.html#event:touchpadup">touchpadup</a></li></ul>
</nav>
<script>loadVerticalScrollPosition()</script>

<div id="main">
    
    <h1 class="page-title">Drag</h1>
    

    




<section>

<header>
    
        <h2>
            <span class="ancestors"><a href="module-altspace_utilities_behaviors.html">altspace/utilities/behaviors</a>.</span>
        
        Drag
        </h2>
        
            <div class="class-description"><p>A behavior that makes an object draggable along a plane.</p></div>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    
    <h2>Constructor</h2>
    

    <h4 class="name" id="Drag"><span class="type-signature"></span>new Drag<span class="signature">(config<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>

    











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>config</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"><p>Specify the axes along which the object can be
 dragged. 
 E.g. To constrain the object to an XY plane: <code>{x: true, y: true}</code>
 Each axis can also be an object specifying the minimum and maximum limits
 of the constraint.  E.g. <code>{x: {min: -10, max: 20}, y: true}</code>
 <strong>Note:</strong> Currently you must specify exactly two axes.</p></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>
















    
    </div>

    
        <h3 class="subsection-title">Extends</h3>

        


    <ul>
        <li><a href="module-altspace_utilities_behaviors. Behavior.html">module:altspace/utilities/behaviors. Behavior</a></li>
    </ul>


    

    

    

     

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id="type"><span class="type-signature"></span>type<span class="type-signature"> :string</span></h4>




<div class="description">
    <p>The string name of this class.  This is used for <a href="THREE.Object3D.html#getBehaviorByType">THREE.Object3D#getBehaviorByType</a>.</p>
</div>







<dl class="details">

    

    

    

    
    <dt class="tag-overrides">Overrides:</dt>
    <dd class="tag-overrides"><ul class="dummy"><li>
        <a href="module-altspace_utilities_behaviors. Behavior.html#type">module:altspace/utilities/behaviors. Behavior#type</a>
    </li></ul></dd>
    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
    

    
        <h3 class="subsection-title">Type Definitions</h3>

        
                
<h4 class="name" id="~DragEvent">DragEvent</h4>




<div class="description">
    <p>Represents events emitted during drag interactions</p>
</div>







    <h5 class="subsection-title">Properties:</h5>

    

<table class="props">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>ray</code></td>
            

            <td class="type">
            
                
<span class="param-type">THREE.Ray</span>


            
            </td>

            

            

            <td class="description last"><p>The raycaster ray at the time of the event.</p></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>target</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="THREE.Object3D.html">THREE.Object3D</a></span>


            
            </td>

            

            

            <td class="description last"><p>The object which was dragged.</p></td>
        </tr>

    
    </tbody>
</table>




<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>






            
    

    
        <h3 class="subsection-title">Events</h3>

        
            

    

    <h4 class="name" id=".event:dragstart">dragstart</h4>

    



<div class="description">
    <p>Fired on an object when a drag interaction begins.</p>
</div>





    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><a href="module-altspace_utilities_behaviors. Drag.html#~DragEvent">module:altspace/utilities/behaviors. Drag~DragEvent</a></span>


        </li>
    </ul>









<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".event:dragstop">dragstop</h4>

    



<div class="description">
    <p>Fired on an object when a drag interaction ends</p>
</div>





    <h5>Type:</h5>
    <ul>
        <li>
            
<span class="param-type"><a href="module-altspace_utilities_behaviors. Drag.html#~DragEvent">module:altspace/utilities/behaviors. Drag~DragEvent</a></span>


        </li>
    </ul>









<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    

    
</dl>
















        
    
</article>

</section>




</div>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> using the Minami theme. 
</footer>

<script>prettyPrint();</script>
<script src="scripts/linenumber.js"></script>
</body>
</html>