Skip to content

Commit

Permalink
fix: prevent dragging if prop is false
Browse files Browse the repository at this point in the history
  • Loading branch information
cazala committed Aug 21, 2019
1 parent 77f53f5 commit 34be1a7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/components/TileMap/TileMap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ export class TileMap extends React.PureComponent<Props, State> {
}

handlePanZoom = (args: { dx: number; dy: number; dz: number }) => {
if (!this.props.isDraggable) return
const { dx, dy, dz } = args
const { size, maxSize, minSize, minX, maxX, minY, maxY, padding } = this.props
const { pan, zoom } = this.state
Expand Down

0 comments on commit 34be1a7

Please sign in to comment.