8000 added 'modelsByRef' attribute which enables/disables equality check o… · angular-ui/angular-google-maps@d9f5cf8 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Nov 30, 2018. It is now read-only.

Commit d9f5cf8

Browse files
committed
added 'modelsByRef' attribute which enables/disables equality check on 'models'
1 parent 947f83b commit d9f5cf8

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/coffee/directives/api/markers.coffee

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ angular.module("google-maps.directives.api".ns())
1111
doCluster: '=docluster'
1212
clusterOptions: '=clusteroptions'
1313
clusterEvents: '=clusterevents'
14+
modelsByRef: '=modelsbyref'
1415

1516
@$log.info @
1617

src/coffee/directives/api/models/parent/i-marker-parent-model.coffee

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ angular.module("google-maps.directives.api.models.parent".ns())
3535
return false
3636
ret
3737

38-
watch: (propNameToWatch, scope) =>
38+
watch: (propNameToWatch, scope, doNotEqualityCheck) =>
3939
scope.$watch propNameToWatch, (newValue, oldValue) =>
4040
if ! _.isEqual newValue,oldValue
4141
@onWatch(propNameToWatch, scope, newValue, oldValue)
42-
, true
42+
, !doNotEqualityCheck
4343

4444
onWatch: (propNameToWatch, scope, newValue, oldValue) =>
4545

src/coffee/directives/api/models/parent/markers-parent-model.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ angular.module("google-maps.directives.api.models.parent".ns())
2222
@doRebuildAll = newValue
2323

2424
#watch all the below properties with end up being processed by onWatch below
25-
@watch('models', scope)
25+
@watch('models', scope, attrs.modelsbyref)
2626
@watch('doCluster', scope)
2727
@watch('clusterOptions', scope)
2828
@watch('clusterEvents', scope)

0 commit comments

Comments
 (0)
0