diff --git a/src/components/CustomColumn.jsx b/src/components/CustomColumn.jsx index c8d5da3..02aa7e5 100644 --- a/src/components/CustomColumn.jsx +++ b/src/components/CustomColumn.jsx @@ -1,4 +1,5 @@ import {Display} from './Display' +import RigMnemo from '../components/RigMnemo' export const CustomColumn = ({data}) => { const dataLast = data[data.length -1] @@ -17,10 +18,13 @@ export const CustomColumn = ({data}) => { lines.forEach(line => line.value = '-' ) return (<> - {lines.map(line => )} + {lines.map(line => )} + ) } \ No newline at end of file diff --git a/src/components/RigMnemo.jsx b/src/components/RigMnemo.jsx new file mode 100644 index 0000000..3a9a58f --- /dev/null +++ b/src/components/RigMnemo.jsx @@ -0,0 +1,184 @@ +const styleBase = { + stroke: "none", + strokeLinecap: "butt", + strokeLinejoin: "miter", +} + +const styleCasing = { + ...styleBase, + fill: "#808080", +}; +const styleGround = { + ...styleBase, + fill: "#deaa87", +}; + +const styleTower = { + ...styleBase, + fill: "#999999", +}; + +const styleWell = { + ...styleBase, + fill: "#37abc8", +}; + +const styleBitDrive = { + ...styleBase, + fill: "#ff8080", +}; + +const styleBitTool = { + ...styleBase, + fill: "#f9f9f9", +}; + +const styleBlock = { + ...styleBase, + fill: "#ffdd55", +}; + +const stylePump1 = { + ...styleBase, + fill: "#5fd35f", +}; + +const stylePump2 = { + ...styleBase, + fill: "#b3b3b3", +}; + +export default function RigMnemo({ + blockPosition, + bitPosition, +}) { + + let blockPositionLocal = +blockPosition + blockPositionLocal = blockPositionLocal ? blockPositionLocal : 0 + const blockTranslate = `translate(-75, ${-35 + (50 * (30 - blockPositionLocal) / 30)})` + + let bitPositionLocal = +bitPosition + bitPositionLocal = bitPositionLocal ? bitPositionLocal : 0 + //const bitTranslate = `translate(0, ${-41 + 41 * (3426 - bitPosition)/(3426 - 3200)})` + const bitTranslate = `translate(0, 0)` + + return ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}