From 64972ee868be74b1bdedc227f48917a61209c74b Mon Sep 17 00:00:00 2001 From: Michael He Date: Sun, 2 Mar 2014 17:33:16 +0900 Subject: [PATCH] fixed the _.defer require a function not a expression. --- dist/angular-google-maps.js | 4 +++- src/coffee/directives/map.coffee | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/dist/angular-google-maps.js b/dist/angular-google-maps.js index 0e8de7594..5cac3ee2c 100644 --- a/dist/angular-google-maps.js +++ b/dist/angular-google-maps.js @@ -2628,7 +2628,9 @@ Nick Baugh - https://github.com/niftylettuce if (newValue === oldValue || newValue === _m.zoom) { return; } - return _.defer(_m.setZoom(newValue)); + return _.defer(function(){ + _m.setZoom(newValue) + }); }); scope.$watch("bounds", function(newValue, oldValue) { var bounds, ne, sw; diff --git a/src/coffee/directives/map.coffee b/src/coffee/directives/map.coffee index 0e70ea464..306f47c3e 100644 --- a/src/coffee/directives/map.coffee +++ b/src/coffee/directives/map.coffee @@ -214,7 +214,8 @@ angular.module("google-maps").directive "googleMap", ["$log", "$timeout", ($log, ), true scope.$watch "zoom", (newValue, oldValue) -> return if newValue is oldValue or newValue is _m.zoom - _.defer _m.setZoom newValue + _.defer -> + _m.setZoom newValue scope.$watch "bounds", (newValue, oldValue) -> return if newValue is oldValue