Hi, I am evaluating the demo and I am trying to realize one of my client's ideas. Dynamically creating docs by dragging images from a palette down to the dock zone.
I am using your dynamic dock example and a hidden Dock when you drop the hidden dock I do not dock that one but instead create the appropriate dock in server code.
I use the code below to move the hidden dock to the handle object. Unfortunately this breaks as soon as I start dragging, obviously because the position is not updated from the current setting of clientHeight and Width but rather from the original position of the dock at the time of the mouseDown. Is there a smart way to get past this. I actually think my clients idea is quite smart, to have a number of code blocks that is used as templates that you can drag new docks from. I am very impressed with the Telerik suite, to solve this would just be the icing of the cake for my presentation :)
/Magnus
I am using your dynamic dock example and a hidden Dock when you drop the hidden dock I do not dock that one but instead create the appropriate dock in server code.
I use the code below to move the hidden dock to the handle object. Unfortunately this breaks as soon as I start dragging, obviously because the position is not updated from the current setting of clientHeight and Width but rather from the original position of the dock at the time of the mouseDown. Is there a smart way to get past this. I actually think my clients idea is quite smart, to have a number of code blocks that is used as templates that you can drag new docks from. I am very impressed with the Telerik suite, to solve this would just be the icing of the cake for my presentation :)
/Magnus
var obj = document.getElementById("Handle_" + dock.get_id()); |
var output = new Object(); |
var mytop = 0, myleft = 0; |
output.width = obj.clientWidth; |
output.height = obj.clientHeight; |
while (obj) { |
mytop += obj.offsetTop; |
myleft += obj.offsetLeft; |
obj = obj.offsetParent; |
} |
output.left = myleft; |
output.top = mytop; |
dock.set_top(output.top); |
dock.set_left(output.left); |
dock.set_width(output.width); |
dock.set_height(output.height); |