From eeec6d381bd9fce5974a71d73742aea7fa8770a4 Mon Sep 17 00:00:00 2001 From: zhaodacheng5 <1010953107.com> Date: Mon, 11 Mar 2024 14:20:36 +0800 Subject: [PATCH] docs: remove deprecated `Addon` usage --- sites/x6-sites/docs/tutorial/plugins/dnd.zh.md | 2 +- sites/x6-sites/docs/tutorial/plugins/stencil.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sites/x6-sites/docs/tutorial/plugins/dnd.zh.md b/sites/x6-sites/docs/tutorial/plugins/dnd.zh.md index 1e9bd3033c1..b9f521f9402 100644 --- a/sites/x6-sites/docs/tutorial/plugins/dnd.zh.md +++ b/sites/x6-sites/docs/tutorial/plugins/dnd.zh.md @@ -115,7 +115,7 @@ const dnd = new Dnd({ 3.怎么自定义放置到画布上的节点样式? ```ts -const dnd = new Addon.Dnd({ +const dnd = new Dnd({ getDropNode(node) { const { width, height } = node.size() // 返回一个新的节点作为实际放置到画布上的节点 diff --git a/sites/x6-sites/docs/tutorial/plugins/stencil.md b/sites/x6-sites/docs/tutorial/plugins/stencil.md index 64c1004250f..3700e06a97f 100644 --- a/sites/x6-sites/docs/tutorial/plugins/stencil.md +++ b/sites/x6-sites/docs/tutorial/plugins/stencil.md @@ -141,7 +141,7 @@ const stencil = new Stencil({ }) // 搜索 text 包含关键字的 rect 节点 -const stencil = new Addon.Stencil({ +const stencil = new Stencil({ search: (cell, keyword, groupName, stencil) => { if (keyword) { return cell.shape === 'rect' && cell.attr('text/text').includes(keyword)