-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: connection highlighter interface (#7638)
* feat: add connection highlighter interface * fix: remove unnecessary method from the path object interface
- Loading branch information
Showing
3 changed files
with
28 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* @license | ||
* Copyright 2023 Google LLC | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
import type {RenderedConnection} from '../rendered_connection'; | ||
|
||
/** | ||
* Visually highlights connections, usually to preview where a block will be | ||
* connected if it is dropped. | ||
* | ||
* Often implemented by IPathObject classes. | ||
*/ | ||
export interface IConnectionHighlighter { | ||
/** Visually highlights the given connection. */ | ||
highlightConnection(conn: RenderedConnection): void; | ||
|
||
/** Visually unhighlights the given connnection (if it was highlighted). */ | ||
unhighlightConnection(conn: RenderedConnection): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters