All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.lib.setcursor.js Maven / Gradle / Ivy

The newest version!
'use strict';

// works with our CSS cursor classes (see css/_cursor.scss)
// to apply cursors to d3 single-element selections.
// omit cursor to revert to the default.
module.exports = function setCursor(el3, csr) {
    (el3.attr('class') || '').split(' ').forEach(function(cls) {
        if(cls.indexOf('cursor-') === 0) el3.classed(cls, false);
    });

    if(csr) el3.classed('cursor-' + csr, true);
};




© 2015 - 2024 Weber Informatics LLC | Privacy Policy