File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -266,9 +266,9 @@ const Cards = props => {
266
266
267
267
// Tutorial cards need to calculate their own dragging bounds
268
268
// to allow for dragging the cards off the left, right and bottom
269
- // edges of the workspace, used in the custom overlay 'card-container-overlay'
270
- const cardHorizontalOffset = 400 ; // 80% of approx. card width
271
- const cardVerticalOffset = 256 ; // 80% of approx. card height
269
+ // edges of the workspace.
270
+ const cardHorizontalOffset = 400 ; // ~ 80% of card width
271
+ const cardVerticalOffset = expanded ? 257 : 0 ; // ~ 80% of card height, if expanded
272
272
const menuBarHeight = 48 ; // TODO: get pre-calculated from elsewhere?
273
273
274
274
if ( x === 0 && y === 0 ) {
@@ -285,7 +285,7 @@ const Cards = props => {
285
285
const steps = content [ activeDeckId ] . steps ;
286
286
287
287
return (
288
- // Use a custom overlay to act as the bounding parent for the draggable
288
+ // Custom overlay to act as the bounding parent for the draggable, using values from above
289
289
< div
290
290
className = { styles . cardContainerOverlay }
291
291
style = { {
Original file line number Diff line number Diff line change @@ -31,8 +31,6 @@ const reducer = function (state, action) {
31
31
visible : false
32
32
} ) ;
33
33
case SHRINK_EXPAND_CARDS :
34
- // Set new position here based on bounds
35
- console . log ( 'TODO: set new position based on bounds' ) ;
36
34
return Object . assign ( { } , state , {
37
35
expanded : ! state . expanded
38
36
} ) ;
You can’t perform that action at this time.
0 commit comments