Skip to content

A React component for 'responsive cropping' with jQuery FocusPoint.

Notifications You must be signed in to change notification settings

acdlite/react-focuspoint

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-focuspoint

A React component for 'responsive cropping' with jQuery FocusPoint.

npm install --save react-focuspoint

Usage

var React = require('react');
var Focuspoint = require('react-focuspoint');

var MyComponent = React.createClass({

  render() {
    return (
      <Focuspoint
        src="/img/some-image.jpg"
        imageW={800}
        imageH={450}
        focusX={0.75}
        focusY={0.75}
      />
    );
  }

});

Most of these props correspond to FocusPoint options.

Props that correspond to data FocusPoint data attributes:

  • focusX (required)
  • focusY (required)
  • imageW
  • imageH

Props that are passed to FocusPoint constructor:

  • reCalcOnWindowResize
  • throttleDuration

Other props:

  • src - Image src

License

MIT

About

A React component for 'responsive cropping' with jQuery FocusPoint.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published