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

Connectors without start and end items (free standing lines) #299

Open
MTRNord opened this issue Jan 15, 2025 · 2 comments
Open

Connectors without start and end items (free standing lines) #299

MTRNord opened this issue Jan 15, 2025 · 2 comments

Comments

@MTRNord
Copy link

MTRNord commented Jan 15, 2025

Hi.

I am wondering how I would get the size of a connector without start and end items. This happens if you draw a line on a frame/board.

grafik

In the api it looks like this:

{
  "shape": "straight",
  "boardId": "redacted",
  "id": "redacted",
  "createdAt": "2025-01-15T15:12:06.000Z",
  "createdBy": { "id": "redacted", "type": "user"},
  "isSupported": false,
  "links": {
    "self": "https://api.miro.com/v2/boards/uXjVLvatKbA%3D/connectors/redacted"
  },
  "modifiedAt": "2025-01-15T15:12:06.000Z",
  "modifiedBy": { "id": "redacted", "type": "user" },
  "style":  {
    "endStrokeCap": "none",
    "startStrokeCap": "none",
    "strokeColor": "#333333",
    "strokeStyle": "normal",
    "strokeWidth": "2.0"
  },
  "type": "connector"
}

Meaning there is no position info available. Is this an api bug? If so where do I file this?

@bishopwm
Copy link
Contributor

Hey @MTRNord ,

Good question. At the moment, I'm afraid it's not possible to get the position or size details of a connector via API if it doesn't have an associated start and end item (freestanding lines).

However, you may be able to get more helpful detail via our Web SDK. You can test this quick by calling the connector or selection methods from your browser console:
Screenshot 2025-01-15 at 10 58 43 AM

It's great feedback to support freestanding lines more comprehensively though, and I'm happy to share this feedback.

@MTRNord
Copy link
Author

MTRNord commented Jan 17, 2025

Hm interesting. But your example also I think is still missing the coordinates to actually position it 🤔 So its also incomplete to actually know where a line is.

Sadly for my usecase this is not a solution right now. It would be nice to have it via the API. However its not in any way urgent or anything currently as I have enough other tasks to deal with anyway :) Thanks for providing an api at all!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants