ImageViewerState.js 523 Bytes
Newer Older
Alexander Bazo committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/* eslint-env node */

const schema = require("@colyseus/schema"),
    Logger = require("../utils/Logger.js"),
    Task = require("./Task"),
    Schema = schema.Schema;

var currentCallback;

class ImageViewerState extends Schema {

    constructor() {
        super();
        this.task = null;
    }

Alexander Bazo committed
17
    setTask(task) {
Alexander Bazo committed
18 19 20 21 22 23 24 25 26 27 28 29 30
        this.task = task;  
    }

}

schema.defineTypes(ImageViewerState, {
    stateType: "string",
    width: "number",
    height: "number",
    task: Task,
});

module.exports = ImageViewerState;