Skip to content

Commit 50ecde5

Browse files
authored
Merge pull request #228 from dsandstrom/fix-mirror
Fix mirror dimensions when constrainDimensions is active and not using fixed item width
2 parents f8c4e1c + 9b82373 commit 50ecde5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Draggable/Plugins/Mirror/Mirror.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,8 @@ export default class Mirror extends AbstractPlugin {
286286
return {mirrorOffset, initialX, initialY, ...args};
287287
};
288288

289+
mirror.style.display = 'none';
290+
289291
const initialState = {
290292
mirror,
291293
source,
@@ -424,6 +426,7 @@ function resetMirror({mirror, source, options, ...args}) {
424426
offsetWidth = computedSourceStyles.getPropertyValue('width');
425427
}
426428

429+
mirror.style.display = null;
427430
mirror.style.position = 'fixed';
428431
mirror.style.pointerEvents = 'none';
429432
mirror.style.top = 0;

0 commit comments

Comments
 (0)