Skip to content

Commit 544a4c7

Browse files
committed
Change drag offset var names.
1 parent f6e9a7d commit 544a4c7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/cards/cards.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,14 +267,14 @@ const Cards = props => {
267267
// Tutorial cards need to calculate their own dragging bounds
268268
// to allow for dragging the cards off the left, right and bottom
269269
// edges of the workspace.
270-
const cardHorizontalOffset = 400; // ~80% of card width
271-
const cardVerticalOffset = expanded ? 257 : 0; // ~80% of card height, if expanded
270+
const cardHorizontalDragOffset = 400; // ~80% of card width
271+
const cardVerticalDragOffset = 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) {
275275
// initialize positions
276276
x = isRtl ? -292 : 292;
277-
x += cardHorizontalOffset;
277+
x += cardHorizontalDragOffset;
278278
// The tallest cards are about 320px high, and the default position is pinned
279279
// to near the bottom of the blocks palette to allow room to work above.
280280
const tallCardHeight = 320;
@@ -289,10 +289,10 @@ const Cards = props => {
289289
<div
290290
className={styles.cardContainerOverlay}
291291
style={{
292-
width: `${window.innerWidth + (2 * cardHorizontalOffset)}px`,
293-
height: `${window.innerHeight - menuBarHeight + cardVerticalOffset}px`,
292+
width: `${window.innerWidth + (2 * cardHorizontalDragOffset)}px`,
293+
height: `${window.innerHeight - menuBarHeight + cardVerticalDragOffset}px`,
294294
top: `${menuBarHeight}px`,
295-
left: `${-cardHorizontalOffset}px`
295+
left: `${-cardHorizontalDragOffset}px`
296296
}}
297297
>
298298
<Draggable

0 commit comments

Comments
 (0)