Forum Discussion
HKosova
Alumni
11 years agoYou can use this function to drag an object to another object:
// JScript
// Drags the source object to the specified destination object
function DragToObject(source, destination) { var point1 = source.WindowToScreen(source.Width/2, source.Height/2); var point2 = destination.WindowToScreen(destination.Width/2, destination.Height/2); source.Drag(source.Width/2, source.Height/2, point2.X - point1.X, point2.Y - point1.Y); }
Here's a demo for the http://html5demos.com/drag page:
function DragDropTest()
{
var strUrl = "http://html5demos.com/drag";
Browsers.Item(btIExplorer).Run(strUrl);
var page = Sys.Browser().Page(strUrl);
// Drag&drop "two" into the trash bin
var item = page.FindChildByXPath("//a[@id='two']");
var trash = page.FindChildByXPath("//div[@id='bin']");
DragToObject(item, trash);
}Veroniquelu
11 years agoContributor
I found "<a title="" class="jstree-anchor jstree-clicked" href="#"><i class="jstree-icon jstree-themeicon jstree-themeicon-custom" style='background-position: center; background-image: url("/Images/treeView/icon_book_black.png"); background-size: auto;'></i>course1</a>" object
But it says it doesn't support this method..