Atalasoft
Welcome to Atalasoft Community Sign in | Join | Help
in

anotation id for javascript

Last post 01 Jun 2007, 10:08 AM by David Cilley. 3 replies.
Sort Posts: Previous Next
  •  31 May 2007, 2:47 AM 12118

    anotation id for javascript

    Hi,

    I'm looking for a way to identify each annotation in javascript.

    I want to be able to pass the name of an annotation item or some identifier that I can get a hold of on the server. That way when I do something to the annotaion.layer.item I can know which one to affect.

    The javascript I have is

    function OnAnnotationClicked(e)

    {

     

    WebImageViewer1.RemoteInvoke('SetActiveAnnotation', new Array("stringValue"));

    }

    e.annotation is a valid object but is there some sort of e.annotation.name or e.annotation.id or WebImageViewer1 item number for the annotation item?

    Cheers

  •  31 May 2007, 9:39 AM 12120 in reply to 12118

    Re: anotation id for javascript

    Unfortunately there is no way to identify annotations by ID or Name on the client side.  These are only accessible on the server side.

    For a detailed list of available JavaScript properties, you can use this reference:
    http://www.atalasoft.com/products/dotimage/docs/Client%20Scripting%20in%20ASP.NET.html

    Tha atalaAnnotation object is returned by e.annotation.


    David Cilley
    My AJAX Imaging Blog
    Atalasoft Development Team
  •  31 May 2007, 9:54 PM 12122 in reply to 12120

    Re: anotation id for javascript

    Actually I found that I can use the getZIndex() to identify which annotation I'm using.

    So now I have a method that gets the server to store which annotation gets clicked on.

    WebImageViewer1.RemoteInvoke('SetActiveAnnotation', new Array(e.annotation.getParent().getLayerIndex(), e.annotation.getZIndex()));

     

    Thanks though.

  •  01 Jun 2007, 10:08 AM 12130 in reply to 12122

    Re: anotation id for javascript

    You can do this, but if you reorder any of the annotations by using Insert or Remove, the ZIndex could be changed.
    David Cilley
    My AJAX Imaging Blog
    Atalasoft Development Team
View as RSS news feed in XML