Commits

Chris Leonello committed e48a114

Fixed cursor plugin so it will used the cursor specified in the user options.
Dragable plugin will change the cursor to "move" while dragging.

  • Participants
  • Parent commits e5dbd57

Comments (0)

Files changed (2)

File src/plugins/jqplot.cursor.js

 	
 	function handleMouseEnter(ev, gridpos, datapos, neighbors, plot) {
 	    //ev.target.style.cursor = "url('"+$.jqplot.pluginsPath+"/"+plot.cursor.imagePath+"/crosscursor.png'), crosshair";
-	    ev.target.style.cursor = "crosshair";
+	    ev.target.style.cursor = plot.cursor.style;
 	};
 	
 	function handleMouseLeave(ev, gridpos, datapos, neighbors, plot) {

File src/plugins/jqplot.dragable.js

         mr.lineWidth = smr.lineWidth + 2.5;
         mr.size = smr.size + 5;
         var rgba = $.jqplot.getColorComponents(smr.color);
-        var alpha = rgba[3] - 0.4;
+        var alpha = rgba[3] - 0.5;
         var color = 'rgba('+rgba[0]+','+rgba[1]+','+rgba[2]+','+alpha+')';
         drag.color = color;
         mr.color = color;
 	
 	function handleDown(ev, gridpos, datapos, neighbor, plot) {
 	    var dc = plot.dragCanvas;
+	    dc._cursor = ev.target.style.cursor;
 	    if (neighbor != null) {
 	        var s = plot.series[neighbor.seriesIndex];
 	        var drag = s.dragable;
     	        dc.isDragging = true;
     	        initDragPoint(plot, neighbor);
     	        drag.markerRenderer.draw(s.gridData[neighbor.pointIndex][0], s.gridData[neighbor.pointIndex][1], dc._ctx);
+    	        ev.target.style.cursor = "move";
             }
 	    }
 	    // Just in case of a hickup, we'll clear the drag canvas and reset.
             s.data[dp.pointIndex] = [x,y];
             plot.drawSeries(plot.seriesCanvas._ctx, {preventJqPlotSeriesDrawTrigger:true});
 	        dc._neighbor = null;
+	        ev.target.style.cursor = dc._cursor;
 	    }
 	};