Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created February 2, 2015 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/d7c6ef145520095e5d72 to your computer and use it in GitHub Desktop.
Save tmcw/d7c6ef145520095e5d72 to your computer and use it in GitHub Desktop.
diff --git a/src/components/workspace/index.jsx b/src/components/workspace/index.jsx
index d66f4b7..12cb558 100644
--- a/src/components/workspace/index.jsx
+++ b/src/components/workspace/index.jsx
@@ -292,6 +292,9 @@ var Workspace = React.createClass({
case MapStateConstants.MAPSTATE_RESET_NORTH:
this.map.resetNorth();
break;
+ case MapStateConstants.MAPSTATE_FIT_BOUNDS:
+ this.map.fitBounds(e.value.bounds);
+ break;
}
this.map.on('move', this._onMapMove);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment