GithubHelp home page GithubHelp logo

gdseller / enhance.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from round/enhance.js

0.0 2.0 0.0 728 KB

Zoom & dynamically crop images. Based on http://github.com/fat/zoom.js by @fat.

CSS 7.83% HTML 42.69% JavaScript 49.48%

enhance.js's Introduction

A port of @fat's simple jQuery plugin for image zooming – now with support for object-fit/object-position, powered by Velocity.js animations, complete with some pre-defined image cropping classes.

Differences

  • Removes Boostrap dependency
  • Adds Velocity.js dependency
  • Supports object-fit and object-position CSS properties
  • Has some classes to get you started with cropped images

To-Dos

  • Add more robust demo
  • Synchronize Velocity.js timing with CSS animation timing
  • Clean up code to allow passing a custom selector/attribute for the targeted images

Known Issues (more todos?)

  • Causes content reflow for images without (expclitly sized) containers, including floated images
  • Doesn’t work on margin: auto centered images
  • Due to animating non-transform properties there is more layout/repainting on images that are cropped

enhance.js's People

Contributors

round avatar

Watchers

James Cloos avatar Eric Ting avatar

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.