Skip to content

Instantly share code, notes, and snippets.

@wvl
Created November 5, 2012 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wvl/4019617 to your computer and use it in GitHub Desktop.
Save wvl/4019617 to your computer and use it in GitHub Desktop.
Settable bounding box for DragDrop
diff --git a/vendor/js/drag-drop.js b/vendor/js/drag-drop.js
index d0e14de..cb43c11 100644
--- a/vendor/js/drag-drop.js
+++ b/vendor/js/drag-drop.js
@@ -162,8 +162,8 @@
var posX = startX + offsetX;
var posY = startY + offsetY;
// Enforce any bounding box
- if (options.boundingBox) {
- var box = options.boundingBox;
+ if (binding.boundingBox) {
+ var box = binding.boundingBox;
var minX, maxX, minY, maxY;
// Bound inside offset parent
if (box === 'offsetParent') {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment