Search
NotifyCollectionChangedEventArgs Constructor
See Also
 






Initializes a new instance of the NotifyCollectionChangedEventArgs class.

Namespace: MindFusion.Common
File: Events.js

 Syntax

JavaScript  Copy Code

function NotifyCollectionChangedEventArgs (action, [changes, [index]])

 Parameters

action

NotifyCollectionChangedAction. The action that caused the event.

changes
Optional.

Array. The items affected by the change.

index
Optional.

Number. The index where the change occurred.

 Example

The following code handles the collectionChanged event of the decorations property of a DecorationLayer object in a Map.

JavaScript  Copy Code

var m = MindFusion.Mapping;

var markers = new m.DecorationLayer("Images");

...................
//add some Marker-s to the decorations property
......................

markers.decorations.collectionChanged.addEventListener(handleCollectionChanged);


function (handleCollectionChanged) (sender, args )
{
     if(args.newItems.contains(mark))
     {
          //do something
     }
}

 See Also