diff options
| author | ab <abdullah_ahmed@brown.edu> | 2019-05-21 16:37:41 -0400 |
|---|---|---|
| committer | ab <abdullah_ahmed@brown.edu> | 2019-05-21 16:37:41 -0400 |
| commit | 33c29d0e58c1b083e72df7e7fd81bb130f46bd2a (patch) | |
| tree | f87bd33e2d98ce2752abec9d189de0de5161fddb /src/client/northstar | |
| parent | b3f1e5f60ee4a00522d3e4b0b03495685bde006c (diff) | |
| parent | 7e5ba95b02e4ead3ee2b41eca1af0acb72d6f7cd (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into cont_menu_ui
Diffstat (limited to 'src/client/northstar')
| -rw-r--r-- | src/client/northstar/dash-fields/HistogramField.ts | 2 | ||||
| -rw-r--r-- | src/client/northstar/dash-nodes/HistogramBox.tsx | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/src/client/northstar/dash-fields/HistogramField.ts b/src/client/northstar/dash-fields/HistogramField.ts index 31040a474..e6f32272e 100644 --- a/src/client/northstar/dash-fields/HistogramField.ts +++ b/src/client/northstar/dash-fields/HistogramField.ts @@ -58,6 +58,6 @@ export class HistogramField extends ObjectField { } [ToScriptString]() { - return "invalid"; + return this.toString(); } }
\ No newline at end of file diff --git a/src/client/northstar/dash-nodes/HistogramBox.tsx b/src/client/northstar/dash-nodes/HistogramBox.tsx index a9646ed31..d7732ee86 100644 --- a/src/client/northstar/dash-nodes/HistogramBox.tsx +++ b/src/client/northstar/dash-nodes/HistogramBox.tsx @@ -125,9 +125,11 @@ export class HistogramBox extends React.Component<FieldViewProps> { let mapped = brushingDocs.map((brush, i) => { brush.backgroundColor = StyleConstants.BRUSH_COLORS[i % StyleConstants.BRUSH_COLORS.length]; let brushed = DocListCast(brush.brushingDocs); + if (!brushed.length) + return null; return { l: brush, b: brushed[0][Id] === proto[Id] ? brushed[1] : brushed[0] }; }); - this.HistoOp.BrushLinks.splice(0, this.HistoOp.BrushLinks.length, ...mapped); + runInAction(() => this.HistoOp.BrushLinks.splice(0, this.HistoOp.BrushLinks.length, ...mapped.filter(m => m) as { l: Doc, b: Doc }[])); } }, { fireImmediately: true }); reaction(() => this.createOperationParamsCache, () => this.HistoOp.Update(), { fireImmediately: true }); |
