Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
Merge pull request #7 from Polymer/master
Browse files Browse the repository at this point in the history
6/17 master -> stable
  • Loading branch information
dfreedm committed Jun 17, 2013
2 parents 6373e53 + d6328b1 commit d6147f1
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 69 deletions.
9 changes: 3 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "src/PointerEvents"]
path = src/PointerEvents
url = https://github.com/Polymer/PointerEvents.git
[submodule "buildbot"]
path = buildbot
url = git://github.com/Polymer/buildbot.git
[submodule "tools"]
path = tools
url = git://github.com/Polymer/tools.git
11 changes: 0 additions & 11 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,6 @@ module.exports = function(grunt) {
},
dest: 'build/pointergestures.js',
src: [
// PointerEvents
'src/PointerEvents/src/boot.js',
'src/PointerEvents/src/touch-action.js',
'src/PointerEvents/src/PointerEvent.js',
'src/PointerEvents/src/pointermap.js',
'src/PointerEvents/src/sidetable.js',
'src/PointerEvents/src/dispatcher.js',
'src/PointerEvents/src/installer.js',
'src/PointerEvents/src/platform-events.js',
'src/PointerEvents/src/capture.js',
// PointerGestures
'src/PointerGestureEvent.js',
'src/initialize.js',
'src/sidetable.js',
Expand Down
9 changes: 3 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ Included events are:

## Installation

1. Check out the submodule for PointerEvents, and PointerEvents' necessary
submodules. (`git submodule update --init --recursive`).
1. Install the [PointerEvents polyfill](https://github.com/Polymer/PointerEvents) as a sibling to PointerGestures

2. Include PointerGestures/src/pointergestures in your page.
2. Include `PointerGestures/pointergestures.js` in your page.

3. PointerGestures will automatically include PointerEvents.

4. Set the `touch-action` of a few elements and see the events fire!
3. Set the `touch-action` of a few elements and see the events fire!
1 change: 0 additions & 1 deletion buildbot
Submodule buildbot deleted from 3a4761
16 changes: 8 additions & 8 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ frameworks = ['mocha'];
files = [
'node_modules/chai/chai.js',
'node_modules/chai-spies/chai-spies.js',
'src/PointerEvents/src/boot.js',
'src/PointerEvents/src/PointerEvent.js',
'src/PointerEvents/src/pointermap.js',
'src/PointerEvents/src/sidetable.js',
'src/PointerEvents/src/dispatcher.js',
'src/PointerEvents/src/installer.js',
'src/PointerEvents/src/platform-events.js',
'src/PointerEvents/src/capture.js',
'../PointerEvents/src/boot.js',
'../PointerEvents/src/PointerEvent.js',
'../PointerEvents/src/pointermap.js',
'../PointerEvents/src/sidetable.js',
'../PointerEvents/src/dispatcher.js',
'../PointerEvents/src/installer.js',
'../PointerEvents/src/platform-events.js',
'../PointerEvents/src/capture.js',
'src/PointerGestureEvent.js',
'src/initialize.js',
'src/sidetable.js',
Expand Down
42 changes: 42 additions & 0 deletions pointergestures.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
* Copyright 2013 The Polymer Authors. All rights reserved.
* Use of this source code is governed by a BSD-style
* license that can be found in the LICENSE file.
*/
/**
* @module PointerGestures
*/
(function() {
var thisFile = 'pointergestures.js';
var scopeName = 'PointerGestures';
var modules = [
'src/PointerGestureEvent.js',
'src/initialize.js',
'src/sidetable.js',
'src/pointermap.js',
'src/dispatcher.js',
'src/hold.js',
'src/track.js',
'src/flick.js',
'src/tap.js'
];

window[scopeName] = {
entryPointName: thisFile,
modules: modules
};

var script = document.querySelector('script[src $= "' + thisFile + '"]');
var src = script.attributes.src.value;
var basePath = src.slice(0, src.indexOf(thisFile));

if (!window.PointerEvent) {
document.write('<script src="' + basePath + '../PointerEvents/pointerevents.js"></script>');
}

if (!window.Loader) {
var path = basePath + 'tools/loader/loader.js';
document.write('<script src="' + path + '"></script>');
}
document.write('<script>Loader.load("' + scopeName + '")</script>');
})();
2 changes: 1 addition & 1 deletion samples/simple/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
white-space: pre;
}
</style>
<script src="../../src/pointergestures.js"></script>
<script src="../../pointergestures.js"></script>
</head>
<body>
<div id="capture" touch-action="none">
Expand Down
2 changes: 1 addition & 1 deletion samples/track/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>Track sample</title>
<script src="../../src/pointergestures.js"></script>
<script src="../../pointergestures.js"></script>
<style>
body, html {
height: 100%;
Expand Down
1 change: 0 additions & 1 deletion src/PointerEvents
Submodule PointerEvents deleted from 35423e
33 changes: 0 additions & 33 deletions src/pointergestures.js

This file was deleted.

2 changes: 1 addition & 1 deletion tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script src="../node_modules/chai/chai.js"></script>
<script src="../node_modules/chai-spies/chai-spies.js"></script>
<script src="../node_modules/mocha/mocha.js"></script>
<script src="../src/pointergestures.js"></script>
<script src="../pointergestures.js"></script>
</head>
<body>
<div id="mocha"></div>
Expand Down
1 change: 1 addition & 0 deletions tools
Submodule tools added at 2a2bcb

0 comments on commit d6147f1

Please sign in to comment.