UNPKG

@egjs/rotate

Version:

Tiny custom rotate event binder

248 lines (170 loc) 10.1 kB
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Index | egjs::rotate - API</title> <meta name="description" content="Tiny custom rotate event binder" /> <meta property="og:title" content=""/> <meta property="og:type" content="website"/> <meta property="og:image" content=""/> <meta property="og:url" content=""/> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <script src="scripts/jquery.min.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link rel="canonical" href="http://naver.github.io/egjs-rotate/release/latest/doc/"/> <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css"> <link type="text/css" rel="stylesheet" href="styles/bootstrap.min.css"> <link type="text/css" rel="stylesheet" href="styles/jaguar.css"> <script> var config = {"monospaceLinks":true,"cleverLinks":true,"default":{"outputSourceFiles":true},"applicationName":"eg.Rotate","disqus":"egjs","googleAnalytics":"UA-70842526-22","openGraph":{"title":"","type":"website","image":"","site_name":"","url":""},"meta":{"title":"egjs::rotate - API","description":"Tiny custom rotate event binder","keyword":""},"linenums":true,"link":{"canonical":"http://naver.github.io/egjs-rotate/release/latest/doc/"}}; </script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', config.googleAnalytics]); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body> <div id="wrap" class="clearfix"> <div class="navigation"> <h3 class="applicationName"> <a href="//naver.github.io/egjs/"><img style="width:40px; height:20px;" src="img/type_white.svg"/></a> <!-- Homepage link (prefer link.home than applicationName) --> <a href="//naver.github.io/egjs-rotate/">Rotate</a> </h3> <div class="search"> <input id="search" type="text" class="form-control input-sm" placeholder="Search Documentations"> </div> <ul class="list"> <li class="item"> <span class="title"> <a href="index.html">README</a> </span> </li> <!-- Non Grouping Version --> <li class="item" data-name="eg.rotate"> <span class="title"> <a href="eg.rotate.html">eg.rotate</a> <span class="static">static</span> </span> <ul class="members itemMembers expends"> <span class="subtitle">Members</span> <li data-name="eg.rotate.VERSION"><a href="eg.rotate.html#.VERSION">VERSION</a></li> </ul> <ul class="typedefs itemMembers expends"> </ul> <ul class="methods itemMembers expends"> <span class="subtitle">Methods</span> <li data-name="eg.rotate.isVertical"><a href="eg.rotate.html#.isVertical">isVertical</a></li> <li data-name="eg.rotate.off"><a href="eg.rotate.html#.off">off</a></li> <li data-name="eg.rotate.on"><a href="eg.rotate.html#.on">on</a></li> </ul> <ul class="events itemMembers expends"> </ul> </li> </ul> </div> <div class="main"> <h1 class="page-title" data-filename="index.html">Index</h1> <h3> </h3> <section> <article class="readme"><h1>egjs-rotate <a href="https://badge.fury.io/js/%40egjs%2Frotate"><img src="https://badge.fury.io/js/%40egjs%2Frotate.svg" alt="npm version"></a> <a href="https://travis-ci.org/naver/egjs-rotate"><img src="https://travis-ci.org/naver/egjs-rotate.svg?branch=master" alt="Build Status"></a> <a href="https://coveralls.io/github/naver/egjs-rotate?branch=master"><img src="https://coveralls.io/repos/github/naver/egjs-rotate/badge.svg?branch=master" alt="Coverage Status"></a></h1><p>Tiny custom rotate event binder</p> <pre class="prettyprint source lang-js"><code>var handler = function(event, info) { ... }; // bind rotate event eg.rotate.on(handler); // unbind rotate event eg.rotate.off(handler); // or unbind all the rotate event binds eg.rotate.off();</code></pre><h2>Documents</h2><ul> <li><a href="https://naver.github.io/egjs-rotate/">Get Started</a></li> <li><a href="https://naver.github.io/egjs-rotate/release/latest/doc/">API documentation</a></li> </ul> <h2>Download and Installation</h2><p>Download dist files from repo directly or install it via npm. </p> <h3>For development (Uncompressed)</h3><p>You can download the uncompressed files for development</p> <ul> <li>Latest : https://naver.github.io/egjs-rotate/release/latest/dist/rotate.js</li> <li>Specific version : https://naver.github.io/egjs-rotate/release/[VERSION]/dist/rotate.js</li> </ul> <h3>For production (Compressed)</h3><p>You can download the compressed files for production</p> <ul> <li>Latest : https://naver.github.io/egjs-rotate/release/latest/dist/rotate.min.js</li> <li>Specific version : https://naver.github.io/egjs-rotate/release/[VERSION]/dist/rotate.min.js</li> </ul> <h3>Installation with npm</h3><p>The following command shows how to install egjs-rotate using npm.</p> <pre class="prettyprint source lang-bash"><code>$ npm install @egjs/rotate</code></pre><h2>Supported Browsers</h2><p>The following are the supported browsers.</p> <table> <thead> <tr> <th>iOS</th> <th>Android</th> </tr> </thead> <tbody> <tr> <td>7+</td> <td>2.1+(except 3.x)</td> </tr> </tbody> </table> <h2>How to start developing egjs-rotate?</h2><p>For anyone interested to develop egjs-rotate, follow the instructions below.</p> <h3>Development Environment</h3><h4>1. Clone the repository</h4><p>Clone the egjs-rotate repository and install the dependency modules.</p> <pre class="prettyprint source lang-bash"><code># Clone the repository. $ git clone https://github.com/naver/egjs-rotate.git</code></pre><h4>2. Install dependencies</h4><p><code>npm</code> is supported.</p> <pre class="prettyprint source"><code># Install the dependency modules. $ npm install</code></pre><h4>3. Build</h4><p>Use npm script to build eg.rotate</p> <pre class="prettyprint source lang-bash"><code># Run webpack-dev-server for development $ npm start # Build $ npm run build # Generate jsdoc $ npm run jsdoc</code></pre><p>Two folders will be created after complete build is completed.</p> <ul> <li><strong>dist</strong> folder: Includes the <strong>rotate.js</strong> and <strong>rotate.min.js</strong> files.</li> <li><strong>doc</strong> folder: Includes API documentation. The home page for the documentation is <strong>doc/index.html</strong>.</li> </ul> <h3>Linting</h3><p>To keep the same code style, we adopted <a href="http://eslint.org/">ESLint</a> to maintain our code quality. The <a href="https://github.com/naver/eslint-config-naver/tree/master/rules">rules</a> are modified version based on <a href="https://github.com/airbnb/javascript">Airbnb JavaScript Style Guide</a>.<br>Setup your editor for check or run below command for linting.</p> <pre class="prettyprint source lang-bash"><code>$ npm run lint</code></pre><h3>Test</h3><p>Once you created a branch and done with development, you must perform a test running <code>npm run test</code> command before you push code to a remote repository.</p> <pre class="prettyprint source lang-bash"><code>$ npm run test</code></pre><p>Running a <code>npm run test</code> command will start <a href="https://mochajs.org/">Mocha</a> tests via <a href="https://karma-runner.github.io/">Karma-runner</a>.</p> <h2>Bug Report</h2><p>If you find a bug, please report it to us using the <a href="https://github.com/naver/egjs-rotate/issues">Issues</a> page on GitHub.</p> <h2>License</h2><p>egjs-rotate is released under the <a href="http://naver.github.io/egjs/license.txt">MIT license</a>.</p> <pre class="prettyprint source"><code>Copyright (c) 2015 NAVER Corp. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the &quot;Software&quot;), 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 &quot;AS IS&quot;, 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.</code></pre></article> </section> <!-- disqus code --> <div id="disqus_thread"></div> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript> <a href="//disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a> <!-- // disqus code --> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Fri May 04 2018 17:35:19 GMT+0900 (대한민국 표준시) </footer> </div> </div> <script>prettyPrint();</script> <script src="scripts/main.js"></script> </body> </html>