All Downloads are FREE. Search and download functionalities are using the official Maven repository.

assets.Layer.js Maven / Gradle / Ivy

There is a newer version: 1.0.0-beta3
Show newest version
/*
    This is js-side Layer definition
*/

function Layer(object) {
    this.id = parseInt(object.id);
    this.name = object.name;
    this.layerType = object.layerType;
    this.x = parseInt(object.x);
    this.y = parseInt(object.y);
    this.color = object.color;

    // text properties

    this.mainLine = object.description.mainLine;
    this.subLine = object.description.subLine;
    this.description = object.description.text;

    // now we parse connections
    this.connections = [];
    for (var i = 0; i < object.connections.length; i++) {
        var connection = new Connection(object.connections[i]);
        this.connections.push(connection);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy