Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
804
Redraw the position of my webImageViewer
posted

Can I redraw the x and the y of my webImageViewer like:

objet.get_x(); OR objet.get_left(); ????

 

thx

Gabriel Deschênes

  • 4493
    Suggested Answer
    posted

    Hello Gabriel,

    What you have to do is to hook "Initialize" client side event:

    <

     

    ClientEvents Initialize="wivInit" />

    Then define your handler like this:

     

     

     

     

     

     

     

     

     

     

    function wivInit(webImageViewer, eventArgs) {
     //webImageViewer.get_element().style.position = "absolute";
       webImageViewer.get_element().style.marginLeft = "400px;
    }

    get_element() method will give you reference to the DOM element of WebImageViewer. Then you can do anything with this element's style. you can change positioning, margins, padding, left position, top position. Anything that can be changed via JS DOM reference element.

    Hope this helps.