Skip to content

Commit

Permalink
fix only and uncover for cetz
Browse files Browse the repository at this point in the history
  • Loading branch information
OrangeX4 committed Sep 7, 2024
1 parent 0acda6d commit f54571c
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion docs/dynamic/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
5 changes: 4 additions & 1 deletion versioned_docs/version-0.5.x/dynamic/other.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit f54571c

Please sign in to comment.