Coder Social home page Coder Social logo

chromatic.js's People

Contributors

jtreitz avatar kosssi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chromatic.js's Issues

Layout with large margins

Hi!

I noticed that if you put large margins on images (say 30px), layouting engine produces not optimal layout:

  • if you use background-size: cover, images are cropped
  • if you use background-size: contain, images may have bigger margins

I know it's because large margins affect original aspect ratios, so final image area has slightly different aspect ratio.

My question: Is it possible to change algorithm to do perfect layout with large margins?

The problem with scaling

Hi!

Please tell me what can be caused by the chromatic has problems with scaling resolutions window between 440px and 666 px.

Resizing of the window throws errors in console

Watching Chrome dev console while resizing the window after visiting http://www.chromatic.io/FQrLQsb gives multiple JS errors:

(anonymous) @ application.178626a….js:735
(anonymous) @ application.178626a….js:736
Chromatic.GalleryView.GalleryView.layout @ application.178626a….js:755
(anonymous) @ application.178626a….js:750
(anonymous) @ application.178626a….js:756
l @ application.178626a….js:744
application.178626a….js:735 Uncaught TypeError: Cannot read property '0' of undefined
    at application.178626a….js:735
    at application.178626a….js:736
    at GalleryView.Chromatic.GalleryView.GalleryView.layout (application.178626a….js:755)
    at GalleryView.layout (application.178626a….js:750)
    at application.178626a….js:756
    at l (application.178626a….js:744)

Closing the zoom view with mouse click does not restore window focus

When clicking the empty space around the zoomed view the image closes normally but then page up/down and home/end keys don't work - at least unless one clicks the tiny gaps between the photos or the scroll bar which restores window focus.

Closing the zoom view with Esc key OTOH doesn't produce this effect.

Can you fix or suggest a workaround?

Caption on Images

It would be nice if there was an option to add a caption element to .chromatic-zoom-photo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.