Giter Site home page Giter Site logo

odopod / code-library Goto Github PK

View Code? Open in Web Editor NEW
28.0 10.0 8.0 2.36 MB

A collection of vanilla JavaScript components used in Odopod projects.

Home Page: http://code.odopod.com

License: MIT License

JavaScript 60.98% HTML 30.20% CSS 8.81%
javascript odopod vanilla-javascript components carousel video viewport modal hotspots draggable

code-library's People

Contributors

johnny5k avatar matthewzaso avatar vestride 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

code-library's Issues

`lazy` option for OdoModule's `initializeAll`

A lazy option for OdoModule would default to false. If true, requestIdleCallback would be used inside initializeAll() and return a promise.

requestIdleCallback is supported in Chrome and Firefox and under consideration for WebKit and Edge. A polyfill would be needed https://www.npmjs.com/package/request-idle-callback.

This new option would give developers the ability to delay initialization of modules that are not needed on page load (like a footer, modules below the fold, or a component that won't shift itself after being initialized).

Expandable missing public "update" method.

Usage:

If content shifts after the page loads, offsets will be incorrect for the accordion expandables and need to be updated.

Currently the only option I see is

window.addEventListener('load', function onLoad() {
  window.removeEventListener('load', onLoad);
  expandables.forEach(function (expandable) {
    if (expandable._saveOffsets) {
      expandable._saveOffsets();
    }
  });
});

OdoHelpers Coordinate Docs Typos

Docs for Coordinate

var Coordinate = OdoHelpers.coordinate;

Should be

var Coordinate = OdoHelpers.Coordinate;

Docs for Coordinate.distance use Coordinate.difference

var end = new Coordinate(50, 100);
Coordinate.difference(start, end); // -64.03

Should be

var end = new Coordinate(50, 100);
Coordinate.distance(start, end); // 64.03

Sassplate: CSS Grid

How should we go about supporting CSS Grid? It's well-supported in evergreen browsers.

Does it make sense to continue with our current classes (e.g. col-4@sm) or should we leverage some more powerful grid features?

Should we remove the push, pull, and offset classes with how easy CSS Grid makes this? Are there helper classes which would replace them?

I'd like to find some examples of another grid framework using CSS Grid.

Non-draggable carousel still has grabbable class

const carousel = new OdoCarousel(element);
carousel.setDraggable(false);

Carousel is no longer draggable, but it still shows the grab cursor because of the grabble class.

In Draggable#set isEnabled, it should probably toggle the grabbable class.

Affix: add class when affixed

Classes are currently added when the affix is at the top and bottom, but not when it's sticky, forcing the use of :not(...) selectors.

Expandable: Add height animation to items

My goal is to have the accordion-like animation with as many as desired expandables to be open at a time. Currently the only way to get the animation is with the accordion and that only allows 1 item open at a time.

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.