dist/jcanvas.js
function _enableDrag($canvas, data, layer) {
	var dragHelperEvents, eventName, i;
	// Only make layer draggable if necessary
	if (layer.draggable || layer.cursors) {

		// Organize helper events which enable drag support
		dragHelperEvents = ['mousedown', 'mousemove', 'mouseup'];

		// Bind each helper event to the canvas
		for (i = 0; i < dragHelperEvents.length; i += 1) {
			// Use touch events if appropriate
			eventName = dragHelperEvents[i];
			// Bind event
			_addLayerEvent($canvas, data, layer, eventName);
		}
		// Indicate that this layer has events bound to it
		layer._event = true;

	}
}
function _enableDrag($canvas, data, layer) {
	var dragHelperEvents, eventName, i;
	// Only make layer draggable if necessary
	if (layer.draggable || layer.cursors) {

		// Organize helper events which enable drag support
		dragHelperEvents = ['mousedown', 'mousemove', 'mouseup'];

		// Bind each helper event to the canvas
		for (i = 0; i < dragHelperEvents.length; i += 1) {
			// Use touch events if appropriate
			eventName = dragHelperEvents[i];
			// Bind event
			_addLayerEvent($canvas, data, layer, eventName);
		}
		// Indicate that this layer has events bound to it
		layer._event = true;

	}
}
function _enableDrag ( $canvas , data , layer ) { var dragHelperEvents , eventName , i ; // Only make layer draggable if necessary if ( layer . draggable || layer . cursors ) { // Organize helper events which enable drag support dragHelperEvents = [ 'mousedown' , 'mousemove' , 'mouseup' ] ; // Bind each helper event to the canvas for ( i = 0 ; i < dragHelperEvents . length ; i += 1 ) { // Use touch events if appropriate eventName = dragHelperEvents [ i ] ; // Bind event _addLayerEvent ( $canvas , data , layer , eventName ) ; } // Indicate that this layer has events bound to it layer . _event = true ; } }
Enable drag support for this layer
Enable drag support for this layer