diff --git a/docs/dynamic/other.md b/docs/dynamic/other.md index 6f0f5d07d..c94377ae3 100644 --- a/docs/dynamic/other.md +++ b/docs/dynamic/other.md @@ -80,7 +80,10 @@ In fact, we can also use `only` and `uncover` within cetz, just requiring a bit #cetz.canvas({ import cetz.draw: * - let self = (self.methods.update-cover)(self: self, hide.with(bounds: true)) + let self = utils.merge-dicts( + self, + config-methods(cover: utils.method-wrapper(hide.with(bounds: true))), + ) let (uncover,) = utils.methods(self) rect((0,0), (5,5)) diff --git a/i18n/zh/docusaurus-plugin-content-docs/current/dynamic/other.md b/i18n/zh/docusaurus-plugin-content-docs/current/dynamic/other.md index ec544ff5e..1a1677528 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/current/dynamic/other.md +++ b/i18n/zh/docusaurus-plugin-content-docs/current/dynamic/other.md @@ -80,7 +80,10 @@ Touying 还提供了 `touying-reducer`,它能为 cetz 与 fletcher 加入 `pau #cetz.canvas({ import cetz.draw: * - let self = (self.methods.update-cover)(self: self, hide.with(bounds: true)) + let self = utils.merge-dicts( + self, + config-methods(cover: utils.method-wrapper(hide.with(bounds: true))), + ) let (uncover,) = utils.methods(self) rect((0,0), (5,5)) diff --git a/i18n/zh/docusaurus-plugin-content-docs/version-0.5.x/dynamic/other.md b/i18n/zh/docusaurus-plugin-content-docs/version-0.5.x/dynamic/other.md index ec544ff5e..1a1677528 100644 --- a/i18n/zh/docusaurus-plugin-content-docs/version-0.5.x/dynamic/other.md +++ b/i18n/zh/docusaurus-plugin-content-docs/version-0.5.x/dynamic/other.md @@ -80,7 +80,10 @@ Touying 还提供了 `touying-reducer`,它能为 cetz 与 fletcher 加入 `pau #cetz.canvas({ import cetz.draw: * - let self = (self.methods.update-cover)(self: self, hide.with(bounds: true)) + let self = utils.merge-dicts( + self, + config-methods(cover: utils.method-wrapper(hide.with(bounds: true))), + ) let (uncover,) = utils.methods(self) rect((0,0), (5,5)) diff --git a/versioned_docs/version-0.5.x/dynamic/other.md b/versioned_docs/version-0.5.x/dynamic/other.md index 6f0f5d07d..c94377ae3 100644 --- a/versioned_docs/version-0.5.x/dynamic/other.md +++ b/versioned_docs/version-0.5.x/dynamic/other.md @@ -80,7 +80,10 @@ In fact, we can also use `only` and `uncover` within cetz, just requiring a bit #cetz.canvas({ import cetz.draw: * - let self = (self.methods.update-cover)(self: self, hide.with(bounds: true)) + let self = utils.merge-dicts( + self, + config-methods(cover: utils.method-wrapper(hide.with(bounds: true))), + ) let (uncover,) = utils.methods(self) rect((0,0), (5,5))