Skip to content

Commit

Permalink
Add docs for container.Remove() when removing everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacalz committed Mar 14, 2022
1 parent 520867c commit 929b6ff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions container.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ func (c *Container) Refresh() {
}

// Remove updates the contents of this container to no longer include the specified object.
// This method is not intended to be used inside a loop, to remove all the elements.
// It is much more efficient to just set .Objects to nil instead.
func (c *Container) Remove(rem CanvasObject) {
if len(c.Objects) == 0 {
return
Expand Down

0 comments on commit 929b6ff

Please sign in to comment.