function drawLayer(layerNum) {
            var tilesOnLayer, drawLayer1, zoom;

            var malakh = this.malakh,
                canvasContext = malakh.canvasContext,
                magnifier = malakh.magnifier,
                config = malakh.config,
                viewport = malakh.viewport;

            tilesOnLayer = this.tiles[layerNum];
            drawLayer1 = layerNum === 1 && config.enableMagnifier && magnifier;

            if (drawLayer1) { // magnifier level
                canvasContext.save();
                magnifier.drawPath(canvasContext);
            }
            utils.forEach(tilesOnLayer, function (tile) {
                if (drawLayer1) {
                    zoom = config.magnifierZoom;
                } else {
                    zoom = 1;
                }
                if (drawLayer1) {
                    tile.draw(zoom, magnifier.center);
                } else {
                    tile.draw(zoom, viewport.getCenter());
                }
            });
            if (drawLayer1) { // magnifier level
                magnifier.drawOnFinish(canvasContext);
                canvasContext.restore();
            }
            return this;
        }
/**
         * Draws the layer idenfified by <code>layerNum</code>.
         *
         * @param {number} layerNum
         */
Draws the layer idenfified by layerNum.
@param {number} layerNum
Draws the layer idenfified by layerNum . @param { number } layerNum
function drawLayer(layerNum) {
            var tilesOnLayer, drawLayer1, zoom;
            var malakh = this.malakh,
                canvasContext = malakh.canvasContext,
                magnifier = malakh.magnifier,
                config = malakh.config,
                viewport = malakh.viewport;
            tilesOnLayer = this.tiles[layerNum];
            drawLayer1 = layerNum === 1 && config.enableMagnifier && magnifier;
            if (drawLayer1) { 
                canvasContext.save();
                magnifier.drawPath(canvasContext);
            }
            utils.forEach(tilesOnLayer, function (tile) {
                if (drawLayer1) {
                    zoom = config.magnifierZoom;
                } else {
                    zoom = 1;
                }
                if (drawLayer1) {
                    tile.draw(zoom, magnifier.center);
                } else {
                    tile.draw(zoom, viewport.getCenter());
                }
            });
            if (drawLayer1) { 
                magnifier.drawOnFinish(canvasContext);
                canvasContext.restore();
            }
            return this;
        }
function drawLayer ( layerNum ) { var tilesOnLayer , drawLayer1 , zoom ; var malakh = this . malakh , canvasContext = malakh . canvasContext , magnifier = malakh . magnifier , config = malakh . config , viewport = malakh . viewport ; tilesOnLayer = this . tiles [ layerNum ] ; drawLayer1 = layerNum === 1 && config . enableMagnifier && magnifier ; if ( drawLayer1 ) { canvasContext . save ( ) ; magnifier . drawPath ( canvasContext ) ; } utils . forEach ( tilesOnLayer , function ( tile ) { if ( drawLayer1 ) { zoom = config . magnifierZoom ; } else { zoom = 1 ; } if ( drawLayer1 ) { tile . draw ( zoom , magnifier . center ) ; } else { tile . draw ( zoom , viewport . getCenter ( ) ) ; } } ) ; if ( drawLayer1 ) { magnifier . drawOnFinish ( canvasContext ) ; canvasContext . restore ( ) ; } return this ; }
Draws the layer idenfified by <code>layerNum</code>.
Draws the layer idenfified by <code > layerNum< / code > .
// magnifier level // magnifier level