Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

mcongrove/TiDrop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Demo

http://screencast.com/t/uQO2t5Lg6

Example

Ti.include("TiDrop.js");

var tabGroup = Ti.UI.createTabGroup();

var window = Ti.UI.createWindow({  
    title: "Drag + Drop",
    backgroundColor: "#FFF"
});

var tab = Ti.UI.createTab({  
    title: "Drag + Drop",
    window: window
});

var box1 = Ti.UI.createView({
	width: 100,
	height: 100,
	top: 10,
	left: 10,
	backgroundColor: "#7A0000"
});

var box2 = Ti.UI.createView({
	width: 100,
	height: 100,
	top: 10,
	left: 120,
	backgroundColor: "#007A00"
});

var container1 = Ti.UI.createView({
	width: 300,
	height: 120,
	top: 237,
	left: 10,
	backgroundColor: "#CCC",
	items: 0
});

function yay(e) {
	if(e.contained) {
		e.source.top = 247;
		e.source.left = 20;
	}
}

TiDrop.init(box1, container1, yay);
TiDrop.init(box2, container1, yay);

window.add(container1);
window.add(box1);
window.add(box2);

tabGroup.addTab(tab);  
tabGroup.open();

About

Please do not use: this is out-dated

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published