File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
src/coffee/directives/api/models/child Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ angular.module('uiGmapgoogle-maps.directives.api.models.child')
2828 @isScopeModel = false
2929 } = opts
3030 # where @model is a reference to model in the controller scope
31- # clonedModel is a copy for comparison
31+ # clonedModel is a copy for comparison (see models-watcher)
3232 @clonedModel = _ .clone (@model ,true ) if @isScopeModel
3333 @deferred = uiGmapPromise .defer ()
3434 _ .each @keys , (v , k ) =>
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ angular.module('uiGmapgoogle-maps.directives.api.models.child')
1818
1919 # where @model is a reference to model in the controller scope
2020 # clonedModel is a copy for comparison
21- @clonedModel = _ .clone @model , true
21+ @clonedModel = _ .clone @model , true if @isScopeModel
2222
2323 @ getGmarker = ->
2424 @markerScope ? .getGMarker () if @markerScope ? [' getGMarker' ]?
@@ -210,8 +210,8 @@ angular.module('uiGmapgoogle-maps.directives.api.models.child')
210210 @scope .$destroy ()
211211
212212 updateModel : (model ) =>
213- @clonedModel = _ .clone (model,true )
214- _ .extend (@model , @clonedModel )
213+ @clonedModel = _ .clone (model,true ) if @isScopeModel
214+ _ .extend (@model , @clonedModel or model )
215215
216216 WindowChildModel
217217 ]
You can’t perform that action at this time.
0 commit comments