UNPKG

sb-edit

Version:

Import, edit, and export Scratch project files

44 lines (43 loc) 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.List = exports.Variable = void 0; var id_1 = require("./util/id"); var Variable = /** @class */ (function () { function Variable(options) { this.cloud = false; this.visible = true; this.mode = "default"; this.x = 0; this.y = 0; this.sliderMin = 0; this.sliderMax = 100; this.isDiscrete = true; Object.assign(this, options); if (!options.id) { this.id = (0, id_1.generateId)(); } } Variable.prototype.setName = function (name) { this.name = name; }; return Variable; }()); exports.Variable = Variable; var List = /** @class */ (function () { function List(options) { this.visible = true; this.x = 0; this.y = 0; this.width = null; this.height = null; Object.assign(this, options); if (!options.id) { this.id = (0, id_1.generateId)(); } } List.prototype.setName = function (name) { this.name = name; }; return List; }()); exports.List = List;