Permalink
Browse files

Simple chaining addition for callbacks. Will do #66 when closed

  • Loading branch information...
1 parent 2fd8e7d commit 52d771090c42ea03a0059f6a0afaa8332cacf068 @tmcw tmcw committed Oct 31, 2011
Showing with 15 additions and 5 deletions.
  1. +4 −0 CHANGELOG
  2. +4 −1 modestmaps.js
  3. +2 −2 modestmaps.min.js
  4. +1 −1 package.json
  5. +3 −0 src/map.js
  6. +1 −1 src/start.js
View
@@ -8,6 +8,10 @@ Following the semantic versioning recommendation best we can:
minor version, and backwards incompatible API changes increment
the major version." -- http://semver.org/
+v0.21.0
+- Returns `this` from `map.addCallback()`, `map.removeCallback()`,
+ and `map.dispatchCallback()`
+
v0.20.0
- Adds `map.destroy()` method, and in that process, allows all
handlers to be removable with a `.remove()` function.
View
@@ -1,5 +1,5 @@
/*!
- * Modest Maps JS v0.20.0
+ * Modest Maps JS v0.21.0
* http://modestmaps.com/
*
* Copyright (c) 2011 Stamen Design, All Rights Reserved.
@@ -1442,14 +1442,17 @@ if (!com) {
addCallback: function(event, callback) {
this.callbackManager.addCallback(event, callback);
+ return this;
},
removeCallback: function(event, callback) {
this.callbackManager.removeCallback(event, callback);
+ return this;
},
dispatchCallback: function(event, message) {
this.callbackManager.dispatchCallback(event, message);
+ return this;
},
windowResize: function() {
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -1,7 +1,7 @@
{
"name": "modestmaps",
"description": "a display and interaction library for tile-based maps",
- "version": "0.20.0",
+ "version": "0.21.0",
"author": {
"name": "Tom Carden",
"email": "tom@tom-carden.co.uk",
View
@@ -128,14 +128,17 @@
addCallback: function(event, callback) {
this.callbackManager.addCallback(event, callback);
+ return this;
},
removeCallback: function(event, callback) {
this.callbackManager.removeCallback(event, callback);
+ return this;
},
dispatchCallback: function(event, message) {
this.callbackManager.dispatchCallback(event, message);
+ return this;
},
windowResize: function() {
View
@@ -1,5 +1,5 @@
/*!
- * Modest Maps JS v0.20.0
+ * Modest Maps JS v0.21.0
* http://modestmaps.com/
*
* Copyright (c) 2011 Stamen Design, All Rights Reserved.

0 comments on commit 52d7710

Please sign in to comment.