Skip to content

Instantly share code, notes, and snippets.

@tilomitra
Created September 6, 2013 17:07
Show Gist options
  • Save tilomitra/6466710 to your computer and use it in GitHub Desktop.
Save tilomitra/6466710 to your computer and use it in GitHub Desktop.
Repro case for https://github.com/yui/yui3/issues/1147. This file should be run as a test HTML file inside `yui3/src/event-gestures/tests/manual/`
<!doctype html>
<html>
<head>
<title>Repro case for #1147</title>
<style>
#demo {
width: 200px;
}
#demo ul li {
border: 1px solid black;
background-color: #8DD5E7;
cursor: move;
margin: 3px;
list-style-type: none;
}
</style>
</head>
<body>
<div id="demo">
<ul>
<li>Item #1</li>
<li>Item #2</li>
<li>Item #3</li>
<li>Item #4</li>
<li>Item #5</li>
<li>Item #6</li>
<li>Item #7</li>
<li>Item #8</li>
<li>Item #9</li>
<li>Item #10</li>
</ul>
</div>
<script src="http://yui.yahooapis.com/3.12.0/build/yui/yui-min.js"></script>
<!-- <script src="../../../../build/yui/yui.js"></script> -->
<script>
YUI().use('dd-delegate', function(Y) {
var del = new Y.DD.Delegate({
container: '#demo',
nodes: 'li'
});
del.on('drag:mouseDown', function (e) {
console.log("drag:mouseDown");
console.log(e);
});
del.on('drag:end', function (e) {
console.log("drag:end");
console.log(e);
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment