digitalfabrik/integreat-app

View on GitHub
native/src/components/PinchPanImage.tsx

Summary

Maintainability
C
1 day
Test Coverage
F
0%

Function render has 75 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render(): ReactElement | null {
    const { uri } = this.props
    const { imageDimensions, viewDimensions, interactive } = this.state

    if (!imageDimensions || !viewDimensions) {
Severity: Major
Found in native/src/components/PinchPanImage.tsx - About 3 hrs to fix

    File PinchPanImage.tsx has 269 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import React, { ReactElement } from 'react'
    import { Animated, Image, ImageErrorEventData, NativeSyntheticEvent } from 'react-native'
    import {
      PanGestureHandler,
      PinchGestureHandler,
    Severity: Minor
    Found in native/src/components/PinchPanImage.tsx - About 2 hrs to fix

      Function constructor has 39 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        constructor(props: PinchPanImageProps) {
          super(props)
          this.state = { interactive: true }
      
          this.pinchHandler = React.createRef()
      Severity: Minor
      Found in native/src/components/PinchPanImage.tsx - About 1 hr to fix

        Function fixBounds has 32 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          private fixBounds(
            viewWidth: number,
            viewHeight: number,
            realImageWidth: number,
            realImageHeight: number,
        Severity: Minor
        Found in native/src/components/PinchPanImage.tsx - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status