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

refactor(edgeless): add element geometry interface #7750

Merged
merged 3 commits into from
Jul 29, 2024
Merged

Conversation

doodlewind
Copy link
Member

@doodlewind doodlewind commented Jul 29, 2024

The GfxElementGeometry interface now specifies the overridable methods for GfxElements.

interface GfxElementGeometry {
  includesPoint(
    x: number,
    y: number,
    options: PointTestOptions,
    host: EditorHost
  ): boolean;
  containsBound(bound: Bound): boolean;
  intersectsBound(bound: Bound): boolean;

  getNearestPoint(point: IVec): IVec;
  getLineIntersections(start: IVec, end: IVec): PointLocation[] | null;
  getRelativePointLocation(point: IVec): PointLocation;
}
  • hitTest -> includesPoint
  • boxSelect -> intersectsBound
  • intersectWithLine -> getLineIntersections
  • ElementHitTestOptions -> PointTestOptions

Copy link

vercel bot commented Jul 29, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
blocksuite ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 29, 2024 2:12pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
blocksuite-docs ⬜️ Ignored (Inspect) Visit Preview Jul 29, 2024 2:12pm

Copy link

graphite-app bot commented Jul 29, 2024

Your org has enabled the Graphite merge queue for merging into master

Add the label “merge” to the PR and Graphite will automatically add it to the merge queue when it’s ready to merge.

You must have a Graphite account and log in to Graphite in order to use the merge queue. Sign up using this link.

@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 08:33 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 08:33 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 08:33 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 08:33 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 08:33 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 08:33 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 08:33 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 08:33 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 08:33 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 08:33 — with GitHub Actions Inactive
@doodlewind doodlewind changed the title chore(edgeless): model naming convention refactor(edgeless): add element geometry interface Jul 29, 2024
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 14:17 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 14:18 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 14:18 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 14:18 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 14:18 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 14:18 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 14:18 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 14:18 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 14:18 — with GitHub Actions Inactive
@doodlewind doodlewind temporarily deployed to Playground E2E Test July 29, 2024 14:18 — with GitHub Actions Inactive
@doodlewind doodlewind marked this pull request as ready for review July 29, 2024 14:28
@doodlewind doodlewind merged commit 3b62f7a into master Jul 29, 2024
22 checks passed
@doodlewind doodlewind deleted the doodl_naming branch July 29, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

1 participant