mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
fix: Only expose registerAction
instead of ActionManager
in the API
This commit is contained in:
parent
daf305af34
commit
c456c1e713
4 changed files with 9 additions and 16 deletions
|
@ -22,7 +22,6 @@ import {
|
|||
checkRefreshOnSubtypeLoad,
|
||||
prepareSubtype,
|
||||
selectSubtype,
|
||||
subtypeActionPredicate,
|
||||
} from "../../element/subtypes";
|
||||
import {
|
||||
maybeGetSubtypeProps,
|
||||
|
@ -42,13 +41,6 @@ const readFile = util.promisify(fs.readFile);
|
|||
const { h } = window;
|
||||
|
||||
export class API {
|
||||
constructor() {
|
||||
h.app.actionManager.registerActionPredicate(subtypeActionPredicate);
|
||||
if (true) {
|
||||
// Call `prepareSubtype()` here for `@excalidraw/excalidraw`-specific subtypes
|
||||
}
|
||||
}
|
||||
|
||||
static addSubtype = (record: SubtypeRecord, subtypePrepFn: SubtypePrepFn) => {
|
||||
const subtypeLoadedCb: SubtypeLoadedCb = (hasSubtype) => {
|
||||
if (checkRefreshOnSubtypeLoad(hasSubtype, h.elements)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue