Created
May 26, 2011 03:57
-
-
Save rainhead/992520 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dragDelegate = new Y.DD.Delegate({ | |
cont: '#paper', | |
dragMode: 'intersect', | |
nodes: '.genre', | |
target: true | |
}); | |
dragDelegate.on('drag:afterMouseDown', function (evt) { | |
var g = this.get('currentNode'); | |
if (g.genre.get('isTemplate')) { | |
console.log("Dragging genre template"); | |
var clone = g.cloneNode(true); | |
clone.translation = g._node.transform.baseVal.getItem(0); | |
this.dd.set('dragNode', clone); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment