Skip to content

Conversation

Aarebecca
Copy link
Contributor

  • 新增 getPluginInstance API,用于获取插件实例并提供插件 API 调用

  • Added getPluginInstance API to get plug-in instances and provide plug-in API calls
const graph = new Graph({
  // ...
 plugin: [{key: 'history', type: 'history'}]
});

const history = graph.getPluginInstance<History>('history');

history.undo();

@Aarebecca Aarebecca mentioned this pull request Apr 2, 2024
3 tasks
@Aarebecca Aarebecca merged commit 923c62a into v5 Apr 2, 2024
@Aarebecca Aarebecca deleted the feat/get-plugin-instance branch April 2, 2024 11:50
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

Successfully merging this pull request may close these issues.

2 participants