Skip to content

Commit f6e9a7d

Browse files
committed
Remove console log from reducer, fix variable and comments in component.
1 parent 69132b6 commit f6e9a7d

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/components/cards/cards.jsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,9 +266,9 @@ const Cards = props => {
266266

267267
// Tutorial cards need to calculate their own dragging bounds
268268
// 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
272272
const menuBarHeight = 48; // TODO: get pre-calculated from elsewhere?
273273

274274
if (x === 0 && y === 0) {
@@ -285,7 +285,7 @@ const Cards = props => {
285285
const steps = content[activeDeckId].steps;
286286

287287
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
289289
<div
290290
className={styles.cardContainerOverlay}
291291
style={{

src/reducers/cards.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@ const reducer = function (state, action) {
3131
visible: false
3232
});
3333
case SHRINK_EXPAND_CARDS:
34-
// Set new position here based on bounds
35-
console.log('TODO: set new position based on bounds');
3634
return Object.assign({}, state, {
3735
expanded: !state.expanded
3836
});

0 commit comments

Comments
 (0)