diff --git a/checker.go b/checker.go index 01c9566..5668760 100644 --- a/checker.go +++ b/checker.go @@ -26,6 +26,11 @@ type linearizationInfo struct { partialLinearizations [][][]int // for each partition, a set of histories (list of ids) } +func (info *linearizationInfo) AddOperations(operations []Operation) { + info.partialLinearizations = append(info.partialLinearizations, [][]int{}) + info.history = append(info.history, makeEntries(operations)) +} + type byTime []entry func (a byTime) Len() int { diff --git a/visualization/index.js b/visualization/index.js index 6988c4d..33aa938 100644 --- a/visualization/index.js +++ b/visualization/index.js @@ -329,6 +329,10 @@ function render(data) { const width = xPos[el['End']] - rx const x = rx + XOFF + PADDING const y = PADDING + el['ClientId'] * (BOX_HEIGHT + BOX_SPACE) + let rectClass = 'linearization-rect'; + if (partition['PartialLinearizations'].length === 0) { + rectClass = 'non-linearization-rect' + } rects.push( svgadd(g, 'rect', { height: BOX_HEIGHT, @@ -337,7 +341,7 @@ function render(data) { y: y, rx: HISTORY_RECT_RADIUS, ry: HISTORY_RECT_RADIUS, - class: 'history-rect', + class: rectClass, }) ) const text = svgadd(g, 'text', {