44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
(function (factory) {
|
|
if (typeof module === "object" && typeof module.exports === "object") {
|
|
var v = factory(require, exports);
|
|
if (v !== undefined) module.exports = v;
|
|
}
|
|
else if (typeof define === "function" && define.amd) {
|
|
define(["require", "exports", "./GrabLinks"], factory);
|
|
}
|
|
})(function (require, exports) {
|
|
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Grab = void 0;
|
|
const GrabLinks_1 = require("./GrabLinks");
|
|
class Grab {
|
|
constructor() {
|
|
this.distance = 100;
|
|
this.links = new GrabLinks_1.GrabLinks();
|
|
}
|
|
get lineLinked() {
|
|
return this.links;
|
|
}
|
|
set lineLinked(value) {
|
|
this.links = value;
|
|
}
|
|
get line_linked() {
|
|
return this.links;
|
|
}
|
|
set line_linked(value) {
|
|
this.links = value;
|
|
}
|
|
load(data) {
|
|
var _a, _b;
|
|
if (!data) {
|
|
return;
|
|
}
|
|
if (data.distance !== undefined) {
|
|
this.distance = data.distance;
|
|
}
|
|
this.links.load((_b = (_a = data.links) !== null && _a !== void 0 ? _a : data.lineLinked) !== null && _b !== void 0 ? _b : data.line_linked);
|
|
}
|
|
}
|
|
exports.Grab = Grab;
|
|
});
|