Skip to content

Commit

Permalink
GA, linting, package.json, makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom MacWright committed Aug 26, 2011
1 parent 742ff55 commit fc1d3b8
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 16 deletions.
2 changes: 2 additions & 0 deletions Makefile
@@ -0,0 +1,2 @@
lint:
./node_modules/.bin/jshint src/*.js
16 changes: 7 additions & 9 deletions index.html
Expand Up @@ -155,16 +155,14 @@ <h1>easey</h1>
</div>
<script src='index.js' type='text/javascript'></script>
<script type="text/javascript">
var _gauges = _gauges || [];
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-12158002-2']);
_gaq.push(['_trackPageview']);

(function() {
var t = document.createElement('script');
t.type = 'text/javascript';
t.async = true;
t.id = 'gauges-tracker';
t.setAttribute('data-site-id', '4e567276613f5d78a1000001');
t.src = '//secure.gaug.es/track.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(t, s);
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>
</body>
Expand Down
21 changes: 21 additions & 0 deletions package.json
@@ -0,0 +1,21 @@
{
"name": "easey",
"version": "0.0.1",
"description": "Easing for Modest Maps",
"author": {
"name": "MapBox",
"url": "http://mapbox.com/",
"email": "info@mapbox.com"
},
"contributors": [
"Tom MacWright <macwright@gmail.com>",
"Young Hahn <young@developmentseed.org>"
],
"licenses": [{
"type": "BSD"
}],
"devDependencies": {
"jshint": "0.2.3",
"uglify-js": "1.0.x"
}
}
14 changes: 7 additions & 7 deletions src/easey.js
Expand Up @@ -14,12 +14,12 @@

easey.sequence = function(map, steps) {
for (var i = 0; i < (steps.length - 1); i++) {
if (steps[i].callback) var c = steps[i].callback;
steps[i].callback = (function(j, c) {
var c = steps[i].callback || function() {};
steps[i].callback = (function(j, ca) {
return function() {
if (c) c();
easey.slow(map, steps[j])
}
if (ca) ca();
easey.slow(map, steps[j]);
};
})(i + 1, c);
}
return easey.slow(map, steps[0]);
Expand Down Expand Up @@ -186,8 +186,8 @@
MM.addEvent(document, 'mouseup', this._mouseUp = MM.bind(this.mouseUp, this));
MM.addEvent(document, 'mousemove', this._mouseMove = MM.bind(this.mouseMove, this));

this.lastMouse = MM.getMousePoint(e, this.map)
this.prevMouse = MM.getMousePoint(e, this.map)
this.lastMouse = MM.getMousePoint(e, this.map);
this.prevMouse = MM.getMousePoint(e, this.map);
this.map.parent.style.cursor = 'move';

return MM.cancelEvent(e);
Expand Down

0 comments on commit fc1d3b8

Please sign in to comment.