0.3.0 • Published 7 years ago

fillscreen-image v0.3.0

Weekly downloads
2
License
GPL-2.0
Repository
github
Last release
7 years ago

What

Given a metadata about an image and a window, we can adjust what portion of the image is viewable within the viewport.

Props

KeyValue
jsonimageType
domExistsboolean
imageType = {
  visible: boolean,
  ratio: float,
  width: int,
  height: int,
  focus: {
    x: int,
    y: int,
  },
}

Server Side Rendering

For SSR purposes, the default window is expected to be 800x800. You will need to update this on componentDidMount() (for instance) to get accurate window dimension readings.