odopod / code-library Goto Github PK
View Code? Open in Web Editor NEWA collection of vanilla JavaScript components used in Odopod projects.
Home Page: http://code.odopod.com
License: MIT License
A collection of vanilla JavaScript components used in Odopod projects.
Home Page: http://code.odopod.com
License: MIT License
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).
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();
}
});
});
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
Launched in Chrome 63. Feature-detect overscroll-behavior
and use that instead of ScrollFix
for OdoDialog
.
https://developers.google.com/web/updates/2017/11/overscroll-behavior
Would be a breaking change because the polyfill would be required (unless it were bundled).
https://caniuse.com/#feat=intersectionobserver
https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
https://github.com/w3c/IntersectionObserver/tree/master/polyfill
Viewport would become a simple wrapper around IntersectionObserver
to determine when to call the enter()
and exit()
methods for items.
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.
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.
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.
When an expandable item is opened or closed, it would be useful for the ExpandableGroup
to emit an event.
Expandable
0.1.1
http://code.odopod.com/odo-expandable/
Scroll down to the accordions such that when expanded, the third item's content would be out of view, but the third item's button is in view.
Page shouldn't scroll
Page scrolls
Let's encrypt that.
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.
It already exists, just need to add it to the events draggable emits in the documentation.
Add (scrollTop, scrollLeft)
and (viewportWidth, viewportHeight)
to odo-window-events
documentation examples.
It currently continues to animate even though it can't go anywhere.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.