     sm,
     widgets,
     BaseControl,
-    BaseRouter
+    BaseRouter,
+    L
 ) ->
+
+    # Allow calling original getBounds when needed.
+    # (leaflet.activearea overrides getBounds)
+    L.Map.prototype._originalGetBounds = L.Map.prototype.getBounds
 
     DEBUG_STATE = appSettings.debug_state
     VERIFY_INVARIANTS = appSettings.verify_invariants

    'cs!app/base',
    'cs!app/widgets',
    'cs!app/control',
    'cs!app/router'
],
(
    Models,

# TODO: Rewrite this to work with r.js
#if appSettings.sentry_url
#    config = {}
#    if appSettings.sentry_disable
