lectric icon indicating copy to clipboard operation
lectric copied to clipboard

Changed "page" to "slide", added extensions

Open stutrek opened this issue 12 years ago • 3 comments

This is a big one.

  • Changed the word "page" to the word "slide" in the code, readme, and tests.
  • Changed slider.page() to slider.currentSlide().
  • Changed the "slide" event to "move".
  • Added a test for slidesPerPage.
  • Updated tests for on and off.
  • Changed the example in the readme from .subscribe to .on
  • Turn tossing on when more than one slide fits in the frame.
  • Added slider.getSlideData to get data attributes off of slides
  • Added slider.next/previous/nextPage/previousPage for easy navigation
  • Added loop option which skips to the first frame when you go past the last one.
  • It will automatically lazy load images with the data-src attribute one frame ahead.

Added extensions:

  • NavigationDots add little dots you can click to move to a frame
  • autoplay runs through the slides on a timer (use data-delay to set it on a slide by slide basis)
  • XofY updates an element with the slide number. Text before and after, plus the word 'of' can be customized.

stutrek avatar Jan 25 '13 19:01 stutrek

Hey, I think this may be nearing to the point where a name change and a split is appropriate, and we're probably going to keep making changes. I don't want to exclude you from updates, but I also don't want to create confusion about what lectric is.

Any thoughts?

stutrek avatar Feb 07 '13 18:02 stutrek

We are pre-1.0 on this guy so I don't think we are, or have to for that matter, make any compatibility promises at this time. For that reason alone, I'd love to see if there is a way we can facilitate your changes here. To me, the changes you've listen in this pull don't seem like they stray very far from the initial sketch of what this library could be.

What are your thoughts on the code?

brettbuddin avatar Feb 11 '13 15:02 brettbuddin

I like the code, it's high on functionality and low on size and bugs. We are going to make further changes to the API, events like start and stop are less clear when there's a autoplay extension, and we're going to make some changes to allow it to resize more easily, and changes to make it work properly with list elements. I would guess that our API and code will be stable in mid to late April.

Before then I'd like to play up the extensions and hooks (even just inside MLB) by changing the name of our fork to Frankenslide. I'll leave it a fork, so we'll still be able to push and pull across.

stutrek avatar Feb 13 '13 23:02 stutrek