diff --git a/src/js/components/ImageEditor/DragHandle.js b/src/js/components/ImageEditor/DragHandle.js index 03d1120..740823a 100644 --- a/src/js/components/ImageEditor/DragHandle.js +++ b/src/js/components/ImageEditor/DragHandle.js @@ -17,7 +17,7 @@ var DragHandle = function (handler) { mouseUp: function () { if (!_moved && _currentAxis) { - $(document).trigger('PIE:dragbar-click', _currentAxis); + $(document).trigger('PIE:dragbar-click', { axis: _currentAxis }); } _dragging = false; diff --git a/src/js/init.js b/src/js/init.js index 75b7688..12ae401 100644 --- a/src/js/init.js +++ b/src/js/init.js @@ -70,14 +70,14 @@ $input.mirror.on('change', Event.Mirror); $input.noCrop.on('change', Event.NoCrop); $input.border.on('change', Event.SetBorder); - $document.on('PIE:dragged', function() { - console.log('Dragged the image/dragbar!'); - }); - $document.on('PIE:needs-dragging', function() { - console.log('Image needs dragging!'); - }); - $document.on('PIE:dragbar-click', function(e, axis) { - - console.log('Clicked on a dragbar! Axis: ' + axis); - }); + $document + .on('PIE:dragged', function() { + console.log('Dragged the image/dragbar!'); + }) + .on('PIE:needs-dragging', function(e, data) { + console.log('Image needs dragging on: ' + data.axis); + }) + .on('PIE:dragbar-click', function(e, data) { + console.log('Clicked on a dragbar! Axis: ' + data.axis); + }); }());