Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

endShape prop does not work properly ArcherContainer #166

Open
pierpo opened this issue Mar 30, 2022 · 0 comments
Open

endShape prop does not work properly ArcherContainer #166

pierpo opened this issue Mar 30, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@pierpo
Copy link
Owner

pierpo commented Mar 30, 2022

The following code gives this

image

If we remove endShape=..., it gives this result instead:

image

import React from "react";
import logo from "./logo.svg";
import "./App.css";
import { ArcherContainer, ArcherElement } from "react-archer";

function App() {
  return (
    <div className="App">
      <header className="App-header">
        <ArcherContainer
          strokeColor="yellow"
          endShape={{ circle: { radius: 2 } }}
        >
          <div style={{ display: "flex" }}>
            <ArcherElement id="first">
              <div>first</div>
            </ArcherElement>
            <ArcherElement
              id="second"
              relations={[
                {
                  targetId: "first",
                  targetAnchor: "right",
                  sourceAnchor: "left"
                }
              ]}
            >
              <div style={{ marginLeft: 100 }}>second</div>
            </ArcherElement>
          </div>
        </ArcherContainer>
      </header>
    </div>
  );
}

export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant