Skip to content

Commit

Permalink
feat(core): add actions to editor settings (#8030)
Browse files Browse the repository at this point in the history
# What Changed?
- Add actions of following edgeless-elements editor settings:
  - note
  - connector
  - edgeless text
  - pen
  • Loading branch information
akumatus committed Sep 2, 2024
1 parent e1310b6 commit 2e37ee0
Show file tree
Hide file tree
Showing 14 changed files with 619 additions and 353 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import type { FrameworkProvider } from '../provider';
// eslint-disable-next-line @typescript-eslint/ban-types
export class Component<Props = {}> {
readonly framework: FrameworkProvider;

readonly props: Props;

protected readonly disposables: (() => void)[] = [];

get eventBus() {
return this.framework.eventBus;
}
Expand All @@ -19,7 +22,9 @@ export class Component<Props = {}> {
CONSTRUCTOR_CONTEXT.current = {};
}

dispose() {}
dispose() {
this.disposables.forEach(dispose => dispose());
}

[Symbol.dispose]() {
this.dispose();
Expand Down

This file was deleted.

Loading

0 comments on commit 2e37ee0

Please sign in to comment.