Anway, looks like a great project :)
That said, this looks like a very nice library.
That the library doesn't have dependencies is much more important, because then it can be loaded in parallel with other libraries. That matters a lot for performance.
var popper = new Popper(referenceElement, onBottomPopper, {
placement: 'bottom'
});
Popper.js already knows that referenceElement is the association, so it seems reasonable to consider if it should (maybe optionally) create the <label> or aria association between the two.Similar for default keybindings that make sense.
> GPU ACCELERATION
> If supported by browser, poppers will be positioned using CSS translate3d, making your poppers even faster!
How is a transformation accelerated by the GPU? I'm pretty sure translations are done on the CPU before sending the final transformation matrix to the GPU.There are several advantages:
- The size is half of Tether (3.5 vs 7);
- Popper.js doesn't need any additional CSS in your page;
- It works even with elements not placed as direct children of body;
- It's much much faster (compare both on mobile, you'll see Tether lagging a lot!);
- It automatically detects the size of the tooltip arrow;
- Inside Popper.js you already have a way to create tooltip elements automatically, with Tether you need an additional library;
- Popper.js supports particular "flip" behaviors, you can decide that if there's not space on the left, the tooltip must move on the bottom (for example);
- The whole code is fully documented with JSDoc!
I hope this answers your question
When I talk about engines, I mean things like Zynga's Scroller (https://github.com/zynga/scroller), essentially a purely logical set of functionality that doesn't assume a particular view-level implementation.
Awesome work, by the way.
Also, I couldn't find the option to choose tooltip or popover, what's the default and how do I specify tooltip/popover?
I've tested popper.js on svg and it seems to work well but I need to write some test for them.
Maybe coding the animation requires more JavaScript and increase the code base? Seems to me that some basic animation as popover/tooltip would be nice to have.
Warning: [react-router] You cannot change <Router routes>; it will be ignored
edit: released 0.2.5 https://github.com/FezVrasta/popper.js/releases/tag/v0.2.5
Should I block popper.js via an ad blocking filter?
For me a popover is essentially a small overlay of additional contextual information, visually attached to whatever it's providing additional context for. Historically triggered by hover, but increasingly triggered by click/touch. A drop-down menu in a navigation bar is a popover.
p.s. It doesn't mess up with the DOM element you are creating for.