UNPKG

@chix/flow

Version:
44 lines 1.69 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); Object.defineProperty(exports, "__esModule", { value: true }); var common_1 = require("../common"); var flow_1 = require("../events/flow"); var util_1 = require("../util"); var node_1 = require("./node"); function $MetaNode(Base) { return (function (_super) { __extends(MetaNode$, _super); function MetaNode$() { return _super !== null && _super.apply(this, arguments) || this; } MetaNode$.prototype.setMeta = function (nodeId, key, value) { var node = this.getNode(nodeId); node.setMeta(key, value); this.event(flow_1.FlowEvents.METADATA, { id: this.id, node: node.export(), }); }; return MetaNode$; }(Base)); } exports.$MetaNode = $MetaNode; (function ($MetaNode) { function create(Base) { return util_1.mixin($MetaNode, common_1.$Event.create, common_1.$Identity.create, node_1.$Node.create)(Base); } $MetaNode.create = create; })($MetaNode = exports.$MetaNode || (exports.$MetaNode = {})); //# sourceMappingURL=meta.js.map