Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V2.0 #272

Open
wants to merge 37 commits into
base: develop
Choose a base branch
from
Open

V2.0 #272

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b292240
Reorganized some things and started leverging grunt and whatnot
jakiestfu Mar 8, 2014
211273f
Commiting first build and some jshint settings updates
jakiestfu Mar 8, 2014
dfb87ca
Fixing demos
jakiestfu Mar 8, 2014
2394f31
Split files up. Kinda sloppy right now but I will make it better soon
jakiestfu Mar 8, 2014
12213c0
Updates
jakiestfu Mar 8, 2014
f3d27e4
Fixes
jakiestfu Mar 8, 2014
fceacd8
Added beginnings of tests
jakiestfu Mar 8, 2014
fbc08f2
Added phantom
jakiestfu Mar 8, 2014
c247479
Make dragging a snap-content view much more performant on mobile, #12…
jakiestfu Mar 8, 2014
a37610c
Fix issues with IE9, #106 (@SalahStudios)
jakiestfu Mar 8, 2014
56afd8d
added option to disable drag on mouse events #80 (@jamuhl)
jakiestfu Mar 8, 2014
c790eb7
Remove 'animating' event, wicked sloppy, non performant
jakiestfu Mar 8, 2014
88e123c
build
jakiestfu Mar 8, 2014
845245c
Documentation
jakiestfu Mar 8, 2014
b1a07c2
Cleaned up some architecture. Source cannot function now unless built…
jakiestfu Mar 8, 2014
28a0243
Fix
jakiestfu Mar 8, 2014
b3a7996
Added CI
jakiestfu Mar 8, 2014
a65c637
Moar
jakiestfu Mar 8, 2014
f3beeff
Moar
jakiestfu Mar 8, 2014
fb75c3c
Finished
jakiestfu Mar 8, 2014
435b250
OCD
jakiestfu Mar 8, 2014
709b181
Added uglify back in
jakiestfu Mar 9, 2014
e0f84b2
updated grunt
jakiestfu Mar 9, 2014
32c739b
Added test coverage with blanket.js.
jayd3e Mar 9, 2014
97e0b9e
Tabs -> spaces
jayd3e Mar 9, 2014
030d6a5
Reverted the addition of _header and _footer. Each file is now wrapp…
jayd3e Mar 9, 2014
95620b0
Created some starter tests to just see how Snap.js can be tested.
jayd3e Mar 9, 2014
f3083f5
Dramatically changed the structure of Snap.js to be more testable.
jayd3e Mar 10, 2014
72b5db4
Have most things ported over to the new architecture.
jayd3e Mar 10, 2014
6541db7
Uncommented blanket.js
jayd3e Mar 10, 2014
3c4a657
Made some style changes, and removed a lot of meaningless tests. Moc…
jayd3e Mar 10, 2014
e4359e8
Added multi demo
jakiestfu Mar 11, 2014
7827ac4
Restructured again and got instances working properly
jakiestfu Mar 13, 2014
4772b33
Added sane animation callbacks
jakiestfu Mar 13, 2014
156cdf5
Misc improvements
jakiestfu Mar 13, 2014
1904c12
Now using bower.json
kennethkalmer Apr 28, 2014
15c77da
Merge pull request #193 from kennethkalmer/v2.0
jakiestfu Jun 18, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 3 additions & 162 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,163 +1,4 @@
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Rr]elease/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
.builds
*.dotCover

## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf

# Visual Studio profiler
*.psess
*.vsp

# ReSharper is a .NET coding add-in
_ReSharper*

# Installshield output folder
[Ee]xpress

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish

# Others
[Bb]in
[Oo]bj
sql
TestResults
*.Cache
ClientBin
stylecop.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML



############
## Windows
############

# Windows image file caches
Thumbs.db

# Folder config file
Desktop.ini


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg

# Mac crap
.DS_Store
node_modules
.sass-cache
*.lock
8 changes: 8 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"curly": true,
"eqnull": true,
"browser": true,
"globals": {
"Snap": true
}
}
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
language: node_js
node_js:
- "0.10"

script: "./scripts/runTests.sh"
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source "https://rubygems.org"

gem "sass", "3.2.10"
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Snap.js
# Snap.js v2.0.0-rc1 [![Build Status](https://travis-ci.org/jakiestfu/Snap.js.png?branch=v2.0)](https://travis-ci.org/jakiestfu/Snap.js)
A Library for creating beautiful mobile shelfs in Javascript

<a href="http://www.screenr.com/embed/0EJ7" target="_blank">View Video Preview</a>
Expand All @@ -25,7 +25,7 @@ A Library for creating beautiful mobile shelfs in Javascript
* Flick Support
* User Intent Detection
* Disable Hyperextension
* Event Hooks
* Ev2.0.0-rc1 Hooks
* CSS3 Powered Animations with IE fallbacks
* Drag Support
* Drag Handle Support
Expand Down Expand Up @@ -99,7 +99,7 @@ settings = {
* `minPosition`: Maximum number of pixels the pane may be slid to the left
* `tapToClose`: If true, tapping an open pane will close it
* `touchToDrag`: If true, dragging the target `settings.element` will open/close the pane
* `minDragDistance`: The minimum amount of pixels the user needs to drag within the `slideIntent` degrees to move the pane
* `minDragDistance`: The minimum amount of pixels the user needs to drag within the `slideIntent` degrees to move the pane
* `slideIntent`: The number of degrees the user must initiate sliding in towards the left or right (see diagram below)

Notes on Slide Intent: The slide intent is an int between 0 and 90, and represents the degrees in the first quadrant of a circle that you would like to have mirrored on the X *and* Y axis. For example, if you have 40 set as your `slideIntent` value, the user would only be able to slide the pane by dragging in the blue area in the diagram below. Once intent has been defined, it will not change until the user releases.
Expand Down Expand Up @@ -202,7 +202,7 @@ The data returned from the `state` method will look like the following:
percentage: 40.571649 // The percentage that the Pane is open. Good or animating other things
}
}
}
}
```

## Gotchas
Expand Down Expand Up @@ -302,7 +302,7 @@ var doSnap = function(){
window.snapper = new Snap({
element: document.getElementById('content')
});
}
}
};

window.addEventListener('push', doSnap);
Expand Down
7 changes: 5 additions & 2 deletions component.json → bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Snap.js",
"description": "A Library for creating beautiful mobile shelfs in Javascript (Facebook and Path style side menus)",
"version": "1.9.2",
"version": "v2.0.0-rc1",
"author": "Jacob Kelley <[email protected]>",
"keywords": [
"mobile shelfs",
Expand All @@ -11,6 +11,9 @@
"side menu"
],
"license": "MIT",
"main": "snap.js",
"main": [
"./dist/latest/snap.js",
"./dist/latest/snap.css"
],
"scripts": ["snap.js"]
}
2 changes: 1 addition & 1 deletion demo/apps/classNames.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!DOCTYPE HTML><html lang="en-US"> <head> <title>Snap.js</title> <meta http-equiv="x-ua-compatible" content="IE=edge" /> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-touch-fullscreen" content="yes"> <link rel="stylesheet" type="text/css" href="../../snap.css" /> <link rel="stylesheet" type="text/css" href="../assets/demo.css" /> </head> <body> <div class="snap-drawers"> <div class="snap-drawer snap-drawer-left"> <div> <h3>Snap.js</h3> <div class="demo-social"> <a href="https://twitter.com/share" class="twitter-share-button" data-lang="en" data-text="Snap.js - A Library for creating beautiful mobile shelfs in Javascript" data-url="http://jakiestfu.github.com/Snap.js/" data-count="none" data-via="jakiestfu">Tweet</a> <a href="https://twitter.com/jakiestfu" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow @jakiestfu</a> <iframe src="http://ghbtns.com/github-btn.html?user=jakiestfu&amp;repo=Snap.js&amp;type=watch&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="120" height="20"></iframe> </div> <h4>Demos</h4> <ul> <li><a href="default.html">Default</a></li> <li><a href="noDrag.html">No Drag</a></li> <li><a href="dragElement.html">Drag Element</a></li> <li><a href="rightDisabled.html">Right Disabled</a></li> <li><a href="hyperextend.html">Hyperextension Disabled</a></li> <li><a href="skinnyThreshold.html">Skinny Threshold</a></li> <li><a href="toggles.html">Toggles</a></li> <li><a href="classNames.html">Class Names</a></li> <li><a href="expand.html">Expanding</a></li> <li><a href="settings.html">Settings</a></li> <li><a href="ratchet/template.html">Ratchet</a></li> </ul> <div> <p>The class names demo shows how you can utilize the classess added by Snap.js to adjust hidden content. In this case, we're showing the same menu on both sides of the app via CSS and classess.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla non erat ac leo ultrices blandit sed vel risus. Pellentesque facilisis blandit auctor. Maecenas vestibulum vulputate tincidunt. Mauris nec quam libero. Fusce eget ligula non leo varius condimentum quis ac elit. Donec id urna ut neque semper ultrices. Proin ut suscipit felis. Nullam neque felis, ullamcorper scelerisque volutpat vel, vehicula vehicula neque. Aenean scelerisque elit ac erat sagittis ullamcorper.</p> </div> </div> </div> <div class="snap-drawer snap-drawer-right"></div> </div> <div id="content" class="snap-content" style="opacity:0.8;"> <div id="toolbar"> <a href="#" id="open-left"></a> <h1>Class Names</h1> </div> </div> <script type="text/javascript" src="../../snap.js"></script> <script type="text/javascript"> var snapper = new Snap({ element: document.getElementById('content') }); </script> <script type="text/javascript" src="../assets/demo.js"></script> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> </body></html>
<!DOCTYPE HTML><html lang="en-US"> <head> <title>Snap.js</title> <meta http-equiv="x-ua-compatible" content="IE=edge" /> <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-touch-fullscreen" content="yes"> <link rel="stylesheet" type="text/css" href="../../dist/latest/snap.css" /> <link rel="stylesheet" type="text/css" href="../assets/demo.css" /> </head> <body> <div class="snap-drawers"> <div class="snap-drawer snap-drawer-left"> <div> <h3>Snap.js</h3> <div class="demo-social"> <a href="https://twitter.com/share" class="twitter-share-button" data-lang="en" data-text="Snap.js - A Library for creating beautiful mobile shelfs in Javascript" data-url="http://jakiestfu.github.com/Snap.js/" data-count="none" data-via="jakiestfu">Tweet</a> <a href="https://twitter.com/jakiestfu" class="twitter-follow-button" data-show-count="false" data-lang="en">Follow @jakiestfu</a> <iframe src="http://ghbtns.com/github-btn.html?user=jakiestfu&amp;repo=Snap.js&amp;type=watch&amp;count=true" allowtransparency="true" frameborder="0" scrolling="0" width="120" height="20"></iframe> </div> <h4>Demos</h4> <ul> <li><a href="default.html">Default</a></li> <li><a href="noDrag.html">No Drag</a></li> <li><a href="dragElement.html">Drag Element</a></li> <li><a href="rightDisabled.html">Right Disabled</a></li> <li><a href="hyperextend.html">Hyperextension Disabled</a></li> <li><a href="skinnyThreshold.html">Skinny Threshold</a></li> <li><a href="toggles.html">Toggles</a></li> <li><a href="classNames.html">Class Names</a></li> <li><a href="expand.html">Expanding</a></li> <li><a href="settings.html">Settings</a></li> <li><a href="ratchet/template.html">Ratchet</a></li> </ul> <div> <p>The class names demo shows how you can utilize the classess added by Snap.js to adjust hidden content. In this case, we're showing the same menu on both sides of the app via CSS and classess.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla non erat ac leo ultrices blandit sed vel risus. Pellentesque facilisis blandit auctor. Maecenas vestibulum vulputate tincidunt. Mauris nec quam libero. Fusce eget ligula non leo varius condimentum quis ac elit. Donec id urna ut neque semper ultrices. Proin ut suscipit felis. Nullam neque felis, ullamcorper scelerisque volutpat vel, vehicula vehicula neque. Aenean scelerisque elit ac erat sagittis ullamcorper.</p> </div> </div> </div> <div class="snap-drawer snap-drawer-right"></div> </div> <div id="content" class="snap-content" style="opacity:0.8;"> <div id="toolbar"> <a href="#" id="open-left"></a> <h1>Class Names</h1> </div> </div> <script type="text/javascript" src="../../dist/latest/snap.js"></script> <script type="text/javascript"> var snapper = new Snap({ element: document.getElementById('content') }); </script> <script type="text/javascript" src="../assets/demo.js"></script> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="https://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script> </body></html>
Expand Down
Loading