Closed Pompette closed 6 years ago
Add 4 points in the middle of borders to do an horizontal pan or vertical pan. It will move the polygon either on the Y axis or X axis. When adding props enablePanStrict to the component it will enable the new feature.
<CustomCrop enablePanStrict updateImage={this.updateImage} rectangleCoordinates={this.state.rectangleCoordinates} initialImage={this.state.initialImage} height={this.state.imageHeight} width={this.state.imageWidth} ref={(ref) => this.customCrop = ref} overlayColor="rgba(18,190,210, 1)" overlayStrokeColor="rgba(20,190,210, 1)" handlerColor="rgba(20,150,160, 1)" />
Again, thank you very much for this !
Add 4 points in the middle of borders to do an horizontal pan or vertical pan. It will move the polygon either on the Y axis or X axis. When adding props enablePanStrict to the component it will enable the new feature.