Add clear chart button and improve chart menu look&feel
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
interface Lengthwise {
|
||||
export interface MemoryConsumptionExpressedByLength {
|
||||
length: number
|
||||
}
|
||||
|
||||
export class RingBuffer<T extends Lengthwise> {
|
||||
private capacity: number
|
||||
private maxItems: number
|
||||
export class RingBuffer<T extends MemoryConsumptionExpressedByLength> {
|
||||
public capacity: number
|
||||
public maxItems: number
|
||||
public compactionFactor: number
|
||||
protected items: Array<T> = []
|
||||
protected start: number = 0
|
||||
protected end: number = 0
|
||||
private usage: number = 0
|
||||
private items: Array<T> = []
|
||||
private start: number = 0
|
||||
private end: number = 0
|
||||
private compactionFactor: number
|
||||
|
||||
constructor(capacity: number, maxItems = Infinity, compactionFactor: number = 10, ringBuffer?: RingBuffer<T>) {
|
||||
this.capacity = capacity
|
||||
|
||||
@@ -52,10 +52,6 @@ export class TreeNode<ViewModel extends Destroyable> {
|
||||
return this.sourceEdge ? this.sourceEdge.source || undefined : undefined
|
||||
}
|
||||
|
||||
public hasMessage() {
|
||||
return this.message && this.message.value && this.message.value.length !== 0
|
||||
}
|
||||
|
||||
private isTopicEmptyLeaf() {
|
||||
return !this.hasMessage() && this.isLeaf()
|
||||
}
|
||||
@@ -108,6 +104,10 @@ export class TreeNode<ViewModel extends Destroyable> {
|
||||
}
|
||||
}
|
||||
|
||||
public hasMessage() {
|
||||
return this.message && this.message.value && this.message.value.length !== 0
|
||||
}
|
||||
|
||||
public destroy() {
|
||||
this.onDestroy.dispatch(this)
|
||||
this.onDestroy.removeAllListeners()
|
||||
|
||||
Reference in New Issue
Block a user