This is a migrated thread and some comments may be shown as answers.

[Solved] Getting Position using client api

1 Answer 91 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Andrei
Top achievements
Rank 1
Andrei asked on 04 Feb 2008, 02:12 AM
Hi guys,

I used to have a custom links using treeview.

I am using something like this

var toolIcon = oTool.GetIcon();  
 
treeDiv.style.top = (GetY(toolIcon) + 25) + "px"; 
treeDiv.style.left = (GetX(toolIcon) + 1) + "px"; 
 
function GetX(obj) 
    {  
        var curleft = 0;  
     
        if (obj.offsetParent)  
        {  
            while (obj.offsetParent)  
            {  
                curleft += obj.offsetLeft;  
                objobj = obj.offsetParent;  
            }  
        } 
        else if (obj.x)  
        { 
            curleft += obj.x;  
        } 
        return curleft;  
    } 
 
      
    function GetY(obj) 
    {  
        var curtop = 0;  
         
        if (obj.offsetParent)  
        {  
            while (obj.offsetParent)  
            {  
                curtop += obj.offsetTop;  
                objobj = obj.offsetParent;  
            }  
        }  
        else if (obj.y)  
        { 
            curtop += obj.y;  
             
        } 
        return curtop;  
    } 
 
 

to get the position.

How do I do this with the new editor?

It is very difficult to find all the client api functions available in rad editor. It would be great if I can find all the client api function related to editor in one place and can see the example by clicking them. It is very difficult to get the function that I need in online documentation!

Cheers,
Bardia

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 06 Feb 2008, 01:29 PM
Hi Bardia,

You can find attached the requested RadTreeView in custom RadEditor "Prometheus" example. Please, test it and let me know how it works.

Thank you for your feedback about the client-side API help section. I will add such a topic at the top of the Client-Side API section of RadEditor "Prometheus" help.


Kind regards,
Rumen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Editor
Asked by
Andrei
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or