LEADTOOLS JavaScript (Leadtools.Annotations.Automation)
LEAD Technologies, Inc

Edit Event

Example 
Occurs when an AnnObject is being edited.
Syntax
add_edit(function(sender, e))
remove_edit(function(sender, e))

Remarks

When an object is being edited, the automation object will hook the object edit designer's AnnEditDesigner.Edit to this event. Therefore, instead of hooking and unhooking to the various designers edit events, you can simply subscribe to this event once.

Example

This example will show how to track when an object is edited.

Start with the AnnAutomationManager example, remove all the code inside the example function (search for the // TODO: add example code here comment) and insert the following code:

Click the example button. Now whenever you move or resize an object, you will get the message.

example: function SiteLibrary_DefaultPage$example() {
   var _this = this;
   // Hook to the automation's Edit event
   this._automation.add_edit(function(sender, e) {
      // e is of type AnnEditDesignerEventArgs

      if(e.get_operationStatus() == Leadtools.Annotations.Core.AnnDesignerOperationStatus.end) {
         alert("Object changed...");
      }
   });
},
Event Data
Parameter Type Description
sender 'var' The source of the event.
e AnnEditDesignerEventArgs The event data.
See Also

Reference

AnnAutomation Object
AnnAutomation Members

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.