From ed9eb33b2225e47602d4d606944f0375856ae316 Mon Sep 17 00:00:00 2001 From: "Luis A. Leiva" Date: Sun, 8 Nov 2015 23:57:40 +0100 Subject: [PATCH] Added `cssCursors` option --- jquery.sketchable.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/jquery.sketchable.js b/jquery.sketchable.js index 392ed6d..652a56f 100644 --- a/jquery.sketchable.js +++ b/jquery.sketchable.js @@ -49,6 +49,10 @@ // Fix Chrome "bug". this.onselectstart = function(){ return false }; } + if (options.cssCursors) { + // Visually indicate whether this element is interactive or not. + elem[0].style.cursor = options.interactive ? "pointer" : "not-allowed"; + } } var sketch = new jSketch(this, options.graphics); // Reconfigure element data. @@ -230,6 +234,7 @@ * mouseupMovements: false, * relTimestamps: false, * multitouch: true, + * cssCursors: true, * events: { * init: function(elem, data){ }, * clear: function(elem, data){ }, @@ -259,6 +264,8 @@ relTimestamps: false, // Enable multitouch drawing. multitouch: true, + // Display CSS cursors, mainly to indicate whether the element is interactive or not. + cssCursors: true, // Event callbacks. events: { // init: function(elem, data){ },