mirror of https://github.com/luileito/jsketch.git
Fixed select bug
This commit is contained in:
parent
f645ced6da
commit
eae7c86da5
|
|
@ -411,12 +411,14 @@
|
||||||
*/
|
*/
|
||||||
function postProcess(elem, options) {
|
function postProcess(elem, options) {
|
||||||
if (!options) options = elem.data(namespace).options;
|
if (!options) options = elem.data(namespace).options;
|
||||||
|
|
||||||
|
var domEl = elem.get(0);
|
||||||
if (options.cssCursors) {
|
if (options.cssCursors) {
|
||||||
// Visually indicate whether this element is interactive or not.
|
// Visually indicate whether this element is interactive or not.
|
||||||
elem[0].style.cursor = options.interactive ? 'pointer' : 'not-allowed';
|
domEl.style.cursor = options.interactive ? 'pointer' : 'not-allowed';
|
||||||
}
|
}
|
||||||
// Fix unwanted highlight "bug". Note: `this` is the actual DOM element.
|
// Fix unwanted highlight "bug".
|
||||||
this.onselectstart = function() {
|
domEl.onselectstart = function() {
|
||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue