moebius-web

web based ansi art editor

moebius-web

tools/clear.js


function clearTool(editor) {
    "use strict";

    function init() {
        var i;
        editor.clearUndoHistory();
        for (i = 0; i < editor.image.length; ++i) {
            editor.image[i] = 0;
        }
        editor.redraw();
        return false;
    }

    function toString() {
        return "Clear";
    }

    return {
        "init": init,
        "toString": toString,
        "uid": "clear"
    };
}

Download

raw zip tar