27 lines
376 B
JavaScript
27 lines
376 B
JavaScript
|
"use strict";
|
||
|
|
||
|
class AbstractUIItem {
|
||
|
constructor(el, def) {
|
||
|
this.el = el;
|
||
|
this.def = def;
|
||
|
|
||
|
this.known_tables = new Map();
|
||
|
|
||
|
this.verbose = false;
|
||
|
}
|
||
|
|
||
|
clear() {
|
||
|
this.known_tables.clear();
|
||
|
}
|
||
|
|
||
|
append(peer, table) {
|
||
|
if(this.verbose) {
|
||
|
console.log(table_data);
|
||
|
}
|
||
|
|
||
|
this.known_tables.set(peer.id, { peer, table });
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default AbstractUIItem;
|