Skip to content

Commit

Permalink
refactor(viewer): delete unused optional chaining to drag handler hook
Browse files Browse the repository at this point in the history
  • Loading branch information
LTakhyunKim committed Oct 25, 2022
1 parent c95ece4 commit fdf02af
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export default function useHandleDrag({ element, interaction, onViewportChange }
switchMap((start) => {
let lastX = start.pageX
let lastY = start.pageY
const { top, left, width, height } = element?.getBoundingClientRect()
const { top, left, width, height } = element.getBoundingClientRect()
/** relative x position from center of the viewer */
const startX = start.pageX - (left + width / 2)
/** relative y position from center of the viewer */
Expand Down

0 comments on commit fdf02af

Please sign in to comment.