| 8527 | const LegendView = (props)=>{ |
| 8528 | const rows = []; |
| 8529 | const addRow = (row, i)=>{ |
| 8530 | const fn = symbolMap[row.symbol.shape]; |
| 8531 | let jsx; |
| 8532 | if (fn) jsx = fn(row.symbol); |
| 8533 | else jsx = (0, _tsxCreateElement.createElement)("span", null, "x"); |
| 8534 | rows.push({ |
| 8535 | cells: [ |
| 8536 | { |
| 8537 | className: "symbol", |
| 8538 | content: jsx |
| 8539 | }, |
| 8540 | { |
| 8541 | className: "label", |
| 8542 | content: row.label, |
| 8543 | title: row.label |
| 8544 | } |
| 8545 | ] |
| 8546 | }); |
| 8547 | }; |
| 8548 | var sorted = Object.keys(props.legend.rows).sort((a, b)=>+a - +b); |
| 8549 | sorted.forEach((i)=>addRow(props.legend.rows[i], +i)); |
| 8550 | if (sorted.length) return (0, _tsxCreateElement.createElement)((0, _controls.Table), { |