MCPcopy Create free account
hub / github.com/SolarLune/masterplan / StopResizing

Method StopResizing

card.go:1994–2007  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1992}
1993
1994func (card *Card) StopResizing() {
1995 card.Resizing = ""
1996 card.LockPosition()
1997 card.ReceiveMessage(NewMessage(MessageCardResizeCompleted, card, nil))
1998
1999 if card.Rect.H > globals.GridSize {
2000 card.Collapsed = CollapsedNone
2001 } else if card.Rect.H < card.Contents.Container().IdealSize().Y {
2002 card.Collapsed = CollapsedShade
2003 }
2004
2005 card.CreateUndoState = true
2006
2007}
2008
2009func (card *Card) LockPosition() {
2010 card.Rect.X = float32(math.Round(float64(card.Rect.X/globals.GridSize)) * float64(globals.GridSize))

Callers 2

UpdateMethod · 0.95
UpdateMethod · 0.80

Calls 5

LockPositionMethod · 0.95
ReceiveMessageMethod · 0.95
NewMessageFunction · 0.85
IdealSizeMethod · 0.80
ContainerMethod · 0.65

Tested by

no test coverage detected