Closed drunkhacker closed 10 years ago
I think it seems not actually.
in the source code,
if (hasCenter) { scope.$watch('gmCenter', function (newValue, oldValue) { var changed = (newValue !== oldValue); if (changed && !controller.dragging) { var latLng = newValue; if (latLng) controller.center = latLng; } }, true); }
and here,
if (hasBounds) { scope.$watch('gmBounds', function(newValue, oldValue) { var changed = (newValue !== oldValue); if (changed && !controller.dragging) { var bounds = newValue; if (bounds) controller.bounds = bounds; } }); }
Both of $watch expression doesn't update the other side simultaneously. But it is quite natural that if one of them changes, the other also does.
$watch
What do you think?
Sorry. They do. After set center from my controller, AngularGM updates controller's center. Then it calls updateScope which handles other properties as well.
center
updateScope
I think it seems not actually.
in the source code,
and here,
Both of
$watch
expression doesn't update the other side simultaneously. But it is quite natural that if one of them changes, the other also does.What do you think?