File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1855,9 +1855,33 @@ func (card *Card) Deselect() {
18551855
18561856func (card * Card ) StartDragging () {
18571857 if card .Draggable {
1858+
1859+ card .Dragging = true
1860+
1861+ touchingAnotherMap := false
1862+
1863+ // Dragging a Map drags everything on the map too
1864+ if card .ContentType == ContentTypeMap {
1865+ touchingCards := card .GridExtents .Grid .CardsInCardShape (card , 0 , 0 )
1866+
1867+ for _ , other := range touchingCards {
1868+ if other .ContentType == ContentTypeMap {
1869+ touchingAnotherMap = true
1870+ break
1871+ }
1872+ }
1873+
1874+ if ! touchingAnotherMap {
1875+ for _ , other := range touchingCards {
1876+ if ! other .Dragging && other .ContentType != ContentTypeMap {
1877+ other .StartDragging ()
1878+ }
1879+ }
1880+ }
1881+ }
1882+
18581883 card .DragStart = globals .Mouse .WorldPosition ()
18591884 card .DragStartOffset = card .DragStart .Sub (Vector {card .Rect .X , card .Rect .Y })
1860- card .Dragging = true
18611885 card .CreateUndoState = true // TODO: DON'T FORGET TO DO THIS WHEN MOVING CARDS VIA SHORTCUTS
18621886
18631887 PlayUISound (UISoundTypeToggleOff )
You can’t perform that action at this time.
0 commit comments