Search
NotifyCollectionChangingEventArgs Constructor
See Also
 






Initializes a new instance of the NotifyCollectionChangingEventArgs class.

Namespace: MindFusion.Common
File: Events.js

 Syntax

JavaScript  Copy Code

function NotifyCollectionChangingEventArgs (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 collectionChanging 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.collectionChanging.addEventListener(handleCollectionChanging);


function (handleCollectionChanging) (sender, args )
{
     if(args.action == m.NotifyCollectionChangedAction.Add)
     {
          args.cancel = true;
     }
}

 See Also