Skip to content

Strange code in layout.js #2

@dev-tim

Description

@dev-tim

Hi! What does this code mean in tryToFitTile in layout.js file ?

function tryToFitTile(tile) {
        return function (tileSelection) {
            if (tileSelection.some(placedTile)) {
                return false;
            } else {
                                //this one does nothing.
                tileSelection.map(function () {
                    return tile;
                });
                               // ends here
                tile.position = { x: tileSelection.col.start, y: tileSelection.row.start };
                return true;
            }
        };
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions