Skip to content
Browse files

* Remove website-related stuff that is going to the scrollability.com…

… module
  • Loading branch information...
1 parent 68db773 commit e731de07bb9693653a1e1e31e75c236fdc2d4edd @joehewitt committed
Showing with 11 additions and 93 deletions.
  1. +2 −2 README.md
  2. +3 −9 package.json
  3. +4 −2 scrollability.js
  4. +1 −2 static/examples/pages.html
  5. +1 −2 static/examples/tableview.html
  6. +0 −72 static/index.html
  7. +0 −4 website.js
View
4 README.md
@@ -1,7 +1,7 @@
-scrollability
+Scrollability
=============
-Give your mobile web apps a pretty darn good approximation of iOS native scrolling.
+Scrollability adds a good imitation of iOS native scrolling to your mobile web apps.
Scrollability is a single script, it's small, and it has no external dependencies. Drop it into your page, add a few CSS classes to scrollable elements, and scroll away.
View
12 package.json
@@ -10,17 +10,11 @@
"keywords": ["client"],
"author": "Joe Hewitt <joe@joehewitt.com>",
"contributors": [],
- "dependencies": {
- "dandy": ""
- },
+ "dependencies": {},
"engines": { "node": ">=0.4.0" },
"main": "./scrollability",
"directories": {},
-
"app.js": {
- "title": "Scrollability",
- "client": "scrollability/website",
- "static": "./static",
- "autohtml": false
- }
+ "static": "./static"
+ }
}
View
6 scrollability.js
@@ -276,7 +276,7 @@ function wrapTarget(target, startX, startY, startTime) {
if (!locked && Math.abs(touch - startTouch) > kLockThreshold) {
locked = true;
- dispatch("scrollability-lock", target.node);
+ dispatch("scrollability-lock", target.node, {direction: target.name});
}
lastTouch = touch;
@@ -378,7 +378,9 @@ function wrapTarget(target, startX, startY, startTime) {
target.node[target.key] = position;
target.update(target.node, position);
- dispatch("scrollability-scroll", target.node, {position: position});
+ if (!dispatch("scrollability-scroll", target.node, {direction: target.name, position: position})) {
+ return continues;
+ }
// Update the scrollbar
var range = -min - max;
View
3 static/examples/pages.html
@@ -41,8 +41,7 @@
</style>
-<link rel="stylesheet" type="text/javascript" href="/app.js/css">
-<script type="text/javascript" src="/app.js/js"></script>
+<script type="text/javascript" src="/scrollability.min.js"></script>
<script language="javascript">
View
3 static/examples/tableview.html
@@ -77,8 +77,7 @@
</style>
-<link rel="stylesheet" type="text/javascript" href="/app.js/css">
-<script type="text/javascript" src="/app.js/js"></script>
+<script type="text/javascript" src="/scrollability.min.js"></script>
<script language="javascript">
View
72 static/index.html
@@ -1,72 +0,0 @@
-<!doctype html>
-
-<html lang="en">
-<head>
-<title>Scrollability</title>
-<meta charset="utf-8"/>
-<style type="text/css">
-
-html {
- margin: 0;
- font-family: Helvetica;
- font-size: 22px;
- color: #fff;
- background: #335061;
-}
-
-a {
- color: #f2eb88;
- text-decoration: none;
-}
-
-li > a {
- font-size: 28px;
-}
-
-body {
- margin: 20px auto;
- padding: 40px 40px 80px 40px;
- width: 800px;
- border-top: 8px solid #fff;
- border-right: 2px solid #fff;
- border-bottom: 8px solid #fff;
- border-left: 2px solid #fff;
-}
-
-strong {
- color: yellow;
-}
-
-</style>
-
-</head>
-<body>
-<a href="http://github.com/joehewitt/scrollability"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://d3nwyuy0nl342s.cloudfront.net/img/4c7dc970b89fd04b81c8e221ba88ff99a06c6b61/687474703a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f77686974655f6666666666662e706e67" alt="Fork me on GitHub"></a>
- <h1>Scrollability</h1>
- <p>Native scrolling for mobile web apps... or at least the closest thing to it!</p>
-
- <p>Scrollability is a single script, it's small, and it has no external dependencies. Drop it into your page, add a few CSS classes to scrollable elements, and scroll away.</p>
-
- <p><b>Scrollability is a work-in-progress and is not yet ready to be used.</b> I will publish documentation when it's ready.</p>
-
- <h3>Demos</h3>
- <p>(Requires iOS, works best on iPhone 3GS, iPhone 4, or iPad)</p>
- <ul>
- <li><a href="example1.html">Table View</a></li>
- <li><a href="example2.html">Horizontal Pages</a></li>
- </ul>
-
- <h3>Bugs Being Worked On</h3>
- <ul>
- <li>Increase momentum as you flick up or down several times</li>
- <li>When releasing finger slowly, make sure scrolling is completely stopped</li>
- <li>Lots of other hard to describe discrepancies with native scrolling...</li>
- </ul>
-
- <h3>Features Planned</h3>
- <ul>
- <li>Sticky table headers</li>
- <li>Photo viewer with zooming</li>
- </ul>
-</body>
-</html>
View
4 website.js
@@ -1,4 +0,0 @@
-
-require('./scrollability');
-
-require("dandy");

0 comments on commit e731de0

Please sign in to comment.
Something went wrong with that request. Please try again.