src/extensions/default/CodeFolding/main.js
function setupGutterEventListeners(editor) {
        var cm = editor._codeMirror;
        $(editor.getRootElement()).addClass("folding-enabled");
        cm.setOption("foldGutter", {onGutterClick: onGutterClick});

        $(cm.getGutterElement()).on({
            mouseenter: function () {
                if (prefs.getSetting("hideUntilMouseover")) {
                    foldGutter.updateInViewport(cm);
                } else {
                    $(editor.getRootElement()).addClass("over-gutter");
                }
            },
            mouseleave: function () {
                if (prefs.getSetting("hideUntilMouseover")) {
                    clearGutter(editor);
                } else {
                    $(editor.getRootElement()).removeClass("over-gutter");
                }
            }
        });
    }
function setupGutterEventListeners(editor) {
        var cm = editor._codeMirror;
        $(editor.getRootElement()).addClass("folding-enabled");
        cm.setOption("foldGutter", {onGutterClick: onGutterClick});

        $(cm.getGutterElement()).on({
            mouseenter: function () {
                if (prefs.getSetting("hideUntilMouseover")) {
                    foldGutter.updateInViewport(cm);
                } else {
                    $(editor.getRootElement()).addClass("over-gutter");
                }
            },
            mouseleave: function () {
                if (prefs.getSetting("hideUntilMouseover")) {
                    clearGutter(editor);
                } else {
                    $(editor.getRootElement()).removeClass("over-gutter");
                }
            }
        });
    }
function setupGutterEventListeners ( editor ) { var cm = editor . _codeMirror ; $ ( editor . getRootElement ( ) ) . addClass ( "folding-enabled" ) ; cm . setOption ( "foldGutter" , { onGutterClick : onGutterClick } ) ; $ ( cm . getGutterElement ( ) ) . on ( { mouseenter : function ( ) { if ( prefs . getSetting ( "hideUntilMouseover" ) ) { foldGutter . updateInViewport ( cm ) ; } else { $ ( editor . getRootElement ( ) ) . addClass ( "over-gutter" ) ; } } , mouseleave : function ( ) { if ( prefs . getSetting ( "hideUntilMouseover" ) ) { clearGutter ( editor ) ; } else { $ ( editor . getRootElement ( ) ) . removeClass ( "over-gutter" ) ; } } } ) ; }
Renders and sets up event listeners the code-folding gutter.
@param {Editor} editor the editor on which to initialise the fold gutter
Renders and sets up event listeners the code - folding gutter .