Skip to content

Instantly share code, notes, and snippets.

@sethlivingston
Last active August 29, 2015 14:06
Show Gist options
  • Save sethlivingston/09d480235cffffeb285c to your computer and use it in GitHub Desktop.
Save sethlivingston/09d480235cffffeb285c to your computer and use it in GitHub Desktop.
node.unplug(Y.DD.Drag);
node.plug(Y.Plugin.Drag);
node.dd.plug(Y.Plugin.DDConstrained, {
constrain2node: constrainNode,
tickX: gridSize,
tickY: gridSize
});
node.dd.plug(Y.Plugin.DDWinScroll);
...
node.unplug(Y.Plugin.Resize);
if (horizontalOnly) {
node.plug(Y.Plugin.Resize, {
node: node,
handles: ['l', 'r']
});
} else {
node.plug(Y.Plugin.Resize, {
node: node
});
}
node.resize.plug(Y.Plugin.ResizeConstrained, {
constrain: constrainNode,
tickX: gridSize,
tickY: gridSize,
minWidth: 10,
minHeight: 10
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment