Comparing version 0.3.0 to 0.5.0
{ | ||
"name": "ftscroller", | ||
"description": "FTScroller is a cross-browser Javascript/CSS library to allow touch, mouse or scrollwheel scrolling within specified elements, with pagination, snapping and bouncing support.", | ||
"version": "0.3.0", | ||
"version": "0.5.0", | ||
"main": "lib/ftscroller.js", | ||
@@ -6,0 +6,0 @@ "scripts": [ |
@@ -1,2 +0,2 @@ | ||
Copyright (C) 2012-2013 The Financial Times Ltd. | ||
Copyright (C) 2012-2014 The Financial Times Ltd. | ||
@@ -3,0 +3,0 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: |
{ | ||
"name": "ftscroller", | ||
"version": "0.3.0", | ||
"version": "0.5.0", | ||
"author": "FT Labs <enquiries@labs.ft.com> (http://labs.ft.com/)", | ||
@@ -5,0 +5,0 @@ "description": "FTScroller is a cross-browser Javascript/CSS library to allow touch, mouse or scrollwheel scrolling within specified elements, with pagination, snapping and bouncing support.", |
# FTScroller | ||
FTScroller is a library for adding momentum scrolling to web content on devices with a touch interface, compatible across most modern platforms including desktop browsers. Although recently support for `overflow: scroll` (or touch equivalents) has increased, this is often still not implemented in a cross-platform or backwards-compatible way, and with no support for features like snapping. | ||
FTScroller is a library for adding momentum scrolling to web content on devices with a touch interface, compatible across most modern platforms including desktop browsers. Although recently support for `overflow: scroll` (or touch equivalents) has increased, this is often still not implemented in a cross-platform or backwards-compatible way, and with no support for features like snapping. | ||
@@ -48,3 +48,3 @@ FTScroller is developed by [FT Labs](http://labs.ft.com), part of the Financial Times. It is inspired by [Touchscroll](https://github.com/davidaurelio/TouchScroll) and [Zynga Scroller](https://github.com/zynga/scroller), but is a complete rewrite. It is extensively used in the [FT Web App](http://app.ft.com), and was developed to achieve better performance and compatibility, including mouse and touch input. | ||
* `contentHeight` Define the scrollable height; if not defined, this will match the content height _(numeric, default undefined)_ | ||
* `disabledInputMethods` Define any input methods to disable; on some multi-input devices custom behaviour may be desired for some scrollers. No inputs methods are disabled by default. _(object, default { mouse: false, touch: false, scroll: false })_ | ||
* `disabledInputMethods` Define any input methods to disable; on some multi-input devices custom behaviour may be desired for some scrollers. No inputs methods are disabled by default. _(object, default { mouse: false, touch: false, scroll: false, pointer: false, focus: false })_ | ||
* `enableRequestAnimationFrameSupport` FTScroller will use requestAnimationFrame on platforms which support it, which is highly recommended; however this can result in the animation being a further half-frame behind the input method, increasing perceived lag slightly. To disable this, set this property to false. _(boolean, default true)_ | ||
@@ -54,3 +54,2 @@ * `flinging` Allow a fast scroll to continue with momentum when released _(boolean, default true)_ | ||
* `maxFlingDuration` Set the maximum time (ms) that a fling can take to complete once the input has ended _(numeric, default 1000ms)_ | ||
* `paginatedSnap` If snapping is enabled, restricts each scroll movement to one 'page' span. That is, if set to true, it will not be possible to move more than one page in a single movement. _(boolean, default false)_ | ||
* `scrollbars` Whether to display iOS-style scrollbars (which you can style yourself using `.ftscroller_scrollbar` and `.ftscroller_scrollbarx`/`.ftscroller_scrollbary`) while the content is animating _(boolean, default true)_ | ||
@@ -62,2 +61,3 @@ * `scrollBoundary` The initial movement required to trigger a full scroll, in pixels; this is the point at which the scroll is exclusive to this particular FTScroller instance and flings become active _(integer, default 1)_ | ||
* `scrollingY` Enable scrolling on the Y axis if content is available _(boolean, default true)_ | ||
* `singlePageScrolls` _(was `paginatedSnap`)_ If snapping is enabled, restricts each scroll movement to one 'page' span. That is, if set to true, it will not be possible to move more than one page in a single movement. _(boolean, default false)_ | ||
* `snapping` Enable snapping of content to defined 'pages' or segments _(boolean, default false)_ | ||
@@ -96,2 +96,3 @@ * `snapSizeX` Define the horizontal interval content should snap to, in pixels. If this is not set, snapping will be based on pages corresponding to the container size. _(numeric, default undefined)_ | ||
* `updateDimensions(width, height[, nosnap])` Sets the dimensions of the scrollable content. If snapping is enabled, and you wish to disable updates of the snapping grid and prevent the current position from being updated, set `nosnap` to true; it defaults to false if not supplied. | ||
* `setDisabledInputMethods(disabledInputMethods)` Set the input methods to disable. No inputs methods are disabled by default. `(object, default { mouse: false, touch: false, scroll: false, pointer: false, focus: false })` | ||
@@ -101,3 +102,3 @@ ### Prototype methods | ||
* `getPrependedHTML([excludeXAxis, excludeYAxis, hwAccelerationClass])` - Provides half of the HTML that is used to construct the scroller DOM, for use to save a DOM manipulation on Scroller initialisation (see Tips and tricks below). Optionally the x and y axes can be excluded, or a custom layer backing triggering class can be supplied (see the `hwAccelerationClass` option for the constructor). | ||
* `getAppendedHTML([excludeXAxis, excludeYAxis, hwAccelerationClass, scrollbars])` - Provides the second half of the HTML that is used to construct the scroller DOM, for use to save a DOM manipulation on Scroller initialisation (see Tips and tricks below). Optionally the x and y axes can be excluded, or a custom layer backing triggering class can be supplied (see the `hwAccelerationClass` option for the constructor). Pass a truthy value in for the `scrollbars` parameter if you are enabling scrolling. _Any parameters should match those passed in to `getPrependedHTML`._ | ||
* `getAppendedHTML([excludeXAxis, excludeYAxis, hwAccelerationClass, scrollbars])` - Provides the second half of the HTML that is used to construct the scroller DOM, for use to save a DOM manipulation on Scroller initialisation (see Tips and tricks below). Optionally the x and y axes can be excluded, or a custom layer backing triggering class can be supplied (see the `hwAccelerationClass` option for the constructor). Pass a truthy value in for the `scrollbars` parameter if you are enabling scrolling. _Any parameters should match those passed in to `getPrependedHTML`._ | ||
@@ -104,0 +105,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
183531
2490
133