Skip to content

Commit 49f137a

Browse files
author
Mark Robinson
committed
Add mobile support for graph
Implements gestures using hammer.js and better styling for graph height Closes #50
1 parent 94d14ba commit 49f137a

File tree

13 files changed

+3008
-5
lines changed

13 files changed

+3008
-5
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"name": "hammerjs",
3+
"main": "hammer.js",
4+
"ignore": [
5+
"tests",
6+
"src",
7+
".bowerrc",
8+
".gitignore",
9+
".jscsrc",
10+
".jshintrc",
11+
".travis.yml",
12+
"component.json",
13+
"Gruntfile.coffee",
14+
"package.json"
15+
],
16+
"homepage": "https://github.com/EightMedia/hammer.js",
17+
"version": "2.0.8",
18+
"_release": "2.0.8",
19+
"_resolution": {
20+
"type": "version",
21+
"tag": "v2.0.8",
22+
"commit": "ee611316bec077fcfbba3fd604ebc4b0b35ac288"
23+
},
24+
"_source": "https://github.com/EightMedia/hammer.js.git",
25+
"_target": "^2.0.8",
26+
"_originalSource": "hammerjs",
27+
"_direct": true
28+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Changelog
2+
3+
### 2.0.6, 2015-12-23
4+
- Add Assign method and deprecate merge and extend ([#895](https://github.com/hammerjs/hammer.js/pull/895)[fc01eae](https://github.com/hammerjs/hammer.js/commit/fc01eaea678acc430c664eb374555fbe3d403bdd))
5+
- Expose Hammer on window or self if either is defined to avoid issues when AMD is present but not used. ( [356f795](https://github.com/hammerjs/hammer.js/commit/356f7955b01f3679c29d6c45931679256b45036e))
6+
- Add support for PointerEvent instead of MSPointerEvent if supported. ([#754](https://github.com/hammerjs/hammer.js/issues/754), [439c7a6](https://github.com/hammerjs/hammer.js/commit/439c7a6c46978ab387b4b8289399e904d1c49535))
7+
- Fixed moz-prefix, prefix should be Moz not moz. ([3ea47f3](https://github.com/hammerjs/hammer.js/commit/3ea47f3aebadc9d3bb6bf52bc8402cad135ef8a9))
8+
- Removed non-existant recognizer ([f1c2d3b](https://github.com/hammerjs/hammer.js/commit/f1c2d3bf05f530ae092ecfc2335fceeff0e9eec9))
9+
- Fixed config leaking between instances([189098f](https://github.com/hammerjs/hammer.js/commit/189098ff7736f6ed2fce9a3d3e1f5a3afee085ba))
10+
- Fixed gaps in gesture configs and update tests to match ([70c2902](https://github.com/hammerjs/hammer.js/commit/70c2902d773a750e92ce8c423f8a4165c07eab97))
11+
- Fixed Manager off method ([#768](https://github.com/hammerjs/hammer.js/issues/768), [da49a27](https://github.com/hammerjs/hammer.js/commit/da49a2730779ecc3b4dd147cc418a0df7c70fad9))
12+
- Added compatibility with requirejs optimizer namespaces ( [70075f2](https://github.com/hammerjs/hammer.js/commit/70075f2df1b855f7c6d8d3caac49b9276b88c8d6))
13+
- Made touchaction test zoomable ( [50264a7](https://github.com/hammerjs/hammer.js/commit/50264a70251ca88bbaf7b666401e527eee616de5))
14+
- Fixed preventing default when for `pan-x pan-y` case ( [95eaafa](https://github.com/hammerjs/hammer.js/commit/95eaafadad27bd1b25d20cf976811a451922f1c4))
15+
- Fixed incorrect touch action pan direction ( [a81da57](https://github.com/hammerjs/hammer.js/commit/a81da57a82ebf37e695e7c443e4e2715e7f32856))
16+
- Fixed combined pan-x pan-y to resolve to none ( [fdae07b](https://github.com/hammerjs/hammer.js/commit/fdae07bc2ba3c90aad28da6791b3d5df627bc612))
17+
- Fixed inverted touch-action for pan recognizer ([#728](https://github.com/hammerjs/hammer.js/issues/728), [605bd3b](https://github.com/hammerjs/hammer.js/commit/605bd3beca780be91dd43f9da8b809d155a43d1a))
18+
- Fixed dependency on non standard touch list ordering ([#610](https://github.com/hammerjs/hammer.js/issues/610), [#791](https://github.com/hammerjs/hammer.js/issues/791), [287720a](https://github.com/hammerjs/hammer.js/commit/287720a6e5067e7f28be8b8b3b266d22905361c4))
19+
- Fixed swipe to not trigger after multitouch gesture ([#640](https://github.com/hammerjs/hammer.js/issues/640), [711d8a1](https://github.com/hammerjs/hammer.js/commit/711d8a1df1aa5057ecb536454a36257e3c0d6d91))
20+
- Fixed swipe recognizer to use overall gesture direction and velocity ( [963fe69](https://github.com/hammerjs/hammer.js/commit/963fe697515273fee508414bc29e2656465cea55))
21+
- Fixed getDirection returning reversed direction ( [e40dcde](https://github.com/hammerjs/hammer.js/commit/e40dcde43bdac7a74c8ce5c05a4f62121089cd91))
22+
- Fixed detection of tap when multi touch gestures are present ( [c46cbba](https://github.com/hammerjs/hammer.js/commit/c46cbba1c2cbbf874b59913416858d9dae297e64))
23+
- Fixed incorrect event order ([#824](https://github.com/hammerjs/hammer.js/issues/824), [92f2d76](https://github.com/hammerjs/hammer.js/commit/92f2d76188480d967e738a19cd508d0b94a31329))
24+
- Fixed leaking options between recognizer instances ([#813](https://github.com/hammerjs/hammer.js/issues/813), [af32c9b](https://github.com/hammerjs/hammer.js/commit/af32c9bace3f04bb34bee852ff56a33cc8fc27cd))
25+
- Fixed detection when element has no style attribute ( [5ca6d8c](https://github.com/hammerjs/hammer.js/commit/5ca6d8cbead02c71929a8073e95ddf98e11c0e06))
26+
27+
### 2.0.4, 2014-09-28
28+
- Fix IE pointer issue. [#665](https://github.com/hammerjs/hammer.js/pull/665)
29+
- Fix multi-touch at different elements. [#668](https://github.com/hammerjs/hammer.js/pull/668)
30+
- Added experimental [single-user Touch input handler](src/input/singletouch.js). This to improve performance/ux when only a single user has to be supported. Plans are to release 2.1 with this as default, and a settings to enable the multi-user handler.
31+
32+
### 2.0.3, 2014-09-10
33+
- Manager.set improvements.
34+
- Fix requireFailure() call in Manager.options.recognizers.
35+
- Make DIRECTION_ALL for pan and swipe gestures less blocking.
36+
- Fix Swipe recognizer threshold option.
37+
- Expose the Input classes.
38+
- Added the option `inputClass` to set the used input handler.
39+
40+
### 2.0.2, 2014-07-26
41+
- Improved mouse and pointer-events input, now able to move outside the window.
42+
- Added the export name (`Hammer`) as an argument to the wrapper.
43+
- Add the option *experimental* `inputTarget` to change the element that receives the events.
44+
- Improved performance when only one touch being active.
45+
- Fixed the jumping deltaXY bug when going from single to multi-touch.
46+
- Improved velocity calculations.
47+
48+
### 2.0.1, 2014-07-15
49+
- Fix issue when no document.body is available
50+
- Added pressup event for the press recognizer
51+
- Removed alternative for Object.create
52+
53+
### 2.0.0, 2014-07-11
54+
- Full rewrite of the library.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Contributing to Hammer.js
2+
3+
Looking to contribute something to Hammer.js? **Here's how you can help.**
4+
5+
6+
## Reporting issues
7+
8+
We only accept issues that are bug reports or feature requests. Bugs must be
9+
isolated and reproducible problems that can be fixed within the Hammer.js.
10+
Please read the following guidelines before opening any issue.
11+
12+
1. [**Read the documentation**](https://hammerjs.github.io)
13+
14+
2. **Search for existing issues.** We get a lot of duplicate issues, and you'd
15+
help us out a lot by first checking if someone else has reported the same issue.
16+
Moreover, the issue may have already been resolved with a fix available. Also
17+
take a look if your problem is explained at the Wiki.
18+
19+
3. **Create an isolated and reproducible test case.** Be sure the problem exists
20+
in Hammer's code with a reduced test case that should be included in each bug
21+
report.
22+
23+
4. **Include a live example.** Make use of jsFiddle or jsBin to share your
24+
isolated test cases. Also, a screen capture would work, with tools like LICEcap.
25+
26+
5. **Share as much information as possible.** Include operating system and
27+
version, browser and version, version of Hammer.js, customized or vanilla build,
28+
etc. where appropriate. Also include steps to reproduce the bug.
29+
30+
## Pull requests
31+
32+
1. Changes must be done in `/src` files, never just the compiled files. Also, don't
33+
commit the compiled files.
34+
35+
2. Try not to pollute your pull request with unintended changes. Keep them simple
36+
and small
37+
38+
3. Try to share which browsers your code has been tested in before submitting a
39+
pull request
40+
41+
4. Write tests for your code, these can be found in `/tests`.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (C) 2011-2014 by Jorik Tangelder (Eight Media)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Hammer.js 2.0.6
2+
3+
[![Build Status](https://travis-ci.org/hammerjs/hammer.js.svg)](https://travis-ci.org/hammerjs/hammer.js)
4+
5+
## Support, Questions, and Collaboration
6+
7+
[![Slack Status](https://hammerjs.herokuapp.com/badge.svg)](https://hammerjs.herokuapp.com/)
8+
9+
## Documentation
10+
11+
Visit [hammerjs.github.io](http://hammerjs.github.io) for detailed documentation.
12+
13+
```js
14+
// get a reference to an element
15+
var stage = document.getElementById('stage');
16+
17+
// create a manager for that element
18+
var mc = new Hammer.Manager(stage);
19+
20+
// create a recognizer
21+
var Rotate = new Hammer.Rotate();
22+
23+
// add the recognizer
24+
mc.add(Rotate);
25+
26+
// subscribe to events
27+
mc.on('rotate', function(e) {
28+
// do something cool
29+
var rotation = Math.round(e.rotation);
30+
stage.style.transform = 'rotate('+rotation+'deg)';
31+
});
32+
```
33+
34+
An advanced demo is available here: [http://codepen.io/runspired/full/ZQBGWd/](http://codepen.io/runspired/full/ZQBGWd/)
35+
36+
37+
## Contributing
38+
39+
Read the [contributing guidelines](./CONTRIBUTING.md).
40+
41+
For PRs.
42+
43+
- Use [Angular Style commit messages](https://github.com/angular/angular.js/blob/v1.4.8/CONTRIBUTING.md#commit)
44+
- Rebase your PR branch when necessary
45+
- If you add a feature or fix a bug, please add or fix any necessary tests.
46+
- If a new feature, open a docs PR to go with.
47+
48+
## Building
49+
50+
You can get the pre-build versions from the Hammer.js website, or do this by yourself running
51+
`npm install -g grunt-cli && npm install && grunt build`
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "hammerjs",
3+
"main": "hammer.js",
4+
"ignore": [
5+
"tests",
6+
"src",
7+
".bowerrc",
8+
".gitignore",
9+
".jscsrc",
10+
".jshintrc",
11+
".travis.yml",
12+
"component.json",
13+
"Gruntfile.coffee",
14+
"package.json"
15+
]
16+
}
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
var changelog = require( "changelogplease" );
2+
var gittags = require( "git-tags" ).get( function( error, tags ) {
3+
if ( error ) {
4+
throw error
5+
}
6+
console.log( tags[ 1 ] + ".." + tags[ 0 ] );
7+
var exclude = [ "Merge", "Whitespace", "Fixup", "Cleanup", "Formatting", "Ignore" ];
8+
changelog( {
9+
ticketUrl: "https://github.com/hammerjs/hammer.js/issues/{id}",
10+
commitUrl: "https://github.com/hammerjs/hammerjs/commit/{id}",
11+
sort: false,
12+
repo: "./",
13+
committish: tags[ 1 ] + ".." + tags[ 0 ]
14+
}, function( error, log ) {
15+
if ( error ) {
16+
throw error;
17+
}
18+
log = parseLog( log );
19+
console.log( log );
20+
} );
21+
function parseLog( log ) {
22+
var lines = log.split( "\n" );
23+
var newLog = [];
24+
var log = [];
25+
var currentComponent;
26+
27+
28+
lines.shift();
29+
lines.forEach( function( line ) {
30+
var newLine = parseLine( line );
31+
if ( newLine ) {
32+
log.push( line );
33+
}
34+
} );
35+
var log = log.join( "\n" );
36+
return log.replace( /\*/g, "-" ).replace( /__TICKETREF__,/g, "" );
37+
}
38+
function parseLine( line ) {
39+
var parts = getParts( line );
40+
41+
if ( exclude.indexOf( parts.component ) > -1 ) {
42+
return false;
43+
}
44+
return parts;
45+
}
46+
function getParts( line ) {
47+
var parts = line.split( ":" );
48+
var component = "";
49+
var message;
50+
var commits = line.match( /\{\{([A-Za-z0-9 ]){0,99}\}\}/ )
51+
52+
if ( parts.length > 1 && parts[ 0 ].length <= 20 ) {
53+
component = parts[ 0 ];
54+
parts.shift();
55+
message = parts.join( ":" );
56+
} else {
57+
parts = line.split( " " );
58+
component = parts[ 1 ];
59+
parts.shift();
60+
message = parts.join( " " );
61+
}
62+
63+
if ( component ) {
64+
component = component.replace( /\* |,/, "" );
65+
}
66+
return {
67+
component: component,
68+
message: message
69+
};
70+
}
71+
} );

0 commit comments

Comments
 (0)