MindFusion.Charting for JavaScript Programmer's Guide
NotifyCollectionChangedEventArgs.action Property
See Also
 






Gets the action that caused the event.

Namespace: MindFusion.Common
File: Events.js

 Syntax

JavaScript  Copy Code

get action() {}

 Property Value

One of the NotifyCollectionChangedAction enumeration values. The action that caused the event.

 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.action === NotifyCollectionChangedAction.Add)
     {
          //do something
     }
}

 See Also

NotifyCollectionChangedEventArgs Members
NotifyCollectionChangedEventArgs Class
MindFusion.Common Namespace