src/drawer.js
function() {
        this.canvas.innerHTML = "";
        if ( this.useCanvas ) {
            var viewportSize = this._calculateCanvasSize();
            if( this.canvas.width != viewportSize.x ||
                this.canvas.height != viewportSize.y ) {
                this.canvas.width = viewportSize.x;
                this.canvas.height = viewportSize.y;
                this._updateImageSmoothingEnabled(this.context);
                if ( this.sketchCanvas !== null ) {
                    var sketchCanvasSize = this._calculateSketchCanvasSize();
                    this.sketchCanvas.width = sketchCanvasSize.x;
                    this.sketchCanvas.height = sketchCanvasSize.y;
                    this._updateImageSmoothingEnabled(this.sketchContext);
                }
            }
            this._clear();
        }
    }
function() {
        this.canvas.innerHTML = "";
        if ( this.useCanvas ) {
            var viewportSize = this._calculateCanvasSize();
            if( this.canvas.width != viewportSize.x ||
                this.canvas.height != viewportSize.y ) {
                this.canvas.width = viewportSize.x;
                this.canvas.height = viewportSize.y;
                this._updateImageSmoothingEnabled(this.context);
                if ( this.sketchCanvas !== null ) {
                    var sketchCanvasSize = this._calculateSketchCanvasSize();
                    this.sketchCanvas.width = sketchCanvasSize.x;
                    this.sketchCanvas.height = sketchCanvasSize.y;
                    this._updateImageSmoothingEnabled(this.sketchContext);
                }
            }
            this._clear();
        }
    }
function ( ) { this . canvas . innerHTML = "" ; if ( this . useCanvas ) { var viewportSize = this . _calculateCanvasSize ( ) ; if ( this . canvas . width != viewportSize . x || this . canvas . height != viewportSize . y ) { this . canvas . width = viewportSize . x ; this . canvas . height = viewportSize . y ; this . _updateImageSmoothingEnabled ( this . context ) ; if ( this . sketchCanvas !== null ) { var sketchCanvasSize = this . _calculateSketchCanvasSize ( ) ; this . sketchCanvas . width = sketchCanvasSize . x ; this . sketchCanvas . height = sketchCanvasSize . y ; this . _updateImageSmoothingEnabled ( this . sketchContext ) ; } } this . _clear ( ) ; } }
Clears the Drawer so it's ready to draw another frame.
Clears the Drawer so it s ready to draw another frame .