Skip to content

Commit

Permalink
fix(AgmMarkerCluster): fixes info windows
Browse files Browse the repository at this point in the history
the marker cluster needs it's own `InfoWindowManager`, otherwise
`InfoWindowManager` would be injected with the root `MarkerManager`
instead of the `ClusterManager`

fixes #1126
  • Loading branch information
jigfox authored and sebholstein committed Sep 17, 2017
1 parent f1163fd commit e547df8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/js-marker-clusterer/directives/marker-cluster.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Directive, Input, OnDestroy, OnChanges, OnInit, SimpleChange} from '@angular/core';

import {ClusterManager} from '../services/managers/cluster-manager';
import {MarkerManager} from '@agm/core';
import {MarkerManager, InfoWindowManager} from '@agm/core';

import {ClusterOptions, ClusterStyle} from '../services/google-clusterer-types';

Expand Down Expand Up @@ -34,7 +34,11 @@ import {ClusterOptions, ClusterStyle} from '../services/google-clusterer-types';
*/
@Directive({
selector: 'agm-marker-cluster',
providers: [ClusterManager, {provide: MarkerManager, useExisting: ClusterManager}]
providers: [
ClusterManager,
{provide: MarkerManager, useExisting: ClusterManager},
InfoWindowManager,
]
})
export class AgmMarkerCluster implements OnDestroy, OnChanges, OnInit, ClusterOptions {
/**
Expand Down

0 comments on commit e547df8

Please sign in to comment.