From 1d37c643c80699637b5e26fb5998ba4c1d002695 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Thu, 20 Jun 2013 14:08:08 +0200 Subject: [PATCH 01/61] Allow multiple swipviews in the same document (multitouch support) --- src/swipeview.js | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 56b0a00..6d5fbab 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -286,9 +286,10 @@ var SwipeView = (function (window, document) { if (this.initiated) return; - var point = hasTouch ? e.touches[0] : e; + var point = hasTouch ? e.targetTouches[0] : e; this.initiated = true; + this.identifier = point.identifier; this.moved = false; this.thresholdExceeded = false; this.startX = point.pageX; @@ -310,9 +311,19 @@ var SwipeView = (function (window, document) { __move: function (e) { if (!this.initiated) return; + var i, l, point; + + if (hasTouch) { + i = 0; + l = e.changedTouches.length; + for(;i Date: Thu, 20 Jun 2013 14:12:06 +0200 Subject: [PATCH 02/61] oops, forgot to test without touch events --- src/swipeview.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/swipeview.js b/src/swipeview.js index 6d5fbab..0c248f8 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -322,6 +322,9 @@ var SwipeView = (function (window, document) { } if (!point) return; } + else { + point = e; + } var deltaX = point.pageX - this.pointX, deltaY = point.pageY - this.pointY, From 4fd3af86734d253ef6fc642d9bfbfe0972b0daa3 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Thu, 20 Jun 2013 16:14:34 +0200 Subject: [PATCH 03/61] rm div id --- src/swipeview.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 0c248f8..0d4ddb9 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -78,7 +78,7 @@ var SwipeView = (function (window, document) { this.masterPages = []; div = document.createElement('div'); - div.id = 'swipeview-slider'; + div.className = 'swipeview-slider'; div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform:translateZ(0);' + cssVendor + 'transition-timing-function:ease-out'; this.wrapper.appendChild(div); this.slider = div; @@ -87,7 +87,6 @@ var SwipeView = (function (window, document) { for (i=-1; i<2; i++) { div = document.createElement('div'); - div.id = 'swipeview-masterpage-' + (i+1); div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;left:' + i*100 + '%'; if (!div.dataset) div.dataset = {}; pageIndex = i == -1 ? this.options.numberOfPages - 1 : i; From a6c49eb4a23ccda9c360224e2d8e73f4a7743a4c Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Thu, 20 Jun 2013 16:59:44 +0200 Subject: [PATCH 04/61] add a new demo with 5 swipe views --- demo/gallery2/index.html | 112 +++++++++++++++++++++++++++++++++++++++ demo/gallery2/style.css | 83 +++++++++++++++++++++++++++++ 2 files changed, 195 insertions(+) create mode 100644 demo/gallery2/index.html create mode 100644 demo/gallery2/style.css diff --git a/demo/gallery2/index.html b/demo/gallery2/index.html new file mode 100644 index 0000000..fd51a58 --- /dev/null +++ b/demo/gallery2/index.html @@ -0,0 +1,112 @@ + + + + + + + + SwipeView + + + + + +
+
+
+
+
+ + + + diff --git a/demo/gallery2/style.css b/demo/gallery2/style.css new file mode 100644 index 0000000..8f9b852 --- /dev/null +++ b/demo/gallery2/style.css @@ -0,0 +1,83 @@ +html, body { height:100%; } +body { + padding:0; + margin:0; + background:#333; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + -o-user-select:none; + user-select:none; + -webkit-text-size-adjust:none; + -moz-text-size-adjust:none; + -ms-text-size-adjust:none; + -o-text-size-adjust:none; + text-size-adjust:none; + color:#eee; + font-family:helvetica; + font-size:12px; +} + +.wrapper { + width:1024px; + min-width:320px; + height:145px; + margin:10px auto; + border: 5px solid rgb(43, 38, 38); +} + +.swipeview-slider > div { + position:relative; + display:-webkit-box; + display:-moz-box; + display:-ms-box; + display:-o-box; + display:box; + -webkit-box-orient:vertical; + -moz-box-orient:vertical; + -ms-box-orient:vertical; + -o-box-orient:vertical; + box-orient:vertical; + -webkit-box-pack:center; + -moz-box-pack:center; + -ms-box-pack:center; + -o-box-pack:center; + box-pack:center; + -webkit-box-align:center; + -mox-box-align:center; + -ms-box-align:center; + -o-box-align:center; + box-align:center; + overflow:hidden; +} + +.swipeview-slider img { + display:block; + -webkit-transition-duration:.4s; + -moz-transition-duration:.4s; + -ms-transition-duration:.4s; + -o-transition-duration:.4s; + transition-duration:.4s; + -webkit-transition-property:opacity; + -moz-transition-property:opacity; + -ms-transition-property:opacity; + -o-transition-property:opacity; + transition-property:opacity; + opacity:1; + pointer-events:none; + visibility:visible; +} + +.swipeview-slider .set-container { + margin:auto; +} + +.swipeview-slider .container { + background: rgb(197, 197, 197); + float: left; + margin: 0 5px; +} + +.swipeview-slider img.loading { + visibility:hidden; +} From f922ae7ff50ac1fa5752e92471c79325c3a7d43d Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Thu, 20 Jun 2013 17:11:49 +0200 Subject: [PATCH 05/61] fix demo --- demo/gallery/style.css | 12 ++++++------ demo/inline/style.css | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/demo/gallery/style.css b/demo/gallery/style.css index c1217be..229f0f6 100644 --- a/demo/gallery/style.css +++ b/demo/gallery/style.css @@ -72,7 +72,7 @@ body { background:rgba(255,255,255,0.4); } -#swipeview-slider > div { +.swipeview-slider > div { position:relative; display:-webkit-box; display:-moz-box; @@ -97,7 +97,7 @@ body { overflow:hidden; } -#swipeview-slider img { +.swipeview-slider img { display:block; border:5px solid #eee; -webkit-box-shadow:0 2px 6px #000; @@ -124,7 +124,7 @@ body { pointer-events:none; } -#swipeview-slider span { +.swipeview-slider span { position:absolute; bottom:0; left:0; @@ -165,7 +165,7 @@ body { transform:translate(0,100%) translateZ(0); } -#swipeview-slider .swipeview-active span { +.swipeview-slider .swipeview-active span { -webkit-transform:translate(0,0) translateZ(0); -moz-transform:translate(0,0) translateZ(0); -ms-transform:translate(0,0); @@ -184,7 +184,7 @@ body { } #wrapper > div > .swipeview-loading img, -#swipeview-slider img.loading { +.swipeview-slider img.loading { -webkit-transition-duration:0s; opacity:0; } @@ -202,4 +202,4 @@ body { -o-transform:translate(0,100%); -o-transform:translate(0,100%) translateZ(0); transform:translate(0,100%) translateZ(0); -} \ No newline at end of file +} diff --git a/demo/inline/style.css b/demo/inline/style.css index 830a1b2..79c3961 100644 --- a/demo/inline/style.css +++ b/demo/inline/style.css @@ -66,7 +66,7 @@ h1 { background:rgba(255,255,255,0.4); } -#swipeview-slider > div { +.swipeview-slider > div { position:relative; display:-webkit-box; -webkit-box-orient:vertical; @@ -75,7 +75,7 @@ h1 { overflow:hidden; } -#swipeview-slider span { +.swipeview-slider span { -webkit-box-sizing:border-box; display:block; text-align:center; From 000c80f1cbc661862a294bf8a8e874ebc2811562 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Thu, 20 Jun 2013 17:21:16 +0200 Subject: [PATCH 06/61] update readme --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f1c7a95..ceb4d06 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,10 @@ Read more at [cubiq.org](http://cubiq.org/swipeview) Gallery Demo: [http://cubiq.org/dropbox/SwipeView/demo/gallery](http://cubiq.org/dropbox/SwipeView/demo/gallery) +Multiple SwipeViews in the same document: [http://peutetre.github.io/SwipeView/demo/gallery2/](http://peutetre.github.io/SwipeView/demo/gallery2/) + eReader Demo: [http://cubiq.org/dropbox/SwipeView/demo/ereader](http://cubiq.org/dropbox/SwipeView/demo/ereader) Inline Demo: [http://cubiq.org/dropbox/SwipeView/demo/inline](http://cubiq.org/dropbox/SwipeView/demo/inline) -Screencast: [http://www.youtube.com/watch?v=Hhes5JHs8jQ](http://www.youtube.com/watch?v=Hhes5JHs8jQ) \ No newline at end of file +Screencast: [http://www.youtube.com/watch?v=Hhes5JHs8jQ](http://www.youtube.com/watch?v=Hhes5JHs8jQ) From e42f36abdc012d591829fe493b2fc34f07fefe1b Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Fri, 21 Jun 2013 10:10:32 +0200 Subject: [PATCH 07/61] rm onMouveOut cb in demo/gallery2 --- demo/gallery2/index.html | 4 ---- 1 file changed, 4 deletions(-) diff --git a/demo/gallery2/index.html b/demo/gallery2/index.html index fd51a58..6eb0b22 100644 --- a/demo/gallery2/index.html +++ b/demo/gallery2/index.html @@ -76,10 +76,6 @@ el.onload = function () { this.className = ''; } } - gallery.onMoveOut(function () { - console.log("onMoveOut"); - }); - gallery.onFlip(function () { var el, upcoming, From 2d764b9e53c5f4eefc1186b91bb8b43a447e2938 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Fri, 21 Jun 2013 11:18:02 +0200 Subject: [PATCH 08/61] add mouseout listener on the swipe view wrapper --- src/swipeview.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 0d4ddb9..1040ef1 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -110,9 +110,9 @@ var SwipeView = (function (window, document) { // in Opera >= 12 the transitionend event is lowercase so we register both events if ( vendor == 'O' ) this.slider.addEventListener(transitionEndEvent.toLowerCase(), this, false); -/* if (!hasTouch) { + if (!hasTouch) { this.wrapper.addEventListener('mouseout', this, false); - }*/ + } }; SwipeView.prototype = { @@ -155,9 +155,9 @@ var SwipeView = (function (window, document) { this.wrapper.removeEventListener(endEvent, this, false); this.slider.removeEventListener(transitionEndEvent, this, false); -/* if (!hasTouch) { + if (!hasTouch) { this.wrapper.removeEventListener('mouseout', this, false); - }*/ + } }, refreshSize: function () { @@ -250,6 +250,7 @@ var SwipeView = (function (window, document) { this.__move(e); break; case cancelEvent: + case "mouseout": case endEvent: this.__end(e); break; From 9913092880351e2e660ad2ddd50ac031ba9c403a Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Fri, 21 Jun 2013 13:12:15 +0200 Subject: [PATCH 09/61] demo gallery2, keep global references for testing --- demo/gallery2/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/demo/gallery2/index.html b/demo/gallery2/index.html index 6eb0b22..616a010 100644 --- a/demo/gallery2/index.html +++ b/demo/gallery2/index.html @@ -97,11 +97,11 @@ return gallery; } -generateSwipeView("#wrapper1", genData(100)); -generateSwipeView("#wrapper2", genData(100)); -generateSwipeView("#wrapper3", genData(100)); -generateSwipeView("#wrapper4", genData(100)); -generateSwipeView("#wrapper5", genData(100)); +var g1 = generateSwipeView("#wrapper1", genData(100)); +var g2 = generateSwipeView("#wrapper2", genData(100)); +var g3 = generateSwipeView("#wrapper3", genData(100)); +var g4 = generateSwipeView("#wrapper4", genData(100)); +var g5 = generateSwipeView("#wrapper5", genData(100)); From 16e7dd253678fc6a0aabf808ae7299aa513330c9 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Fri, 21 Jun 2013 13:13:41 +0200 Subject: [PATCH 10/61] =?UTF-8?q?demo:=20gallery2=20refacto,=20getting=20d?= =?UTF-8?q?ata=20from=20a=20=C6=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/gallery2/index.html | 37 +++++++++++++++++++++---------------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/demo/gallery2/index.html b/demo/gallery2/index.html index 616a010..bdc427d 100644 --- a/demo/gallery2/index.html +++ b/demo/gallery2/index.html @@ -35,27 +35,32 @@ i = 0; tmp = []; } } - return data; + return { + get: function (i) { + return data[i]; + }, + length : data.length + }; } -function generateSwipeView(id, data) { +function generateSwipeView(id, dataO) { var gallery = new SwipeView(id, { hastyPageFlip:true, - numberOfPages: data.length + numberOfPages: dataO.length }), i, page; - function genImgs(container, page, data) { + function genImgs(container, page, d) { var img, div; for(var i=0; i< 5; i++) { div = document.createElement('div'); div.className = 'container'; img = document.createElement('img'); img.className = 'loading'; - img.src = data[page].imgs[i]; - img.width = data[page].width; - img.height = data[page].height; - div.style.width = data[page].width + "px"; - div.style.height = data[page].height + "px"; + img.src = d.get(page).imgs[i]; + img.width = d.get(page).width; + img.height = d.get(page).height; + div.style.width = d.get(page).width + "px"; + div.style.height = d.get(page).height + "px"; img.onload = function () { this.className = ''; } div.appendChild(img); container.appendChild(div); @@ -63,10 +68,10 @@ } for(i=0; i<3; i++) { - page = i==0 ? data.length-1 : i-1; + page = i==0 ? dataO.length-1 : i-1; div = document.createElement('div'); div.className = 'set-container'; - genImgs(div, page, data); + genImgs(div, page, dataO); gallery.masterPages[i].appendChild(div); } @@ -86,11 +91,11 @@ if (upcoming != gallery.masterPages[i].dataset.pageIndex) { els = gallery.masterPages[i].querySelectorAll('img'); - setImg(els[0], data[upcoming].imgs[0]); - setImg(els[1], data[upcoming].imgs[1]); - setImg(els[2], data[upcoming].imgs[2]); - setImg(els[3], data[upcoming].imgs[3]); - setImg(els[4], data[upcoming].imgs[4]); + setImg(els[0], dataO.get(upcoming).imgs[0]); + setImg(els[1], dataO.get(upcoming).imgs[1]); + setImg(els[2], dataO.get(upcoming).imgs[2]); + setImg(els[3], dataO.get(upcoming).imgs[3]); + setImg(els[4], dataO.get(upcoming).imgs[4]); } } }); From 027e2b60bb8767268db3e13bdbb8e0a40f4c2046 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Fri, 21 Jun 2013 16:24:06 +0200 Subject: [PATCH 11/61] fix on __end() --- src/swipeview.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/swipeview.js b/src/swipeview.js index 1040ef1..a726cab 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -389,6 +389,7 @@ var SwipeView = (function (window, document) { if(e.changedTouches.item(i).identifier === this.identifier) point = e.changedTouches.item(i); } + if (!point) return; } else { point = e; From c44bc3fcccf6304b5c9915af8aa00c641b649376 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Fri, 21 Jun 2013 17:22:18 +0200 Subject: [PATCH 12/61] handle touch cancel properly! --- src/swipeview.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/swipeview.js b/src/swipeview.js index a726cab..850999d 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -389,7 +389,11 @@ var SwipeView = (function (window, document) { if(e.changedTouches.item(i).identifier === this.identifier) point = e.changedTouches.item(i); } - if (!point) return; + if (!point) { + this.__pos(-this.page * this.pageWidth); + this.initiated = false; + return; + } } else { point = e; From 3081d49bf4bbef6a050d9f2dc6983a9fdfb82de2 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 25 Jun 2013 14:28:16 +0200 Subject: [PATCH 13/61] wip VerticalSwipeView --- src/verticalswipeview.js | 509 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 509 insertions(+) create mode 100644 src/verticalswipeview.js diff --git a/src/verticalswipeview.js b/src/verticalswipeview.js new file mode 100644 index 0000000..bcb5af1 --- /dev/null +++ b/src/verticalswipeview.js @@ -0,0 +1,509 @@ +/*! + * VerticalSwipeView + * Fork from SwipeView v1.0 ~ Copyright (c) 2012 Matteo Spinelli, http://cubiq.org + * Released under MIT license, http://cubiq.org/license + */ +var VerticalSwipeView = (function (window, document) { + var dummyStyle = document.createElement('div').style, + vendor = (function () { + var vendors = 't,webkitT,MozT,msT,OT'.split(','), + t, + i = 0, + l = vendors.length; + + for ( ; i < l; i++ ) { + t = vendors[i] + 'ransform'; + if ( t in dummyStyle ) { + return vendors[i].substr(0, vendors[i].length - 1); + } + } + + return false; + })(), + cssVendor = vendor ? '-' + vendor.toLowerCase() + '-' : '', + + // Style properties + transform = prefixStyle('transform'), + transitionDuration = prefixStyle('transitionDuration'), + + // Browser capabilities + has3d = prefixStyle('perspective') in dummyStyle, + hasTouch = 'ontouchstart' in window, + hasTransform = !!vendor, + hasTransitionEnd = prefixStyle('transition') in dummyStyle, + + // Helpers + translateZ = has3d ? ' translateZ(0)' : '', + + // Events + resizeEvent = 'onorientationchange' in window ? 'orientationchange' : 'resize', + startEvent = hasTouch ? 'touchstart' : 'mousedown', + moveEvent = hasTouch ? 'touchmove' : 'mousemove', + endEvent = hasTouch ? 'touchend' : 'mouseup', + cancelEvent = hasTouch ? 'touchcancel' : 'mouseup', + transitionEndEvent = (function () { + if ( vendor === false ) return false; + + var transitionEnd = { + '' : 'transitionend', + 'webkit' : 'webkitTransitionEnd', + 'Moz' : 'transitionend', + 'O' : 'oTransitionEnd', + 'ms' : 'MSTransitionEnd' + }; + + return transitionEnd[vendor]; + })(), + + VerticalSwipeView = function (el, options) { + var i, + div, + className, + pageIndex; + + this.wrapper = typeof el == 'string' ? document.querySelector(el) : el; + this.options = { + text: null, + numberOfPages: 3, + snapThreshold: null, + hastyPageFlip: false, + loop: true + }; + + // User defined options + for (i in options) this.options[i] = options[i]; + + this.wrapper.style.overflow = 'hidden'; + this.wrapper.style.position = 'relative'; + + this.masterPages = []; + + div = document.createElement('div'); + div.className = 'swipeview-slider'; + div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform:translateZ(0);' + cssVendor + 'transition-timing-function:ease-out'; + this.wrapper.appendChild(div); + this.slider = div; + + this.refreshSize(); + + for (i=-1; i<2; i++) { + div = document.createElement('div'); + div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;left:' + i*100 + '%'; + if (!div.dataset) div.dataset = {}; + pageIndex = i == -1 ? this.options.numberOfPages - 1 : i; + div.dataset.pageIndex = pageIndex; + div.dataset.upcomingPageIndex = pageIndex; + + if (!this.options.loop && i == -1) div.style.visibility = 'hidden'; + + this.slider.appendChild(div); + this.masterPages.push(div); + } + + className = this.masterPages[1].className; + this.masterPages[1].className = !className ? 'swipeview-active' : className + ' swipeview-active'; + + window.addEventListener(resizeEvent, this, false); + this.wrapper.addEventListener(startEvent, this, false); + this.wrapper.addEventListener(moveEvent, this, false); + this.wrapper.addEventListener(endEvent, this, false); + this.slider.addEventListener(transitionEndEvent, this, false); + // in Opera >= 12 the transitionend event is lowercase so we register both events + if ( vendor == 'O' ) this.slider.addEventListener(transitionEndEvent.toLowerCase(), this, false); + + if (!hasTouch) { + this.wrapper.addEventListener('mouseout', this, false); + } + }; + + VerticalSwipeView.prototype = { + currentMasterPage: 1, + x: 0, + page: 0, + pageIndex: 0, + customEvents: [], + + onFlip: function (fn) { + this.wrapper.addEventListener('swipeview-flip', fn, false); + this.customEvents.push(['flip', fn]); + }, + + onMoveOut: function (fn) { + this.wrapper.addEventListener('swipeview-moveout', fn, false); + this.customEvents.push(['moveout', fn]); + }, + + onMoveIn: function (fn) { + this.wrapper.addEventListener('swipeview-movein', fn, false); + this.customEvents.push(['movein', fn]); + }, + + onTouchStart: function (fn) { + this.wrapper.addEventListener('swipeview-touchstart', fn, false); + this.customEvents.push(['touchstart', fn]); + }, + + destroy: function () { + while ( this.customEvents.length ) { + this.wrapper.removeEventListener('swipeview-' + this.customEvents[0][0], this.customEvents[0][1], false); + this.customEvents.shift(); + } + + // Remove the event listeners + window.removeEventListener(resizeEvent, this, false); + this.wrapper.removeEventListener(startEvent, this, false); + this.wrapper.removeEventListener(moveEvent, this, false); + this.wrapper.removeEventListener(endEvent, this, false); + this.slider.removeEventListener(transitionEndEvent, this, false); + + if (!hasTouch) { + this.wrapper.removeEventListener('mouseout', this, false); + } + }, + + refreshSize: function () { + this.wrapperWidth = this.wrapper.clientWidth; + this.wrapperHeight = this.wrapper.clientHeight; + this.pageWidth = this.wrapperWidth; + this.maxX = -this.options.numberOfPages * this.pageWidth + this.wrapperWidth; + this.snapThreshold = this.options.snapThreshold === null ? + Math.round(this.pageWidth * 0.15) : + /%/.test(this.options.snapThreshold) ? + Math.round(this.pageWidth * this.options.snapThreshold.replace('%', '') / 100) : + this.options.snapThreshold; + }, + + updatePageCount: function (n) { + this.options.numberOfPages = n; + this.maxX = -this.options.numberOfPages * this.pageWidth + this.wrapperWidth; + }, + + goToPage: function (p) { + var i; + + this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); + for (i=0; i<3; i++) { + className = this.masterPages[i].className; + /(^|\s)swipeview-loading(\s|$)/.test(className) || (this.masterPages[i].className = !className ? 'swipeview-loading' : className + ' swipeview-loading'); + } + + p = p < 0 ? 0 : p > this.options.numberOfPages-1 ? this.options.numberOfPages-1 : p; + this.page = p; + this.pageIndex = p; + this.slider.style[transitionDuration] = '0s'; + this.__pos(-p * this.pageWidth); + + this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; + + this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className + ' swipeview-active'; + + if (this.currentMasterPage === 0) { + this.masterPages[2].style.left = this.page * 100 - 100 + '%'; + this.masterPages[0].style.left = this.page * 100 + '%'; + this.masterPages[1].style.left = this.page * 100 + 100 + '%'; + + this.masterPages[2].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; + this.masterPages[0].dataset.upcomingPageIndex = this.page; + this.masterPages[1].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; + } else if (this.currentMasterPage == 1) { + this.masterPages[0].style.left = this.page * 100 - 100 + '%'; + this.masterPages[1].style.left = this.page * 100 + '%'; + this.masterPages[2].style.left = this.page * 100 + 100 + '%'; + + this.masterPages[0].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; + this.masterPages[1].dataset.upcomingPageIndex = this.page; + this.masterPages[2].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; + } else { + this.masterPages[1].style.left = this.page * 100 - 100 + '%'; + this.masterPages[2].style.left = this.page * 100 + '%'; + this.masterPages[0].style.left = this.page * 100 + 100 + '%'; + + this.masterPages[1].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; + this.masterPages[2].dataset.upcomingPageIndex = this.page; + this.masterPages[0].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; + } + + this.__flip(); + }, + + next: function () { + if (!this.options.loop && this.x == this.maxX) return; + + this.directionX = -1; + this.x -= 1; + this.__checkPosition(); + }, + + prev: function () { + if (!this.options.loop && this.x === 0) return; + + this.directionX = 1; + this.x += 1; + this.__checkPosition(); + }, + + handleEvent: function (e) { + switch (e.type) { + case startEvent: + this.__start(e); + break; + case moveEvent: + this.__move(e); + break; + case cancelEvent: + case "mouseout": + case endEvent: + this.__end(e); + break; + case resizeEvent: + this.__resize(); + break; + case transitionEndEvent: + case 'otransitionend': + if (e.target == this.slider && !this.options.hastyPageFlip) this.__flip(); + break; + } + }, + + + /** + * + * Pseudo private methods + * + */ + __pos: function (x) { + this.x = x; + this.slider.style[transform] = 'translate(' + x + 'px,0)' + translateZ; + }, + + __resize: function () { + this.refreshSize(); + this.slider.style[transitionDuration] = '0s'; + this.__pos(-this.page * this.pageWidth); + }, + + __start: function (e) { + //e.preventDefault(); + + if (this.initiated) return; + + var point = hasTouch ? e.targetTouches[0] : e; + + this.initiated = true; + this.identifier = point.identifier; + this.moved = false; + this.thresholdExceeded = false; + this.startX = point.pageX; + this.startY = point.pageY; + this.pointX = point.pageX; + this.pointY = point.pageY; + this.stepsX = 0; + this.stepsY = 0; + this.directionX = 0; + this.directionLocked = false; + +/* var matrix = getComputedStyle(this.slider, null).webkitTransform.replace(/[^0-9-.,]/g, '').split(','); + this.x = matrix[4] * 1;*/ + + this.slider.style[transitionDuration] = '0s'; + + this.__event('touchstart'); + }, + + __move: function (e) { + if (!this.initiated) return; + var i, l, point; + + if (hasTouch) { + i = 0; + l = e.changedTouches.length; + for(;i 0 ? 1 : deltaX < 0 ? -1 : 0; + this.stepsX += Math.abs(deltaX); + this.stepsY += Math.abs(deltaY); + + // We take a 10px buffer to figure out the direction of the swipe + if (this.stepsX < 10 && this.stepsY < 10) { +// e.preventDefault(); + return; + } + + // We are scrolling vertically, so skip VerticalSwipeView and give the control back to the browser + if (!this.directionLocked && this.stepsY > this.stepsX) { + this.initiated = false; + return; + } + + e.preventDefault(); + + this.directionLocked = true; + + if (!this.options.loop && (newX > 0 || newX < this.maxX)) { + newX = this.x + (deltaX / 2); + } + + if (!this.thresholdExceeded && dist >= this.snapThreshold) { + this.thresholdExceeded = true; + this.__event('moveout'); + } else if (this.thresholdExceeded && dist < this.snapThreshold) { + this.thresholdExceeded = false; + this.__event('movein'); + } + +/* if (newX > 0 || newX < this.maxX) { + newX = this.x + (deltaX / 2); + }*/ + + this.__pos(newX); + }, + + __end: function (e) { + if (!this.initiated) return; + + var point; + + if(hasTouch) { + var i=0, l=e.touches.length; + for(;i 0 || this.x < this.maxX)) { + dist = 0; + this.__event('movein'); + } + + // Check if we exceeded the snap threshold + if (dist < this.snapThreshold) { + this.slider.style[transitionDuration] = Math.floor(300 * dist / this.snapThreshold) + 'ms'; + this.__pos(-this.page * this.pageWidth); + return; + } + + this.__checkPosition(); + }, + + __checkPosition: function () { + var pageFlip, + pageFlipIndex, + className; + + this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); + + // Flip the page + if (this.directionX > 0) { + this.page = -Math.ceil(this.x / this.pageWidth); + this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; + this.pageIndex = this.pageIndex === 0 ? this.options.numberOfPages - 1 : this.pageIndex - 1; + + pageFlip = this.currentMasterPage - 1; + pageFlip = pageFlip < 0 ? 2 : pageFlip; + this.masterPages[pageFlip].style.left = this.page * 100 - 100 + '%'; + + pageFlipIndex = this.page - 1; + } else { + this.page = -Math.floor(this.x / this.pageWidth); + this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; + this.pageIndex = this.pageIndex == this.options.numberOfPages - 1 ? 0 : this.pageIndex + 1; + + pageFlip = this.currentMasterPage + 1; + pageFlip = pageFlip > 2 ? 0 : pageFlip; + this.masterPages[pageFlip].style.left = this.page * 100 + 100 + '%'; + + pageFlipIndex = this.page + 1; + } + + // Add active class to current page + className = this.masterPages[this.currentMasterPage].className; + /(^|\s)swipeview-active(\s|$)/.test(className) || (this.masterPages[this.currentMasterPage].className = !className ? 'swipeview-active' : className + ' swipeview-active'); + + // Add loading class to flipped page + className = this.masterPages[pageFlip].className; + /(^|\s)swipeview-loading(\s|$)/.test(className) || (this.masterPages[pageFlip].className = !className ? 'swipeview-loading' : className + ' swipeview-loading'); + + pageFlipIndex = pageFlipIndex - Math.floor(pageFlipIndex / this.options.numberOfPages) * this.options.numberOfPages; + this.masterPages[pageFlip].dataset.upcomingPageIndex = pageFlipIndex; // Index to be loaded in the newly flipped page + + newX = -this.page * this.pageWidth; + + this.slider.style[transitionDuration] = Math.floor(500 * Math.abs(this.x - newX) / this.pageWidth) + 'ms'; + + // Hide the next page if we decided to disable looping + if (!this.options.loop) { + this.masterPages[pageFlip].style.visibility = newX === 0 || newX == this.maxX ? 'hidden' : ''; + } + + if (this.x == newX) { + this.__flip(); // If we swiped all the way long to the next page (extremely rare but still) + } else { + this.__pos(newX); + if (this.options.hastyPageFlip) this.__flip(); + } + }, + + __flip: function () { + this.__event('flip'); + + for (var i=0; i<3; i++) { + this.masterPages[i].className = this.masterPages[i].className.replace(/(^|\s)swipeview-loading(\s|$)/, ''); // Remove the loading class + this.masterPages[i].dataset.pageIndex = this.masterPages[i].dataset.upcomingPageIndex; + } + }, + + __event: function (type) { + var ev = document.createEvent("Event"); + + ev.initEvent('swipeview-' + type, true, true); + + this.wrapper.dispatchEvent(ev); + } + }; + + function prefixStyle (style) { + if ( vendor === '' ) return style; + + style = style.charAt(0).toUpperCase() + style.substr(1); + return vendor + style; + } + + return VerticalSwipeView; +})(window, document); From 39aff26f49b7cb6e1a5d8edf7279db2b2b339bd2 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 25 Jun 2013 14:28:16 +0200 Subject: [PATCH 14/61] wip VerticalSwipeView --- src/verticalswipeview.js | 509 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 509 insertions(+) create mode 100644 src/verticalswipeview.js diff --git a/src/verticalswipeview.js b/src/verticalswipeview.js new file mode 100644 index 0000000..0271f61 --- /dev/null +++ b/src/verticalswipeview.js @@ -0,0 +1,509 @@ +/*! + * VerticalSwipeView + * Fork from SwipeView v1.0 ~ Copyright (c) 2012 Matteo Spinelli, http://cubiq.org + * Released under MIT license, http://cubiq.org/license + */ +var VerticalSwipeView = (function (window, document) { + var dummyStyle = document.createElement('div').style, + vendor = (function () { + var vendors = 't,webkitT,MozT,msT,OT'.split(','), + t, + i = 0, + l = vendors.length; + + for ( ; i < l; i++ ) { + t = vendors[i] + 'ransform'; + if ( t in dummyStyle ) { + return vendors[i].substr(0, vendors[i].length - 1); + } + } + + return false; + })(), + cssVendor = vendor ? '-' + vendor.toLowerCase() + '-' : '', + + // Style properties + transform = prefixStyle('transform'), + transitionDuration = prefixStyle('transitionDuration'), + + // Browser capabilities + has3d = prefixStyle('perspective') in dummyStyle, + hasTouch = 'ontouchstart' in window, + hasTransform = !!vendor, + hasTransitionEnd = prefixStyle('transition') in dummyStyle, + + // Helpers + translateZ = has3d ? ' translateZ(0)' : '', + + // Events + resizeEvent = 'onorientationchange' in window ? 'orientationchange' : 'resize', + startEvent = hasTouch ? 'touchstart' : 'mousedown', + moveEvent = hasTouch ? 'touchmove' : 'mousemove', + endEvent = hasTouch ? 'touchend' : 'mouseup', + cancelEvent = hasTouch ? 'touchcancel' : 'mouseup', + transitionEndEvent = (function () { + if ( vendor === false ) return false; + + var transitionEnd = { + '' : 'transitionend', + 'webkit' : 'webkitTransitionEnd', + 'Moz' : 'transitionend', + 'O' : 'oTransitionEnd', + 'ms' : 'MSTransitionEnd' + }; + + return transitionEnd[vendor]; + })(), + + VerticalSwipeView = function (el, options) { + var i, + div, + className, + pageIndex; + + this.wrapper = typeof el == 'string' ? document.querySelector(el) : el; + this.options = { + text: null, + numberOfPages: 3, + snapThreshold: null, + hastyPageFlip: false, + loop: true + }; + + // User defined options + for (i in options) this.options[i] = options[i]; + + this.wrapper.style.overflow = 'hidden'; + this.wrapper.style.position = 'relative'; + + this.masterPages = []; + + div = document.createElement('div'); + div.className = 'swipeview-slider'; + div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform:translateZ(0);' + cssVendor + 'transition-timing-function:ease-out'; + this.wrapper.appendChild(div); + this.slider = div; + + this.refreshSize(); + + for (i=-1; i<2; i++) { + div = document.createElement('div'); + div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;top:' + i*100 + '%'; + if (!div.dataset) div.dataset = {}; + pageIndex = i == -1 ? this.options.numberOfPages - 1 : i; + div.dataset.pageIndex = pageIndex; + div.dataset.upcomingPageIndex = pageIndex; + + if (!this.options.loop && i == -1) div.style.visibility = 'hidden'; + + this.slider.appendChild(div); + this.masterPages.push(div); + } + + className = this.masterPages[1].className; + this.masterPages[1].className = !className ? 'swipeview-active' : className + ' swipeview-active'; + + window.addEventListener(resizeEvent, this, false); + this.wrapper.addEventListener(startEvent, this, false); + this.wrapper.addEventListener(moveEvent, this, false); + this.wrapper.addEventListener(endEvent, this, false); + this.slider.addEventListener(transitionEndEvent, this, false); + // in Opera >= 12 the transitionend event is lowercase so we register both events + if ( vendor == 'O' ) this.slider.addEventListener(transitionEndEvent.toLowerCase(), this, false); + + if (!hasTouch) { + this.wrapper.addEventListener('mouseout', this, false); + } + }; + + VerticalSwipeView.prototype = { + currentMasterPage: 1, + x: 0, + page: 0, + pageIndex: 0, + customEvents: [], + + onFlip: function (fn) { + this.wrapper.addEventListener('swipeview-flip', fn, false); + this.customEvents.push(['flip', fn]); + }, + + onMoveOut: function (fn) { + this.wrapper.addEventListener('swipeview-moveout', fn, false); + this.customEvents.push(['moveout', fn]); + }, + + onMoveIn: function (fn) { + this.wrapper.addEventListener('swipeview-movein', fn, false); + this.customEvents.push(['movein', fn]); + }, + + onTouchStart: function (fn) { + this.wrapper.addEventListener('swipeview-touchstart', fn, false); + this.customEvents.push(['touchstart', fn]); + }, + + destroy: function () { + while ( this.customEvents.length ) { + this.wrapper.removeEventListener('swipeview-' + this.customEvents[0][0], this.customEvents[0][1], false); + this.customEvents.shift(); + } + + // Remove the event listeners + window.removeEventListener(resizeEvent, this, false); + this.wrapper.removeEventListener(startEvent, this, false); + this.wrapper.removeEventListener(moveEvent, this, false); + this.wrapper.removeEventListener(endEvent, this, false); + this.slider.removeEventListener(transitionEndEvent, this, false); + + if (!hasTouch) { + this.wrapper.removeEventListener('mouseout', this, false); + } + }, + + refreshSize: function () { + this.wrapperWidth = this.wrapper.clientWidth; + this.wrapperHeight = this.wrapper.clientHeight; + this.pageWidth = this.wrapperWidth; + this.maxX = -this.options.numberOfPages * this.pageWidth + this.wrapperWidth; + this.snapThreshold = this.options.snapThreshold === null ? + Math.round(this.pageWidth * 0.15) : + /%/.test(this.options.snapThreshold) ? + Math.round(this.pageWidth * this.options.snapThreshold.replace('%', '') / 100) : + this.options.snapThreshold; + }, + + updatePageCount: function (n) { + this.options.numberOfPages = n; + this.maxX = -this.options.numberOfPages * this.pageWidth + this.wrapperWidth; + }, + + goToPage: function (p) { + var i; + + this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); + for (i=0; i<3; i++) { + className = this.masterPages[i].className; + /(^|\s)swipeview-loading(\s|$)/.test(className) || (this.masterPages[i].className = !className ? 'swipeview-loading' : className + ' swipeview-loading'); + } + + p = p < 0 ? 0 : p > this.options.numberOfPages-1 ? this.options.numberOfPages-1 : p; + this.page = p; + this.pageIndex = p; + this.slider.style[transitionDuration] = '0s'; + this.__pos(-p * this.pageWidth); + + this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; + + this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className + ' swipeview-active'; + + if (this.currentMasterPage === 0) { + this.masterPages[2].style.left = this.page * 100 - 100 + '%'; + this.masterPages[0].style.left = this.page * 100 + '%'; + this.masterPages[1].style.left = this.page * 100 + 100 + '%'; + + this.masterPages[2].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; + this.masterPages[0].dataset.upcomingPageIndex = this.page; + this.masterPages[1].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; + } else if (this.currentMasterPage == 1) { + this.masterPages[0].style.left = this.page * 100 - 100 + '%'; + this.masterPages[1].style.left = this.page * 100 + '%'; + this.masterPages[2].style.left = this.page * 100 + 100 + '%'; + + this.masterPages[0].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; + this.masterPages[1].dataset.upcomingPageIndex = this.page; + this.masterPages[2].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; + } else { + this.masterPages[1].style.left = this.page * 100 - 100 + '%'; + this.masterPages[2].style.left = this.page * 100 + '%'; + this.masterPages[0].style.left = this.page * 100 + 100 + '%'; + + this.masterPages[1].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; + this.masterPages[2].dataset.upcomingPageIndex = this.page; + this.masterPages[0].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; + } + + this.__flip(); + }, + + next: function () { + if (!this.options.loop && this.x == this.maxX) return; + + this.directionX = -1; + this.x -= 1; + this.__checkPosition(); + }, + + prev: function () { + if (!this.options.loop && this.x === 0) return; + + this.directionX = 1; + this.x += 1; + this.__checkPosition(); + }, + + handleEvent: function (e) { + switch (e.type) { + case startEvent: + this.__start(e); + break; + case moveEvent: + this.__move(e); + break; + case cancelEvent: + case "mouseout": + case endEvent: + this.__end(e); + break; + case resizeEvent: + this.__resize(); + break; + case transitionEndEvent: + case 'otransitionend': + if (e.target == this.slider && !this.options.hastyPageFlip) this.__flip(); + break; + } + }, + + + /** + * + * Pseudo private methods + * + */ + __pos: function (x) { + this.x = x; + this.slider.style[transform] = 'translate(' + x + 'px,0)' + translateZ; + }, + + __resize: function () { + this.refreshSize(); + this.slider.style[transitionDuration] = '0s'; + this.__pos(-this.page * this.pageWidth); + }, + + __start: function (e) { + //e.preventDefault(); + + if (this.initiated) return; + + var point = hasTouch ? e.targetTouches[0] : e; + + this.initiated = true; + this.identifier = point.identifier; + this.moved = false; + this.thresholdExceeded = false; + this.startX = point.pageX; + this.startY = point.pageY; + this.pointX = point.pageX; + this.pointY = point.pageY; + this.stepsX = 0; + this.stepsY = 0; + this.directionX = 0; + this.directionLocked = false; + +/* var matrix = getComputedStyle(this.slider, null).webkitTransform.replace(/[^0-9-.,]/g, '').split(','); + this.x = matrix[4] * 1;*/ + + this.slider.style[transitionDuration] = '0s'; + + this.__event('touchstart'); + }, + + __move: function (e) { + if (!this.initiated) return; + var i, l, point; + + if (hasTouch) { + i = 0; + l = e.changedTouches.length; + for(;i 0 ? 1 : deltaX < 0 ? -1 : 0; + this.stepsX += Math.abs(deltaX); + this.stepsY += Math.abs(deltaY); + + // We take a 10px buffer to figure out the direction of the swipe + if (this.stepsX < 10 && this.stepsY < 10) { +// e.preventDefault(); + return; + } + + // We are scrolling vertically, so skip VerticalSwipeView and give the control back to the browser + if (!this.directionLocked && this.stepsY > this.stepsX) { + this.initiated = false; + return; + } + + e.preventDefault(); + + this.directionLocked = true; + + if (!this.options.loop && (newX > 0 || newX < this.maxX)) { + newX = this.x + (deltaX / 2); + } + + if (!this.thresholdExceeded && dist >= this.snapThreshold) { + this.thresholdExceeded = true; + this.__event('moveout'); + } else if (this.thresholdExceeded && dist < this.snapThreshold) { + this.thresholdExceeded = false; + this.__event('movein'); + } + +/* if (newX > 0 || newX < this.maxX) { + newX = this.x + (deltaX / 2); + }*/ + + this.__pos(newX); + }, + + __end: function (e) { + if (!this.initiated) return; + + var point; + + if(hasTouch) { + var i=0, l=e.touches.length; + for(;i 0 || this.x < this.maxX)) { + dist = 0; + this.__event('movein'); + } + + // Check if we exceeded the snap threshold + if (dist < this.snapThreshold) { + this.slider.style[transitionDuration] = Math.floor(300 * dist / this.snapThreshold) + 'ms'; + this.__pos(-this.page * this.pageWidth); + return; + } + + this.__checkPosition(); + }, + + __checkPosition: function () { + var pageFlip, + pageFlipIndex, + className; + + this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); + + // Flip the page + if (this.directionX > 0) { + this.page = -Math.ceil(this.x / this.pageWidth); + this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; + this.pageIndex = this.pageIndex === 0 ? this.options.numberOfPages - 1 : this.pageIndex - 1; + + pageFlip = this.currentMasterPage - 1; + pageFlip = pageFlip < 0 ? 2 : pageFlip; + this.masterPages[pageFlip].style.left = this.page * 100 - 100 + '%'; + + pageFlipIndex = this.page - 1; + } else { + this.page = -Math.floor(this.x / this.pageWidth); + this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; + this.pageIndex = this.pageIndex == this.options.numberOfPages - 1 ? 0 : this.pageIndex + 1; + + pageFlip = this.currentMasterPage + 1; + pageFlip = pageFlip > 2 ? 0 : pageFlip; + this.masterPages[pageFlip].style.left = this.page * 100 + 100 + '%'; + + pageFlipIndex = this.page + 1; + } + + // Add active class to current page + className = this.masterPages[this.currentMasterPage].className; + /(^|\s)swipeview-active(\s|$)/.test(className) || (this.masterPages[this.currentMasterPage].className = !className ? 'swipeview-active' : className + ' swipeview-active'); + + // Add loading class to flipped page + className = this.masterPages[pageFlip].className; + /(^|\s)swipeview-loading(\s|$)/.test(className) || (this.masterPages[pageFlip].className = !className ? 'swipeview-loading' : className + ' swipeview-loading'); + + pageFlipIndex = pageFlipIndex - Math.floor(pageFlipIndex / this.options.numberOfPages) * this.options.numberOfPages; + this.masterPages[pageFlip].dataset.upcomingPageIndex = pageFlipIndex; // Index to be loaded in the newly flipped page + + newX = -this.page * this.pageWidth; + + this.slider.style[transitionDuration] = Math.floor(500 * Math.abs(this.x - newX) / this.pageWidth) + 'ms'; + + // Hide the next page if we decided to disable looping + if (!this.options.loop) { + this.masterPages[pageFlip].style.visibility = newX === 0 || newX == this.maxX ? 'hidden' : ''; + } + + if (this.x == newX) { + this.__flip(); // If we swiped all the way long to the next page (extremely rare but still) + } else { + this.__pos(newX); + if (this.options.hastyPageFlip) this.__flip(); + } + }, + + __flip: function () { + this.__event('flip'); + + for (var i=0; i<3; i++) { + this.masterPages[i].className = this.masterPages[i].className.replace(/(^|\s)swipeview-loading(\s|$)/, ''); // Remove the loading class + this.masterPages[i].dataset.pageIndex = this.masterPages[i].dataset.upcomingPageIndex; + } + }, + + __event: function (type) { + var ev = document.createEvent("Event"); + + ev.initEvent('swipeview-' + type, true, true); + + this.wrapper.dispatchEvent(ev); + } + }; + + function prefixStyle (style) { + if ( vendor === '' ) return style; + + style = style.charAt(0).toUpperCase() + style.substr(1); + return vendor + style; + } + + return VerticalSwipeView; +})(window, document); From e2db487115a747707bddc1ed5b7c8b4cfd2ebf63 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 25 Jun 2013 14:45:46 +0200 Subject: [PATCH 15/61] progress on VerticalSwipeView --- demo/gallery4/images/pic01.jpg | Bin 0 -> 22534 bytes demo/gallery4/images/pic02.jpg | Bin 0 -> 8275 bytes demo/gallery4/images/pic03.jpg | Bin 0 -> 19425 bytes demo/gallery4/images/pic04.jpg | Bin 0 -> 29554 bytes demo/gallery4/images/pic05.jpg | Bin 0 -> 20107 bytes demo/gallery4/images/pic06.jpg | Bin 0 -> 23859 bytes demo/gallery4/index.html | 126 ++++++++++++++++++++ demo/gallery4/style.css | 205 +++++++++++++++++++++++++++++++++ src/verticalswipeview.js | 98 ++++++++-------- 9 files changed, 380 insertions(+), 49 deletions(-) create mode 100644 demo/gallery4/images/pic01.jpg create mode 100644 demo/gallery4/images/pic02.jpg create mode 100644 demo/gallery4/images/pic03.jpg create mode 100644 demo/gallery4/images/pic04.jpg create mode 100644 demo/gallery4/images/pic05.jpg create mode 100644 demo/gallery4/images/pic06.jpg create mode 100644 demo/gallery4/index.html create mode 100644 demo/gallery4/style.css diff --git a/demo/gallery4/images/pic01.jpg b/demo/gallery4/images/pic01.jpg new file mode 100644 index 0000000000000000000000000000000000000000..97dd2657c5d3f9069fb1753bdd24d06c48628ec9 GIT binary patch literal 22534 zcma&NWprFU%rH0;=1iEGnVBZcoQA1k=7u?Gn3*{ZH_Xi3G}tgRQ^QR+ecpG!-Tk*d zzGtqlb!1txB}*g!UH-cRz?Jm0wg3QRW$6KMfd8lbJqMskd@;540ssL}AD;yQfWMaj z6j3ur6LWxB-^Ul=-!*_Z00s&Q3K|Lq8X5*3=Ho$xgMooVL_$D7L_k0SA^lfCNGPZv zR1_o(3`|T63_=0|0z#7iQ~n_V!otELBO&90K)Co=Xju6Fr}O{s%ijS28XVvR$PEcZ z13;hwA<=+;hX4d0G(rP`|IeI0+7OUX&@iwco%q0y9?1Vs@BeiET?HUP0s#;pNYDrT z@cr9CpbAh_;vW{U3P=MAtRew5Nv2nK=yqAIEYkOlw*g-qaG%hGX}+iX6x7W>8`aPNQ>TTqj&#>QJ(iem|HyeQLx7Z<@WxfE_bW64!|c2c6t(&q-z*X%oBjGB``i8UhI=RE5r;?`5@&3^dD|000^0c<>%u5 zW`;S6b0n+>wMgMes<`G9vEQ}L%BHtI0096I_#a+~f4I@Ff8XbMnBjZ4cJnutw00_s zoOvBbs!k3)|Je*bz6Q{Kzykmf|3gP0;o6G`#q8L3mNI4QnT`q5*B&`?H9`+mM~{u6 z54eAbKb9vcAdnOY)17NM^YWzUw99|*CivQ6PvGKrMNE`6m!Whw``<@%r$1Pv!{ROJ)nyKT)~b-`dLXb=bh1_2QLSt^8c zTb-KNrOo5M`vz#u*iezV0RSq{(1Xk&L-*}}0j^UD^_U;RK?49)fdH!f@%t~HFQnSH zU(?-fj{JJr%7e5p!DM1Tp+gV1^rkP{Pn~%DQxHfIWM~7y5(tjWzfXQLw|5ZB;Q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c3<@h#QI|fh`vklw{Gm zrW}ZWz+%7hLt24iNq{}v_RE!}x}tj`bJsEV8=dMwmwUrL6k3wH-2q1zR8VVZ`#ng< zO`VXc1?R}Z2wkyP$O7t6!TDB(2Y7X}fnyvdz3U$xxC54-{oq(I&D93;X%Js=C-y0p z4cT{_NqV#86iEN4sy$DQ-_QKfr^B|_I*VdHFOFS^6~Qj^!L|5g-jk9aRaU8!T)({S zJnrg;#*cs!J>v_;1Fv;Al^*H_Qz)&KYPrSS?9Q^kT$8R>NTdV7TKbN1{TG!>rEYtC z7t5OtIDep($sanW6i%#ME3tt_@wrZ~PH)C<|57CA7j2FZF7c%P`(D+n}}XS;;0N;h1-$`@{OGrjhOoZaRu6LM+a&>47p4}<5>#ko` zSA|iL6G&SpMv7vy9=58IHuqXPfa_(@XqHAj!vkIA{uL>~5JjhZ`<0VaTgKgz%m0KO zubr2fouqZqWQ$>S4=X6LvcF&eeiVV3Z|TZ$Pvc20Mq8r&L`3QTl*{+qghT`C_fj{G zWjF1wy=ln&n6vQ)%~(tcs}?QK^)h-c4c>@lxvvJ7)&)-wrw$>49& z0ufbpS$y{8>J=yb^q<5gR<;YE7xXEuE)S35^s=+HlD?UcJiAB3cWfr*rSPO~|KW>f z4Yl7`e8WU*b?%sCXzev*PlVe|T~v^6`?eSKR84KiTF3yl_4x(hFFU0BU_unLc%A-j z?3H2xiOvg;od;{wN#12X8F~!z4zPf(fU4L=?7L3jM(SMf9pXIP>Jio$IE_6EkUj+d4F#rGn literal 0 HcmV?d00001 diff --git a/demo/gallery4/images/pic03.jpg b/demo/gallery4/images/pic03.jpg new file mode 100644 index 0000000000000000000000000000000000000000..ae8f45363e5e1fa682f905784323161ee71b5851 GIT binary patch literal 19425 zcma&NWmFtN(>A<|EQ{~5xGwGl56o&<-*-CctP*Fb{1O9&n;BuEGr0wKUh z?(cc;=l%I!XXfmlsh&AK)m>fHRo6VOJnjHU<@_D(001Q=HUJp#zj!j=$o0jHJvW13M!Bo6wg2@ zU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index 0000000..229f0f6 --- /dev/null +++ b/demo/gallery4/style.css @@ -0,0 +1,205 @@ +html, body { height:100%; } +body { + padding:0; + margin:0; + background:#333; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + -o-user-select:none; + user-select:none; + -webkit-text-size-adjust:none; + -moz-text-size-adjust:none; + -ms-text-size-adjust:none; + -o-text-size-adjust:none; + text-size-adjust:none; + color:#eee; + font-family:helvetica; + font-size:12px; +} + +#wrapper { + width:100%; + min-width:320px; + height:100%; +} + +#nav { + position:absolute; + z-index:100; + top:8px; + width:200px; + height:20px; + left:50%; + background:rgba(0,0,0,0.75); + padding:0; + margin:0 0 0 -100px; + -webkit-border-radius:10px; + -moz-border-radius:10px; + -ms-border-radius:10px; + -o-border-radius:10px; + border-radius:10px; +} + +#nav li { + display:block; + float:left; + width:14px; + height:14px; line-height:14px; + -webkit-border-radius:7px; + -moz-border-radius:7px; + -ms-border-radius:7px; + -o-border-radius:7px; + border-radius:7px; + background:rgba(255,255,255,0.1); + overflow:hidden; + padding:0; + margin:3px 11px 0 0; + text-align:center; +} + +#nav li#prev { + margin-left:5px; + background:transparent; +} + +#nav li#next { + margin-right:0; + background:transparent; +} + +#nav li.selected { + background:rgba(255,255,255,0.4); +} + +.swipeview-slider > div { + position:relative; + display:-webkit-box; + display:-moz-box; + display:-ms-box; + display:-o-box; + display:box; + -webkit-box-orient:vertical; + -moz-box-orient:vertical; + -ms-box-orient:vertical; + -o-box-orient:vertical; + box-orient:vertical; + -webkit-box-pack:center; + -moz-box-pack:center; + -ms-box-pack:center; + -o-box-pack:center; + box-pack:center; + -webkit-box-align:center; + -mox-box-align:center; + -ms-box-align:center; + -o-box-align:center; + box-align:center; + overflow:hidden; +} + +.swipeview-slider img { + display:block; + border:5px solid #eee; + -webkit-box-shadow:0 2px 6px #000; + -moz-box-shadow:0 2px 6px #000; + -ms-box-shadow:0 2px 6px #000; + -o-box-shadow:0 2px 6px #000; + box-shadow:0 2px 6px #000; + -webkit-border-radius:2px; + -moz-border-radius:2px; + -ms-border-radius:2px; + -o-border-radius:2px; + border-radius:2px; + -webkit-transition-duration:.4s; + -moz-transition-duration:.4s; + -ms-transition-duration:.4s; + -o-transition-duration:.4s; + transition-duration:.4s; + -webkit-transition-property:opacity; + -moz-transition-property:opacity; + -ms-transition-property:opacity; + -o-transition-property:opacity; + transition-property:opacity; + opacity:1; + pointer-events:none; +} + +.swipeview-slider span { + position:absolute; + bottom:0; + left:0; + width:100%; + padding:20px 0; + display:block; + background:rgba(0,0,0,0.75); + font-size:20px; + text-align:center; + text-shadow:0 1px 0 #000; + border-top:1px solid rgba(255,255,255,0.2); + -webkit-border-top-left-radius:10px; + -moz-border-top-left-radius:10px; + -ms-border-top-left-radius:10px; + -o-border-top-left-radius:10px; + border-top-left-radius:10px; + -webkit-border-top-right-radius:10px; + -moz-border-top-right-radius:10px; + -ms-border-top-right-radius:10px; + -o-border-top-right-radius:10px; + border-top-right-radius:10px; + -webkit-transition-duration:.3s; + -moz-transition-duration:.3s; + -ms-transition-duration:.3s; + -o-transition-duration:.3s; + transition-duration:.3s; + -webkit-transition-property:-webkit-transform; + -moz-transition-property:-moz-transform; + -ms-transition-property:-ms-transform; + -o-transition-property:-o-transform; + transition-property:transform; + -webkit-transform:translate(0,100%) translateZ(0); + -moz-transform:translate(0,100%) translateZ(0); + -ms-transform:translate(0,100%); + -ms-transform:translate(0,100%) translateZ(0); + -o-transform:translate(0,100%); + -o-transform:translate(0,100%) translateZ(0); + transform:translate(0,100%) translateZ(0); +} + +.swipeview-slider .swipeview-active span { + -webkit-transform:translate(0,0) translateZ(0); + -moz-transform:translate(0,0) translateZ(0); + -ms-transform:translate(0,0); + -ms-transform:translate(0,0) translateZ(0); + -o-transform:translate(0,0); + -o-transform:translate(0,0) translateZ(0); + transform:translate(0,0) translateZ(0); +} + +#wrapper > div > .swipeview-loading { + background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#444), to(#555)), + -webkit-gradient(linear, 0 0, 100% 0, from(#777), to(#777)); + background-position:50% 50%, 50% 50%; + background-size:200px 140px, 210px 150px; + background-repeat:no-repeat; +} + +#wrapper > div > .swipeview-loading img, +.swipeview-slider img.loading { + -webkit-transition-duration:0s; + opacity:0; +} + +#wrapper > div > .swipeview-loading span { + -webkit-transition-duration:0s; + -moz-transition-duration:0s; + -ms-transition-duration:0s; + -o-transition-duration:0s; + transition-duration:0s; + -webkit-transform:translate(0,100%) translateZ(0); + -moz-transform:translate(0,100%) translateZ(0); + -ms-transform:translate(0,100%); + -ms-transform:translate(0,100%) translateZ(0); + -o-transform:translate(0,100%); + -o-transform:translate(0,100%) translateZ(0); + transform:translate(0,100%) translateZ(0); +} diff --git a/src/verticalswipeview.js b/src/verticalswipeview.js index 0271f61..1564e85 100644 --- a/src/verticalswipeview.js +++ b/src/verticalswipeview.js @@ -118,7 +118,7 @@ var VerticalSwipeView = (function (window, document) { VerticalSwipeView.prototype = { currentMasterPage: 1, - x: 0, + y: 0, page: 0, pageIndex: 0, customEvents: [], @@ -164,18 +164,18 @@ var VerticalSwipeView = (function (window, document) { refreshSize: function () { this.wrapperWidth = this.wrapper.clientWidth; this.wrapperHeight = this.wrapper.clientHeight; - this.pageWidth = this.wrapperWidth; - this.maxX = -this.options.numberOfPages * this.pageWidth + this.wrapperWidth; + this.pageHeight = this.wrapperHeight; + this.maxY = -this.options.numberOfPages * this.pageHeight + this.wrapperHeight; this.snapThreshold = this.options.snapThreshold === null ? - Math.round(this.pageWidth * 0.15) : + Math.round(this.pageHeight * 0.15) : /%/.test(this.options.snapThreshold) ? - Math.round(this.pageWidth * this.options.snapThreshold.replace('%', '') / 100) : + Math.round(this.pageHeight * this.options.snapThreshold.replace('%', '') / 100) : this.options.snapThreshold; }, updatePageCount: function (n) { this.options.numberOfPages = n; - this.maxX = -this.options.numberOfPages * this.pageWidth + this.wrapperWidth; + this.maxY = -this.options.numberOfPages * this.pageHeight + this.wrapperHeight; }, goToPage: function (p) { @@ -191,32 +191,32 @@ var VerticalSwipeView = (function (window, document) { this.page = p; this.pageIndex = p; this.slider.style[transitionDuration] = '0s'; - this.__pos(-p * this.pageWidth); + this.__pos(-p * this.pageHeight); this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className + ' swipeview-active'; if (this.currentMasterPage === 0) { - this.masterPages[2].style.left = this.page * 100 - 100 + '%'; - this.masterPages[0].style.left = this.page * 100 + '%'; - this.masterPages[1].style.left = this.page * 100 + 100 + '%'; + this.masterPages[2].style.top = this.page * 100 - 100 + '%'; + this.masterPages[0].style.top = this.page * 100 + '%'; + this.masterPages[1].style.top = this.page * 100 + 100 + '%'; this.masterPages[2].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; this.masterPages[0].dataset.upcomingPageIndex = this.page; this.masterPages[1].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; } else if (this.currentMasterPage == 1) { - this.masterPages[0].style.left = this.page * 100 - 100 + '%'; - this.masterPages[1].style.left = this.page * 100 + '%'; - this.masterPages[2].style.left = this.page * 100 + 100 + '%'; + this.masterPages[0].style.top = this.page * 100 - 100 + '%'; + this.masterPages[1].style.top = this.page * 100 + '%'; + this.masterPages[2].style.top = this.page * 100 + 100 + '%'; this.masterPages[0].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; this.masterPages[1].dataset.upcomingPageIndex = this.page; this.masterPages[2].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; } else { - this.masterPages[1].style.left = this.page * 100 - 100 + '%'; - this.masterPages[2].style.left = this.page * 100 + '%'; - this.masterPages[0].style.left = this.page * 100 + 100 + '%'; + this.masterPages[1].style.top = this.page * 100 - 100 + '%'; + this.masterPages[2].style.top = this.page * 100 + '%'; + this.masterPages[0].style.top = this.page * 100 + 100 + '%'; this.masterPages[1].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; this.masterPages[2].dataset.upcomingPageIndex = this.page; @@ -227,18 +227,18 @@ var VerticalSwipeView = (function (window, document) { }, next: function () { - if (!this.options.loop && this.x == this.maxX) return; + if (!this.options.loop && this.y == this.maxY) return; - this.directionX = -1; - this.x -= 1; + this.directionY = -1; + this.y -= 1; this.__checkPosition(); }, prev: function () { - if (!this.options.loop && this.x === 0) return; + if (!this.options.loop && this.y === 0) return; - this.directionX = 1; - this.x += 1; + this.directionY = 1; + this.y += 1; this.__checkPosition(); }, @@ -271,15 +271,15 @@ var VerticalSwipeView = (function (window, document) { * Pseudo private methods * */ - __pos: function (x) { - this.x = x; - this.slider.style[transform] = 'translate(' + x + 'px,0)' + translateZ; + __pos: function (y) { + this.y = y; + this.slider.style[transform] = 'translate(0, ' + y + 'px)' + translateZ; }, __resize: function () { this.refreshSize(); this.slider.style[transitionDuration] = '0s'; - this.__pos(-this.page * this.pageWidth); + this.__pos(-this.page * this.pageHeight); }, __start: function (e) { @@ -299,7 +299,7 @@ var VerticalSwipeView = (function (window, document) { this.pointY = point.pageY; this.stepsX = 0; this.stepsY = 0; - this.directionX = 0; + this.directionY = 0; this.directionLocked = false; /* var matrix = getComputedStyle(this.slider, null).webkitTransform.replace(/[^0-9-.,]/g, '').split(','); @@ -329,13 +329,13 @@ var VerticalSwipeView = (function (window, document) { var deltaX = point.pageX - this.pointX, deltaY = point.pageY - this.pointY, - newX = this.x + deltaX, - dist = Math.abs(point.pageX - this.startX); + newY = this.y + deltaY, + dist = Math.abs(point.pageY - this.startY); this.moved = true; this.pointX = point.pageX; this.pointY = point.pageY; - this.directionX = deltaX > 0 ? 1 : deltaX < 0 ? -1 : 0; + this.directionY = deltaY > 0 ? 1 : deltaY < 0 ? -1 : 0; this.stepsX += Math.abs(deltaX); this.stepsY += Math.abs(deltaY); @@ -345,8 +345,8 @@ var VerticalSwipeView = (function (window, document) { return; } - // We are scrolling vertically, so skip VerticalSwipeView and give the control back to the browser - if (!this.directionLocked && this.stepsY > this.stepsX) { + // We are scrolling horizontaly, so skip VerticalSwipeView and give the control back to the browser + if (!this.directionLocked && this.stepsX > this.stepsY) { this.initiated = false; return; } @@ -355,8 +355,8 @@ var VerticalSwipeView = (function (window, document) { this.directionLocked = true; - if (!this.options.loop && (newX > 0 || newX < this.maxX)) { - newX = this.x + (deltaX / 2); + if (!this.options.loop && (newY > 0 || newY < this.maxY)) { + newY = this.y + (deltaY / 2); } if (!this.thresholdExceeded && dist >= this.snapThreshold) { @@ -371,7 +371,7 @@ var VerticalSwipeView = (function (window, document) { newX = this.x + (deltaX / 2); }*/ - this.__pos(newX); + this.__pos(newY); }, __end: function (e) { @@ -391,7 +391,7 @@ var VerticalSwipeView = (function (window, document) { point = e.changedTouches.item(i); } if (!point) { - this.__pos(-this.page * this.pageWidth); + this.__pos(-this.page * this.pageHeight); this.initiated = false; return; } @@ -400,14 +400,14 @@ var VerticalSwipeView = (function (window, document) { point = e; } - var dist = Math.abs(point.pageX - this.startX); + var dist = Math.abs(point.pageY - this.startY); this.initiated = false; if (!this.moved) return; - if (!this.options.loop && (this.x > 0 || this.x < this.maxX)) { + if (!this.options.loop && (this.y > 0 || this.y < this.maxY)) { dist = 0; this.__event('movein'); } @@ -415,7 +415,7 @@ var VerticalSwipeView = (function (window, document) { // Check if we exceeded the snap threshold if (dist < this.snapThreshold) { this.slider.style[transitionDuration] = Math.floor(300 * dist / this.snapThreshold) + 'ms'; - this.__pos(-this.page * this.pageWidth); + this.__pos(-this.page * this.pageHeight); return; } @@ -430,24 +430,24 @@ var VerticalSwipeView = (function (window, document) { this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); // Flip the page - if (this.directionX > 0) { - this.page = -Math.ceil(this.x / this.pageWidth); + if (this.directionY > 0) { + this.page = -Math.ceil(this.y / this.pageHeight); this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; this.pageIndex = this.pageIndex === 0 ? this.options.numberOfPages - 1 : this.pageIndex - 1; pageFlip = this.currentMasterPage - 1; pageFlip = pageFlip < 0 ? 2 : pageFlip; - this.masterPages[pageFlip].style.left = this.page * 100 - 100 + '%'; + this.masterPages[pageFlip].style.top = this.page * 100 - 100 + '%'; pageFlipIndex = this.page - 1; } else { - this.page = -Math.floor(this.x / this.pageWidth); + this.page = -Math.floor(this.y / this.pageHeight); this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; this.pageIndex = this.pageIndex == this.options.numberOfPages - 1 ? 0 : this.pageIndex + 1; pageFlip = this.currentMasterPage + 1; pageFlip = pageFlip > 2 ? 0 : pageFlip; - this.masterPages[pageFlip].style.left = this.page * 100 + 100 + '%'; + this.masterPages[pageFlip].style.top = this.page * 100 + 100 + '%'; pageFlipIndex = this.page + 1; } @@ -463,19 +463,19 @@ var VerticalSwipeView = (function (window, document) { pageFlipIndex = pageFlipIndex - Math.floor(pageFlipIndex / this.options.numberOfPages) * this.options.numberOfPages; this.masterPages[pageFlip].dataset.upcomingPageIndex = pageFlipIndex; // Index to be loaded in the newly flipped page - newX = -this.page * this.pageWidth; + newY = -this.page * this.pageHeight; - this.slider.style[transitionDuration] = Math.floor(500 * Math.abs(this.x - newX) / this.pageWidth) + 'ms'; + this.slider.style[transitionDuration] = Math.floor(500 * Math.abs(this.y - newY) / this.pageHeight) + 'ms'; // Hide the next page if we decided to disable looping if (!this.options.loop) { - this.masterPages[pageFlip].style.visibility = newX === 0 || newX == this.maxX ? 'hidden' : ''; + this.masterPages[pageFlip].style.visibility = newY === 0 || newY == this.maxY ? 'hidden' : ''; } - if (this.x == newX) { + if (this.y == newY) { this.__flip(); // If we swiped all the way long to the next page (extremely rare but still) } else { - this.__pos(newX); + this.__pos(newY); if (this.options.hastyPageFlip) this.__flip(); } }, From 200dd6a4187a4fe81c471e067ec08a0035ccd071 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 25 Jun 2013 14:51:58 +0200 Subject: [PATCH 16/61] wip gallery4 demo --- demo/gallery4/index.html | 38 ++++++-------------------------------- 1 file changed, 6 insertions(+), 32 deletions(-) diff --git a/demo/gallery4/index.html b/demo/gallery4/index.html index 77526be..2785d69 100644 --- a/demo/gallery4/index.html +++ b/demo/gallery4/index.html @@ -12,16 +12,6 @@
- + + + + +
+
+
+
+
+ + + + diff --git a/demo/gallery3/infinitegraphset.js b/demo/gallery3/infinitegraphset.js new file mode 100644 index 0000000..e9ddffe --- /dev/null +++ b/demo/gallery3/infinitegraphset.js @@ -0,0 +1,66 @@ +/* + * infinitegraphset.js + */ +(function (win, doc) { + + function InfiniteGraphSet(id, dataO) { + var gallery = new SwipeView(id, { + hastyPageFlip:true, + numberOfPages: dataO.length + }), i, page; + + function genImgs(container, page, d) { + var img, div; + for(var i=0; i< 5; i++) { + div = doc.createElement('div'); + div.className = 'container'; + img = doc.createElement('img'); + img.className = 'loading'; + img.src = d.get(page).imgs[i]; + img.width = d.get(page).width; + img.height = d.get(page).height; + div.style.width = d.get(page).width + "px"; + div.style.height = d.get(page).height + "px"; + img.onload = function () { this.className = ''; } + div.appendChild(img); + container.appendChild(div); + } + } + + for(i=0; i<3; i++) { + page = i==0 ? dataO.length-1 : i-1; + div = doc.createElement('div'); + div.className = 'set-container'; + genImgs(div, page, dataO); + gallery.masterPages[i].appendChild(div); + } + + function setImg(el, src) { + el.className = 'loading'; + el.src = src; + el.onload = function () { this.className = ''; } + } + + gallery.onFlip(function () { + var el, + upcoming, + i; + + for (i=0; i<3; i++) { + upcoming = gallery.masterPages[i].dataset.upcomingPageIndex; + + if (upcoming != gallery.masterPages[i].dataset.pageIndex) { + els = gallery.masterPages[i].querySelectorAll('img'); + setImg(els[0], dataO.get(upcoming).imgs[0]); + setImg(els[1], dataO.get(upcoming).imgs[1]); + setImg(els[2], dataO.get(upcoming).imgs[2]); + setImg(els[3], dataO.get(upcoming).imgs[3]); + setImg(els[4], dataO.get(upcoming).imgs[4]); + } + } + }); + return gallery; + } + + win.InfiniteGraphSet = InfiniteGraphSet; +})(window, window.document); diff --git a/demo/gallery3/style.css b/demo/gallery3/style.css new file mode 100644 index 0000000..8f9b852 --- /dev/null +++ b/demo/gallery3/style.css @@ -0,0 +1,83 @@ +html, body { height:100%; } +body { + padding:0; + margin:0; + background:#333; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + -o-user-select:none; + user-select:none; + -webkit-text-size-adjust:none; + -moz-text-size-adjust:none; + -ms-text-size-adjust:none; + -o-text-size-adjust:none; + text-size-adjust:none; + color:#eee; + font-family:helvetica; + font-size:12px; +} + +.wrapper { + width:1024px; + min-width:320px; + height:145px; + margin:10px auto; + border: 5px solid rgb(43, 38, 38); +} + +.swipeview-slider > div { + position:relative; + display:-webkit-box; + display:-moz-box; + display:-ms-box; + display:-o-box; + display:box; + -webkit-box-orient:vertical; + -moz-box-orient:vertical; + -ms-box-orient:vertical; + -o-box-orient:vertical; + box-orient:vertical; + -webkit-box-pack:center; + -moz-box-pack:center; + -ms-box-pack:center; + -o-box-pack:center; + box-pack:center; + -webkit-box-align:center; + -mox-box-align:center; + -ms-box-align:center; + -o-box-align:center; + box-align:center; + overflow:hidden; +} + +.swipeview-slider img { + display:block; + -webkit-transition-duration:.4s; + -moz-transition-duration:.4s; + -ms-transition-duration:.4s; + -o-transition-duration:.4s; + transition-duration:.4s; + -webkit-transition-property:opacity; + -moz-transition-property:opacity; + -ms-transition-property:opacity; + -o-transition-property:opacity; + transition-property:opacity; + opacity:1; + pointer-events:none; + visibility:visible; +} + +.swipeview-slider .set-container { + margin:auto; +} + +.swipeview-slider .container { + background: rgb(197, 197, 197); + float: left; + margin: 0 5px; +} + +.swipeview-slider img.loading { + visibility:hidden; +} From 4a013975cfc018595f2aefbf61668f3aec590ebe Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 25 Jun 2013 15:02:43 +0200 Subject: [PATCH 18/61] oops --- demo/gallery4/index.html | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/demo/gallery4/index.html b/demo/gallery4/index.html index 2785d69..c867ac3 100644 --- a/demo/gallery4/index.html +++ b/demo/gallery4/index.html @@ -53,7 +53,7 @@ } ]; -gallery = new VerticalSwipeView('#wrapper', { numberOfPages: slides.length }); +gallery = new VerticalSwipeView('#wrapper', { numberOfPages: slides.length, hastyPageFlip:true }); // Load initial data for (i=0; i<3; i++) { @@ -86,15 +86,6 @@ }); -gallery.onMoveOut(function () { - gallery.masterPages[gallery.currentMasterPage].className = gallery.masterPages[gallery.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); -}); - -gallery.onMoveIn(function () { - var className = gallery.masterPages[gallery.currentMasterPage].className; - /(^|\s)swipeview-active(\s|$)/.test(className) || (gallery.masterPages[gallery.currentMasterPage].className = !className ? 'swipeview-active' : className + ' swipeview-active'); -}); - From ee0107978a867f0c16f5cb7a5cb7afce8eb9e249 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 25 Jun 2013 15:06:34 +0200 Subject: [PATCH 19/61] re oops --- demo/gallery4/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/demo/gallery4/index.html b/demo/gallery4/index.html index c867ac3..1553e51 100644 --- a/demo/gallery4/index.html +++ b/demo/gallery4/index.html @@ -14,7 +14,6 @@
+ + + + + +
+ + + + diff --git a/demo/gallery5/infinitegraphset.js b/demo/gallery5/infinitegraphset.js new file mode 100644 index 0000000..e9ddffe --- /dev/null +++ b/demo/gallery5/infinitegraphset.js @@ -0,0 +1,66 @@ +/* + * infinitegraphset.js + */ +(function (win, doc) { + + function InfiniteGraphSet(id, dataO) { + var gallery = new SwipeView(id, { + hastyPageFlip:true, + numberOfPages: dataO.length + }), i, page; + + function genImgs(container, page, d) { + var img, div; + for(var i=0; i< 5; i++) { + div = doc.createElement('div'); + div.className = 'container'; + img = doc.createElement('img'); + img.className = 'loading'; + img.src = d.get(page).imgs[i]; + img.width = d.get(page).width; + img.height = d.get(page).height; + div.style.width = d.get(page).width + "px"; + div.style.height = d.get(page).height + "px"; + img.onload = function () { this.className = ''; } + div.appendChild(img); + container.appendChild(div); + } + } + + for(i=0; i<3; i++) { + page = i==0 ? dataO.length-1 : i-1; + div = doc.createElement('div'); + div.className = 'set-container'; + genImgs(div, page, dataO); + gallery.masterPages[i].appendChild(div); + } + + function setImg(el, src) { + el.className = 'loading'; + el.src = src; + el.onload = function () { this.className = ''; } + } + + gallery.onFlip(function () { + var el, + upcoming, + i; + + for (i=0; i<3; i++) { + upcoming = gallery.masterPages[i].dataset.upcomingPageIndex; + + if (upcoming != gallery.masterPages[i].dataset.pageIndex) { + els = gallery.masterPages[i].querySelectorAll('img'); + setImg(els[0], dataO.get(upcoming).imgs[0]); + setImg(els[1], dataO.get(upcoming).imgs[1]); + setImg(els[2], dataO.get(upcoming).imgs[2]); + setImg(els[3], dataO.get(upcoming).imgs[3]); + setImg(els[4], dataO.get(upcoming).imgs[4]); + } + } + }); + return gallery; + } + + win.InfiniteGraphSet = InfiniteGraphSet; +})(window, window.document); diff --git a/demo/gallery5/style.css b/demo/gallery5/style.css new file mode 100644 index 0000000..9efea9b --- /dev/null +++ b/demo/gallery5/style.css @@ -0,0 +1,89 @@ +html, body { height:100%; } +body { + padding:0; + margin:0; + background:#333; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + -o-user-select:none; + user-select:none; + -webkit-text-size-adjust:none; + -moz-text-size-adjust:none; + -ms-text-size-adjust:none; + -o-text-size-adjust:none; + text-size-adjust:none; + color:#eee; + font-family:helvetica; + font-size:12px; +} + +#wrapper { + width:100%; + height:100%; + position:relative; +} + +.wrapper { + width:1024px; + min-width:320px; + height:145px; + margin:10px auto; + border: 5px solid rgb(43, 38, 38); +} + +.swipeview-slider > div , .vertical-swipeview-slider > div{ + position:relative; + display:-webkit-box; + display:-moz-box; + display:-ms-box; + display:-o-box; + display:box; + -webkit-box-orient:vertical; + -moz-box-orient:vertical; + -ms-box-orient:vertical; + -o-box-orient:vertical; + box-orient:vertical; + -webkit-box-pack:center; + -moz-box-pack:center; + -ms-box-pack:center; + -o-box-pack:center; + box-pack:center; + -webkit-box-align:center; + -mox-box-align:center; + -ms-box-align:center; + -o-box-align:center; + box-align:center; + overflow:hidden; +} + +.swipeview-slider img { + display:block; + -webkit-transition-duration:.4s; + -moz-transition-duration:.4s; + -ms-transition-duration:.4s; + -o-transition-duration:.4s; + transition-duration:.4s; + -webkit-transition-property:opacity; + -moz-transition-property:opacity; + -ms-transition-property:opacity; + -o-transition-property:opacity; + transition-property:opacity; + opacity:1; + pointer-events:none; + visibility:visible; +} + +.swipeview-slider .set-container { + margin:auto; +} + +.swipeview-slider .container { + background: rgb(197, 197, 197); + float: left; + margin: 0 5px; +} + +.swipeview-slider img.loading { + visibility:hidden; +} From caeea2290ac11a9640906454582b1026a1c180fd Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 25 Jun 2013 17:26:37 +0200 Subject: [PATCH 22/61] wip demo5 --- demo/gallery5/index.html | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/demo/gallery5/index.html b/demo/gallery5/index.html index 5b24e2d..11e5e2c 100644 --- a/demo/gallery5/index.html +++ b/demo/gallery5/index.html @@ -79,7 +79,7 @@ } ]; -gallery = new VerticalSwipeView('#wrapper', { numberOfPages: slides.length }); +gallery = new VerticalSwipeView('#wrapper', { numberOfPages: slides.length, hastyPageFlip:true}); // Load initial data for (i=0; i<3; i++) { @@ -115,23 +115,20 @@ upcoming = gallery.masterPages[i].dataset.upcomingPageIndex; if (upcoming != gallery.masterPages[i].dataset.pageIndex) { - el = gallery.masterPages[i].querySelector('#wrap1-' + i); + els = gallery.masterPages[i].querySelectorAll('.wrapper'); + console.log(els); gallery.masterPages[i].swipeview1.destroy(); - el.innerHTML = ""; - gallery.masterPages[i].swipeview1 = null; - gallery.masterPages[i].swipeview1 = InfiniteGraphSet(el, genData(100)); - - el = gallery.masterPages[i].querySelector('#wrap2-' + i); gallery.masterPages[i].swipeview2.destroy(); - el.innerHTML = ""; - gallery.masterPages[i].swipeview2 = null; - gallery.masterPages[i].swipeview2 = InfiniteGraphSet(el, genData(100)); - - el = gallery.masterPages[i].querySelector('#wrap3-' + i); gallery.masterPages[i].swipeview3.destroy(); - el.innerHTML = ""; + els[0].innerHTML = ""; + els[1].innerHTML = ""; + els[2].innerHTML = ""; + gallery.masterPages[i].swipeview1 = null; + gallery.masterPages[i].swipeview2 = null; gallery.masterPages[i].swipeview3 = null; - gallery.masterPages[i].swipeview3 = InfiniteGraphSet(el, genData(100)); + gallery.masterPages[i].swipeview1 = InfiniteGraphSet(els[0], genData(100)); + gallery.masterPages[i].swipeview2 = InfiniteGraphSet(els[1], genData(100)); + gallery.masterPages[i].swipeview3 = InfiniteGraphSet(els[2], genData(100)); } } From 2ede772624ee481866caa91847e8d9148224351d Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Wed, 26 Jun 2013 14:51:44 +0200 Subject: [PATCH 23/61] style+ add a set of graph --- demo/gallery5/index.html | 50 +++++++++++----------------------------- demo/gallery5/style.css | 4 ++-- 2 files changed, 16 insertions(+), 38 deletions(-) diff --git a/demo/gallery5/index.html b/demo/gallery5/index.html index 11e5e2c..ba29849 100644 --- a/demo/gallery5/index.html +++ b/demo/gallery5/index.html @@ -45,45 +45,13 @@ var gallery, el, i, - page, - slides = [ - { - img: 'images/pic01.jpg', - width: 300, - height: 213 - }, - { - img: 'images/pic02.jpg', - width: 300, - height: 164 - }, - { - img: 'images/pic03.jpg', - width: 300, - height: 213 - }, - { - img: 'images/pic04.jpg', - width: 147, - height: 220 - }, - { - img: 'images/pic05.jpg', - width: 300, - height: 213 - }, - { - img: 'images/pic06.jpg', - width: 165, - height: 220 - } - ]; + page; -gallery = new VerticalSwipeView('#wrapper', { numberOfPages: slides.length, hastyPageFlip:true}); +gallery = new VerticalSwipeView('#wrapper', { numberOfPages: 100, hastyPageFlip:true}); // Load initial data for (i=0; i<3; i++) { - page = i==0 ? slides.length-1 : i-1; + page = i==0 ? 100-1 : i-1; el = document.createElement('div'); el.className = 'wrapper'; el.id = "wrap1-" + i; @@ -105,6 +73,13 @@ gallery.masterPages[i].swipeview3 = InfiniteGraphSet(el, genData(100)); gallery.masterPages[i].appendChild(el); + el = document.createElement('div'); + el.className = 'wrapper'; + el.id = "wrap4-" + i; + + gallery.masterPages[i].swipeview4 = InfiniteGraphSet(el, genData(100)); + gallery.masterPages[i].appendChild(el); + } gallery.onFlip(function () { @@ -116,19 +91,22 @@ if (upcoming != gallery.masterPages[i].dataset.pageIndex) { els = gallery.masterPages[i].querySelectorAll('.wrapper'); - console.log(els); gallery.masterPages[i].swipeview1.destroy(); gallery.masterPages[i].swipeview2.destroy(); gallery.masterPages[i].swipeview3.destroy(); + gallery.masterPages[i].swipeview4.destroy(); els[0].innerHTML = ""; els[1].innerHTML = ""; els[2].innerHTML = ""; + els[3].innerHTML = ""; gallery.masterPages[i].swipeview1 = null; gallery.masterPages[i].swipeview2 = null; gallery.masterPages[i].swipeview3 = null; + gallery.masterPages[i].swipeview4 = null; gallery.masterPages[i].swipeview1 = InfiniteGraphSet(els[0], genData(100)); gallery.masterPages[i].swipeview2 = InfiniteGraphSet(els[1], genData(100)); gallery.masterPages[i].swipeview3 = InfiniteGraphSet(els[2], genData(100)); + gallery.masterPages[i].swipeview4 = InfiniteGraphSet(els[3], genData(100)); } } diff --git a/demo/gallery5/style.css b/demo/gallery5/style.css index 9efea9b..8a119db 100644 --- a/demo/gallery5/style.css +++ b/demo/gallery5/style.css @@ -28,8 +28,8 @@ body { width:1024px; min-width:320px; height:145px; - margin:10px auto; - border: 5px solid rgb(43, 38, 38); + margin:20px auto; + background-color: rgb(43, 38, 38); } .swipeview-slider > div , .vertical-swipeview-slider > div{ From c91e827ae587ff65338b18c4fb8d862e93db6178 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Wed, 26 Jun 2013 14:51:44 +0200 Subject: [PATCH 24/61] style+ add a set of graph --- demo/gallery5/index.html | 50 +++++++++++----------------------------- demo/gallery5/style.css | 4 ++-- 2 files changed, 16 insertions(+), 38 deletions(-) diff --git a/demo/gallery5/index.html b/demo/gallery5/index.html index 11e5e2c..ba29849 100644 --- a/demo/gallery5/index.html +++ b/demo/gallery5/index.html @@ -45,45 +45,13 @@ var gallery, el, i, - page, - slides = [ - { - img: 'images/pic01.jpg', - width: 300, - height: 213 - }, - { - img: 'images/pic02.jpg', - width: 300, - height: 164 - }, - { - img: 'images/pic03.jpg', - width: 300, - height: 213 - }, - { - img: 'images/pic04.jpg', - width: 147, - height: 220 - }, - { - img: 'images/pic05.jpg', - width: 300, - height: 213 - }, - { - img: 'images/pic06.jpg', - width: 165, - height: 220 - } - ]; + page; -gallery = new VerticalSwipeView('#wrapper', { numberOfPages: slides.length, hastyPageFlip:true}); +gallery = new VerticalSwipeView('#wrapper', { numberOfPages: 100, hastyPageFlip:true}); // Load initial data for (i=0; i<3; i++) { - page = i==0 ? slides.length-1 : i-1; + page = i==0 ? 100-1 : i-1; el = document.createElement('div'); el.className = 'wrapper'; el.id = "wrap1-" + i; @@ -105,6 +73,13 @@ gallery.masterPages[i].swipeview3 = InfiniteGraphSet(el, genData(100)); gallery.masterPages[i].appendChild(el); + el = document.createElement('div'); + el.className = 'wrapper'; + el.id = "wrap4-" + i; + + gallery.masterPages[i].swipeview4 = InfiniteGraphSet(el, genData(100)); + gallery.masterPages[i].appendChild(el); + } gallery.onFlip(function () { @@ -116,19 +91,22 @@ if (upcoming != gallery.masterPages[i].dataset.pageIndex) { els = gallery.masterPages[i].querySelectorAll('.wrapper'); - console.log(els); gallery.masterPages[i].swipeview1.destroy(); gallery.masterPages[i].swipeview2.destroy(); gallery.masterPages[i].swipeview3.destroy(); + gallery.masterPages[i].swipeview4.destroy(); els[0].innerHTML = ""; els[1].innerHTML = ""; els[2].innerHTML = ""; + els[3].innerHTML = ""; gallery.masterPages[i].swipeview1 = null; gallery.masterPages[i].swipeview2 = null; gallery.masterPages[i].swipeview3 = null; + gallery.masterPages[i].swipeview4 = null; gallery.masterPages[i].swipeview1 = InfiniteGraphSet(els[0], genData(100)); gallery.masterPages[i].swipeview2 = InfiniteGraphSet(els[1], genData(100)); gallery.masterPages[i].swipeview3 = InfiniteGraphSet(els[2], genData(100)); + gallery.masterPages[i].swipeview4 = InfiniteGraphSet(els[3], genData(100)); } } diff --git a/demo/gallery5/style.css b/demo/gallery5/style.css index 9efea9b..8a119db 100644 --- a/demo/gallery5/style.css +++ b/demo/gallery5/style.css @@ -28,8 +28,8 @@ body { width:1024px; min-width:320px; height:145px; - margin:10px auto; - border: 5px solid rgb(43, 38, 38); + margin:20px auto; + background-color: rgb(43, 38, 38); } .swipeview-slider > div , .vertical-swipeview-slider > div{ From 639b8740477fd934fd2e3c50a474975754e47d8e Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Wed, 26 Jun 2013 16:57:07 +0200 Subject: [PATCH 25/61] add reset method to allow reuse of a SwipeView --- src/swipeview.js | 11 +++++++++-- src/verticalswipeview.js | 8 +++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 9e6f662..1b4e571 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -63,7 +63,7 @@ var SwipeView = (function (window, document) { pageIndex; this.wrapper = typeof el == 'string' ? document.querySelector(el) : el; - this.id = this.wrapper.id || ++uuid; + this.id = this.wrapper.id || 'sw-id' + (++uuid); this.options = { text: null, numberOfPages: 3, @@ -124,7 +124,13 @@ var SwipeView = (function (window, document) { page: 0, pageIndex: 0, customEvents: [], - + + reset : function (pageCount) { + this.goToPage(0); + this.updatePageCount(); + this.refreshSize(pageCount); + }, + onFlip: function (fn) { this.wrapper.addEventListener(this.id + 'swipeview-flip', fn, false); this.customEvents.push(['flip', fn]); @@ -164,6 +170,7 @@ var SwipeView = (function (window, document) { }, refreshSize: function () { + // FIXME, get container width/height if wrapper width/height equals 0 this.wrapperWidth = this.wrapper.clientWidth === 0 ? 1024 : this.wrapper.clientWidth; this.wrapperHeight = this.wrapper.clientHeight === 0 ? 145 : this.wrapper.clientHeight; this.pageWidth = this.wrapperWidth; diff --git a/src/verticalswipeview.js b/src/verticalswipeview.js index db169ad..22399e7 100644 --- a/src/verticalswipeview.js +++ b/src/verticalswipeview.js @@ -125,7 +125,13 @@ var VerticalSwipeView = (function (window, document) { page: 0, pageIndex: 0, customEvents: [], - + + reset : function (pageCount) { + this.goToPage(0); + this.updatePageCount(pageCount); + this.refreshSize(); + }, + onFlip: function (fn) { this.wrapper.addEventListener(this.id + 'vertical-swipeview-flip', fn, false); this.customEvents.push(['flip', fn]); From 6ea5bd3c7b9dcc2c3a3e9e6a0ae97c658406e3b4 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Wed, 26 Jun 2013 16:58:30 +0200 Subject: [PATCH 26/61] wip vertical/horizontal infinite scroll with reusing swipeviews --- demo/gallery6/imgs/1.png | Bin 0 -> 3597 bytes demo/gallery6/imgs/10.png | Bin 0 -> 11155 bytes demo/gallery6/imgs/11.png | Bin 0 -> 4436 bytes demo/gallery6/imgs/12.png | Bin 0 -> 9914 bytes demo/gallery6/imgs/2.png | Bin 0 -> 8627 bytes demo/gallery6/imgs/3.png | Bin 0 -> 9913 bytes demo/gallery6/imgs/4.png | Bin 0 -> 6120 bytes demo/gallery6/imgs/5.png | Bin 0 -> 8915 bytes demo/gallery6/imgs/6.png | Bin 0 -> 10941 bytes demo/gallery6/imgs/7.png | Bin 0 -> 6251 bytes demo/gallery6/imgs/8.png | Bin 0 -> 11073 bytes demo/gallery6/imgs/9.png | Bin 0 -> 10888 bytes demo/gallery6/index.html | 138 ++++++++++++++++++++++++++++++ demo/gallery6/infinitegraphset.js | 86 +++++++++++++++++++ demo/gallery6/style.css | 89 +++++++++++++++++++ 15 files changed, 313 insertions(+) create mode 100644 demo/gallery6/imgs/1.png create mode 100644 demo/gallery6/imgs/10.png create mode 100644 demo/gallery6/imgs/11.png create mode 100644 demo/gallery6/imgs/12.png create mode 100644 demo/gallery6/imgs/2.png create mode 100644 demo/gallery6/imgs/3.png create mode 100644 demo/gallery6/imgs/4.png create mode 100644 demo/gallery6/imgs/5.png create mode 100644 demo/gallery6/imgs/6.png create mode 100644 demo/gallery6/imgs/7.png create mode 100644 demo/gallery6/imgs/8.png create mode 100644 demo/gallery6/imgs/9.png create mode 100644 demo/gallery6/index.html create mode 100644 demo/gallery6/infinitegraphset.js create mode 100644 demo/gallery6/style.css diff --git a/demo/gallery6/imgs/1.png b/demo/gallery6/imgs/1.png new file mode 100644 index 0000000000000000000000000000000000000000..d167e8d447348a72d8627a23fa8de755881791cf GIT binary patch literal 3597 zcmd^>={pqe_s54ATQX%|BFv;@$u48djCB~YFEJtOU{XVjHTzN|B-HpAWXqP2WvJ|1 z43&M0!GwsB$@-l?;`i+L;6AT&od@T>&bi*_TqoHAX~@Yg#0~%eIE{_qmUOnzUj!?V zZh4nOPXGWWun!DoVGM&^v3Q8_^zrim0MswW+bm#ata-GPF_y)AI#=us6H~ftY^uim_c{y9G8)%I4968Z0hf)55`uB z(iO%=Ve4I7;#aqrZI)Vt-K4C#?(QEB-deb|23>QRfoq|B8uA2fl3rF;zZn5%XO{A1 z;muOU>c1h*eXFD(WitkcFUfu8J@~q@bUB4}a4X~YDe|vm2QGD%lq_NXDS-EKgdpww zouO~&Mg&g>%Ms0|2{^kavNNvA#8}Cg6Y=^|2&q>}3n{L{mNqKA!CS@J2Gneu^ptOM zMV%Aq%UrSv5N?t1%&4z=;rei7Nj^QWN#Tr3E%vqbBBsA?-?9v;(BQzG!~BJ9us)#bORtMeT0aGWUSLS54PuKTxUf5{RXywDO{ zC^*Px(nF$LjjHm*d0m{IWNyXtPd_i18{5PJ1wtov+BD=>fg&@`-z?o4i#{2y!{L%h zK3TW#8lNvPvp@9L;FTVaxVFF7W*%hCr-8KCJ=Tr5 zmUQRq)V9#!aQbONUM=DVRnmM^LD^}G`w9!UcaYkcb}1UIvw1;t0N6_Vy48+GV~+#( zp3SBD_o~(g^f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al 0 HcmV?d00001 diff --git a/demo/gallery6/imgs/11.png b/demo/gallery6/imgs/11.png new file mode 100644 index 0000000000000000000000000000000000000000..4a895e9306e513a4a83d673ec94d246b60d2268c GIT binary patch literal 4436 zcmeH~={pn-)P`q<89SAInPklpm0|2l*(pLu8lti`l*T#+p@bqoOPR6n!q|5P$!?gj z8`%jl$e#7>+xrK+U*8YsKKJKyJ=b$xC-Q-bJ_{osBLDzkF*MLI|F;|d4Tc`_kDQDC zX8-`LsH?X214C`?YY)6Uom^kO005LOzq6e6oO;Ni5$S23!=-uck$yx}N2#TSZ9P9< zNhicGK9_35mAf_}CAy@d7+J_qH?>yt%@qAs5poLDnxtVfP!nQ-IHD&HTB{5#BBZ_< z8lYEyunCD%!ItxlK91KdemvPf?o*ysUQu1Ko6=FYcdf?qT7F0>!lw?3CdTJ;C8XVt z8mb&IrWq+(Gm(kwBVLhh<2)Q#pNB@#_fg|E&rJ?QS^}bfk|TvpTRk|T7~Ughv;GnH z8e@(Yx|1W9EvN|e1(R~ckKA=#-9$)}A%-Ni&RIg=1W{|6aJpIRU{Ax- z9Y1gB!QUY46jxdDpM%%n{LR?cwYM+WWO3em8;Gz+Cn>r0&+6DBXQU4v5+XIntM>%9 zjmzvy>kS=(!AG&jLxCVaL9@NW|1hYT6@7dA5{?Zy*mCtnl#LfFQT7ajVyf3!? zwOd4K+}rs|We#`9meo{RV7UYVB(O9A}ot*$JpB417CQDg2&pJF`daJtJ=kOOClQ+zb6Rxu{QW*^7e5V zb&}V_gG-zOoG()*z>R6#l+WqYLmMavkN<>blgiCs5P>Pgh`D1;cB}rXj*f^4myF|R zp^<9NgEYB>AI*AjH8HvF@OSNf4!4C(hpxPw_E(Nw>r~Hwo z#U$`l(6Msk7QZulPMP8aZiC*qO{I+$%;<$w;glN2NbK)6nR-9uQZae3bE<`r_+U0L zxy5%(j6HvkEi;zh6EP*-mbay{U!!Ap@m3tt$ai6Q$)cr$}><>eGOzq|DxJpYIHQB2e`wz+o|#bC` z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V5B%Kcq7=H^(9+mryJ zv_{s#ZW(~;?w)qAo09+B4EAQLk~CLr$L#mkfuM@9Q{d>RWhRft^LNM@2irTo&$@C% znQw18iJK|gQpb~Fi$Pz;(|~HSAga$f#=f47)5JCQMrfM`%$_t@J}!CH_oMvnseMj>ibT7pgudUyBZF zttoS~p|YDD4ZpWWsnu4sL)4cssx6q6>duxTwA4-hmw?sI>>Hpm5UAnl)9`=13^)D^ zYPj|P{=auPhU1Ka0F?Ef%w6FABK^K6~~o zmq5^vdUfDcbcA)T?6S&e=Y6hi-e=eltZ4$Yn<->}4CO+FTos{X9ePW?T%j;3-pX*T z8JmTM6|?*YTp#^_u*PN1n+0sl6i`iP4?vakL-X4IV Mu89u*?$gl!0kv>z#Q*>R literal 0 HcmV?d00001 diff --git a/demo/gallery6/imgs/12.png b/demo/gallery6/imgs/12.png new file mode 100644 index 0000000000000000000000000000000000000000..f67b51b9361cfb6d16332822c4ea93644b7f7e21 GIT binary patch literal 9914 zcmV;rCPmqaP)4Tx05}naRo`#hR1`jmZ&IWdKOk5~hl<6oRa0BJ8yc;~21%2p?MfD<>DVeH z9(p*dx19w`~g7O0}n_%Aq@s%d)fBDv`JHkDym6Hd+5XuAtvnwRpGmK zVkc9?T=n|PIo~X-eVh__(Z?q}P9Z-Dj?gOW6|D%o20XmjW-qs4UjrD(li^iv8@eK9k+ZFm zVRFymFOPAzG5-%Pn|1W;U4vNroTa&AxDScmEA~{ri9gr1^c?U@uwSpaNnw8l_>cP1 zd;)kMQS_;jeRSUEM_*s96y65j1$)tOrwdK{YIQMt92l|D^(E_=$Rjw{b!QT@q!)ni zR`|5oW9X5n$Wv+HVc@|^eX5yXnsHX8PF3UX~a6)MwxDE0HaPjyrlI!;jX{6Kvuh*8ej?;85ekN$?5uuCiS zBTvvVG+XTxAO{m@bvM#Jr)z6J><&E22D|vq?Y?Vkbo_DijopiF$2PET#mZ8eu=y$(ArYkv7@Ex`GL?QCc!_*KFrd&;n1r7 zqW-CFs9&fT)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imgs/2.png new file mode 100644 index 0000000000000000000000000000000000000000..46b1fb8117486cae1a745c74c92f3cae3ea1aa6b GIT binary patch literal 8627 zcmV;kAxz$hP)4Tx05}naRo`#hR1`jmZ&IWdKOk5~hl<6oRa0BJ8yc;~21%2p?MfD<>DVeH z9(p*dx19w`~g7O0}n_%Aq@s%d)fBDv`JHkDym6Hd+5XuAtvnwRpGmK zVkc9?T=n|PIo~X-eVh__(Z?q}P9Z-Dj?gOW6|D%o20XmjW-qs4UjrD(li^iv8@eK9k+ZFm zVRFymFOPAzG5-%Pn|1W;U4vNroTa&AxDScmEA~{ri9gr1^c?U@uwSpaNnw8l_>cP1 zd;)kMQS_;jeRSUEM_*s96y65j1$)tOrwdK{YIQMt92l|D^(E_=$Rjw{b!QT@q!)ni zR`|5oW9X5n$Wv+HVc@|^eX5yXnsHX8PF3UX~a6)MwxDE0HaPjyrlI!;jX{6Kvuh*8ej?;85ekN$?5uuCiS zBTvvVG+XTxAO{m@bvM#Jr)z6J><&E22D|vq?Y?Vkbo_DijopiF$2PET#mZ8eu=y$(ArYkv7@Ex`GL?QCc!_*KFrd&;n1r7 zqW-CFs9&fT)ZaU5gc&=gBz-DaCw(vdOp0__x+47~U6sC(E(JNe@4cTT*n6*E zVH4eoU1-&7pEV~_PRe`a7v+@vy!^5}8?Y3)UmlaER00009a7bBm000XU000XU0RWnu7ytkrHAzH4RCodH zT?u$q)wNzpZf=r$GfyOh2*@N6K`clW0R;u2P_0@^wS#S6zxUejz1MzyueCn4k5Z>v zwS#?~tX8eop^j9P(#q(7h=3FXL1hSpj5l*`=Dh#k=kA-Eo12?Jg(T~adFbn*eI^l)Kp1JOX~)D zmtCr9>fv+_bP0g&a!D+}?&@f7m-fJBB)Zd~VXyjAqH`m@UC>vA3JXDQfNrmbHnr)- zb*y5B(ajAeY|a4-=r*sUsh;700lL9}BRF7y?uceKl{7#%7;pp!4A33X%%+kC=mrCh z;D78w@yt0|w}hXl7GM19XD{M{vLZ-4V@fDrtaj zF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&OOu#bJ`DL=GISm6Y^M@z?vn7QU`~OLWaIN;f}NZe#o?llI$7Wr>j#tT}qTv|J@) zitu97Y_Qed)<9=VF&wkF_^@iUB;+Blhx#3192(N7)?^Vo1D&)uYf7NoMRg&t>DcBp zvNg~NPU_@`4<1zQYUNJsuZcAXx_abS>F=)Lbl&T+(ojcxs|~064CGnu3v`Gs4n&zw z;^4uL6ffG_U_TE8B@aYG59FGGFnK6l)6o@bX>o?dh5WZI&?%SWpldf^2J~u)m%c4lQ#ZgTcC5$Me7MyfjeAIlVY=2$(?Q7nkQJb_70@LJHdN~>*cluIvWJq zXmCK8mtTMkSy%#vJ;33_WJ<+Hk14lhr*OlzK<7Y`%cJCv8Y7QB`Y0OJ1!cx5%^JNY z)4a-MW(r0XB9~;FZA_=pYHf3%w@W4>gz^#PZzOq77*G%}MVzcX+IbeVuWQF-+XAT&k+qrd3 z-GUr2Ko7FQe6ceJ6wr+yh@G3*)QueI;R0X)Z$M!;4iMAaTwJZeh1@43r#Sf7tuak~ zB6C0i9M}fP#Z`}tO+3IjLId>33^PZECkKdY3UaRX`u}>`_0_lsN4o$3002ovPDHLk FV1mn~lU4u# literal 0 HcmV?d00001 diff --git a/demo/gallery6/imgs/3.png b/demo/gallery6/imgs/3.png new file mode 100644 index 0000000000000000000000000000000000000000..d7e90e5ea838f550edf5ae1c06f93fb4cfcd99ad GIT binary patch literal 9913 zcmV;qCPvwbP)4Tx05}naRo`#hR1`jmZ&IWdKOk5~hl<6oRa0BJ8yc;~21%2p?MfD<>DVeH z9(p*dx19w`~g7O0}n_%Aq@s%d)fBDv`JHkDym6Hd+5XuAtvnwRpGmK zVkc9?T=n|PIo~X-eVh__(Z?q}P9Z-Dj?gOW6|D%o20XmjW-qs4UjrD(li^iv8@eK9k+ZFm zVRFymFOPAzG5-%Pn|1W;U4vNroTa&AxDScmEA~{ri9gr1^c?U@uwSpaNnw8l_>cP1 zd;)kMQS_;jeRSUEM_*s96y65j1$)tOrwdK{YIQMt92l|D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biqIO0v(OZ$`iEA7`^tz)w1fbf7K@EGaeK({F(k0_6mn4*O-%rpH2yifNrS}!xwH8nL!)u~E31=T5%H~@75p^8d*b__n- z#7cM02f(4`n87GR($W0LPDA?7Z+u%mbn}gxP=IeTw}G5Ia5c~!2Eeok*MJlNW#jtS zw(U;rgTgKNEom1-Q7FoCr|!Zo`30Og+V$bFnvLqp)RyQ`jR+cbxev*LS6pG@}6F+ z3H9GpNMcHP0?U9a^3!w>-jm2L&iA>J0ai-wHmHH#K6 zm4_aDKo-uQi~AtHdz^V)ntF}Yrv-Y5(*|U;i`QW)ech|C$S|(LrJ`b=Y&5;lZR#c zA+3YGgJ`T9l7}C8SZ@2!t;n%dqUFUSdOMqQH~0M~-&|>RiQ3cz9X1~ZjkKs7KDb|A ze|?=i|NLs%ckoE>CB?-h01j5%!>-xNP%IrP z5(l01L2qmCllpgj>=Sb9EgzKmNa*WDr=rRed0%rMw|!cmM`>|dS}08!kv0g6$iV~q zW%Hl@Bhegaf*u{NoFu)AIdr8?u zS$6&Pa@AE!WbT{`B{wHqXFOR3b~sB82Q1KIAt5B)sctZdE&+ey#BtfRbEjK54t`jDVeM0NvbCN9@==3k+kO1yao81L_M8v49AqHyL$g+uu+lKgTnFAL z7T~cNYbAPY-t;?S08cQb!0&_rqv@}ur3F**HL!!9LbBRQIeGFVTnSF=ayBN-s>5<0d&4%Ix6BCD-K`r-N zJ^ajD(*k{%JPQYxX0v0`s}SgTER)h18Mwnc2X9TVh7*tXBOG^hdFb@$5DX~P*4F7< z$7^xE1$RG=y{{h@=lx6iX27%2|)n=rC~ zA1Sum=Zq8wh-q$EKj6{jMtrcH-5V+P+vkh~2NdA&IOQT4FT*Zy2VFod&_{y(_8B9^ h0pgm1ycyw0{vQp*oF7--gR}qu002ovPDHLkV1ii%E6o4^ literal 0 HcmV?d00001 diff --git a/demo/gallery6/imgs/6.png b/demo/gallery6/imgs/6.png new file mode 100644 index 0000000000000000000000000000000000000000..55114b694cb6c401a6fb9054b1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-l|UVd(?me9PTc-{Y`8gmVq&V_8AV)d(@Nj=OC{E f;+l+{K6Cyb6_-DE2lKoe00000NkvXXu0mjfuZ2C) literal 0 HcmV?d00001 diff --git a/demo/gallery6/imgs/7.png b/demo/gallery6/imgs/7.png new file mode 100644 index 0000000000000000000000000000000000000000..8fe30ca6434655151295d35b925b56b40eb7e722 GIT binary patch literal 6251 zcmcIolfB_S3T)^m^|P~&lIdTda9+{YfU=6i>Q^_104 zPEHLZC&#Gf?qY4{XoZC(`XWqw$z@K9QaaK_BcDo!QBUD}RBySqreWi&m!-dPK`_L= z5*1>5hKqGwTqLsS72e!-T`|}{NCfv5`@_E{q>7SE&vDKD|6O#{fHc2z6@wK0w|YpK z*!Q1luQYp`b7=M$onH@$Es1SPY?{mgrA+N=(`mIMl96RuW2{NA0;f=}BjpOy@Y!9iw^L~;vkHm5be|_T;cq? zt_w3$UdeOoq=6&x#V;y3cksx&i@=A4Udjl2lI{7f%d-CXtj26*9%APzXq<(;Q>I^f zc%pG-y!ak|U*ue9T1Y*$Bw-&)EAfjJ$_3@V8}h zthQIF_2)T$N+U?hhMR@^_qSGWDAJQke=Z01OGCK-_skhffwxg6IyuTmJUfa*G4e1P z+|#!zfK#8{f-%9cSNwW%eh;H~CoaD1^!77bzrbpixSNjr8KGy!_=s@;?h*+cg!KL+ zJP6SJS6*EHh5$0yz;8UQ@EtHB2pB_i3V&^A?TXH0Z3|(J-TJtA(kxg zC9$hxYgkAD-6uP5e>od|qzc&(fJftLH!GV{=~YwyXzkq2%`Mh!HFL#%cRFcb><^kK?MMG z?t7DxOIap5E6EJUe!vHMA_0v+Z->Bl5nnLvik{V)-FkO6k)sc3OF9#}9fU+MqX_4c zpyWm36LH-jrlv;Mu4Q~%pok9#!aw*MnX%{>!l$8Izi6zt^Zy?g)5K)1^FI?Y_^C{x z6O_QQktBvPjNo@dMpe&6{LRmDo=pCbCilb^RNy(Wisx&|jFBk5OGxY;-mY2w+;f?q z$J=zf#5U5EU+#miT&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gw(f1KyYG|F|443wj`Jt)zUO=WQkO_#21? Ml2-+m$$km`Kir`*PXGV_ literal 0 HcmV?d00001 diff --git a/demo/gallery6/imgs/8.png b/demo/gallery6/imgs/8.png new file mode 100644 index 0000000000000000000000000000000000000000..e57c754d6cfd60f13b5c94d745557bf12bcc4f1f GIT binary patch literal 11073 zcmV-HE56i;P)4Tx05}naRo`#hR1`jmZ&IWdKOk5~hl<6oRa0BJ8yc;~21%2p?MfD<>DVeH z9(p*dx19w`~g7O0}n_%Aq@s%d)fBDv`JHkDym6Hd+5XuAtvnwRpGmK zVkc9?T=n|PIo~X-eVh__(Z?q}P9Z-Dj?gOW6|D%o20XmjW-qs4UjrD(li^iv8@eK9k+ZFm zVRFymFOPAzG5-%Pn|1W;U4vNroTa&AxDScmEA~{ri9gr1^c?U@uwSpaNnw8l_>cP1 zd;)kMQS_;jeRSUEM_*s96y65j1$)tOrwdK{YIQMt92l|D^(E_=$Rjw{b!QT@q!)ni zR`|5oW9X5n$Wv+HVc@|^eX5yXnsHX8PF3UX~a6)MwxDE0HaPjyrlI!;jX{6Kvuh*8ej?;85ekN$?5uuCiS zBTvvVG+XTxAO{m@bvM#Jr)z6J><&E22D|vq?Y?Vkbo_DijopiF$2PET#mZ8eu=y$(ArYkv7@Ex`GL?QCc!_*KFrd&;n1r7 zqW-CFs9&fT)ZaU5gc&=gBz-DaCw(vdOp0__x+47~U6sC(E(JNe@4cTT*n6*E zVH4eoU1-&7pEV~_PRe`a7v+@vy!^5}8?Y3)UmlaER00009a7bBm000XU000XU0RWnu7ytk!!%0LzRCodH zT?u$q)wN!k=bMBiB+L+I1Q|pqI3Z%Kidbi@R4rOtYwhsbe)?V=kk(>(4$nS)trm;c zYAcE;h=Nu{1O*jAWelJo0vXAin>p|Q*SR}6gnMrS5)$q?J2}HWXYYOX+56w?tiATy zYlSUezPu?hF;N;C8YC<%Ox)nsK&aF}Q&W>fMnp(OWu-)VJRV6-PHq8uQ>eVA`yNiO zfhGaaBO@goV2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G$ z>y(Of+|a&xDtne8dF}$e9nGqs1Q=;WfEtUmUQ3Av-6L*;Eyr!!w#wEmTjYz~Uj@yL z>=4HQq{xS{Cg=pTpV*cIUQcS8j2$ytMvNFC!-oyWim5@;vuBoijjqF&gzjaSw>|%$ zg>uME7wAXO(1r>}0H_2#wFC+J61Y{#hi{+*`}fN}xJulQ$sRh!J#ZiwzxP6pZB0HM z!J{;4{{h(maZhzW!((rlo9or9m;O$}1QbQ0l=K+iMlQeu*RUPvU2lz8;Bt4$9W$V# z2Bf#%@+M8{%*76w@G?De3UlyU}v!BVbVBd zxf|=Gqk;?cV^FgOkp8l2P09Vm;k96S1WMyxZ+{KAKyQCt9aT&M*bSXu1D3$H^UL9u zz^#D}tpOM49a_C^=3S)*T%dQAmT=3_p*7$Fy+fu2XA(xF#W|sgVB%H~h^1^wUGJ00000NkvXX Hu0mjfgoH|E literal 0 HcmV?d00001 diff --git a/demo/gallery6/imgs/9.png b/demo/gallery6/imgs/9.png new file mode 100644 index 0000000000000000000000000000000000000000..0362b54b57e24776272b92ec0163d86a727f18ae GIT binary patch literal 10888 zcmV;3DtFb1P)4Tx05}naRo`#hR1`jmZ&IWdKOk5~hl<6oRa0BJ8yc;~21%2p?MfD<>DVeH z9(p*dx19w`~g7O0}n_%Aq@s%d)fBDv`JHkDym6Hd+5XuAtvnwRpGmK zVkc9?T=n|PIo~X-eVh__(Z?q}P9Z-Dj?gOW6|D%o20XmjW-qs4UjrD(li^iv8@eK9k+ZFm zVRFymFOPAzG5-%Pn|1W;U4vNroTa&AxDScmEA~{ri9gr1^c?U@uwSpaNnw8l_>cP1 zd;)kMQS_;jeRSUEM_*s96y65j1$)tOrwdK{YIQMt92l|D^(E_=$Rjw{b!QT@q!)ni zR`|5oW9X5n$Wv+HVc@|^eX5yXnsHX8PF3UX~a6)MwxDE0HaPjyrlI!;jX{6Kvuh*8ej?;85ekN$?5uuCiS zBTvvVG+XTxAO{m@bvM#Jr)z6J><&E22D|vq?Y?Vkbo_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bc+jee}TC`2kdmx5?Jx%nv~aDv3BUGXPg7T#>h>xe-7{zOEPRkGSRu? zT0zz{XFt#Yc#04zV4#^^ z^8nGDzy3v*F1KdZXF`Y;MO_1DSKm>P$c<%%ozLJo26 zxXx%`IS_aRBsp{5wr}OtS6-3Fo_xA1SOyvZjlbxgnX6jZ$pD}C2u!B6BV>wY>@&OYl**>A)!0K5tRhZ^)UDLMDZ`f#k)C0MnyK)4a? z)Mc+)`Gw4XXTH2L_cdE^k7N(ZP-O~bX?84|{Dxn)Ks$X(8+ZbnqoQnh6(vQ|(%n6f zA73~_PCxxLnTifCzZ{lLy``$$>4%1SL>K5GDwtfEK2zw`s;aVF)~sGFOR-AaVz`dZ z-LkbutVGNwHGUFVpybH*jcEmPd2(=W{kOg>vghv?Ycfvu>PV$ zQV&Khjd;Q|E&aK*>RqS=MvWOKQx7^w4uD6k113!r>gN-%fR{QPMF*GMK2Y`#m6p@* zyFlL#1dtn(*s0|5DwLILp+@AAi~0Hal9!h!1qB7z3U$gIjj4(;!nz|gZ1@N@Cm1?( zDBMI3({1?h;gXXx2!lb%+ECbGCCDi=nWYnVv4RUME0Y z;S{xT*mIOC9mTV?@NOGc_%k*=d@6hD zfxc_Xu}3O_oV>@M?!|zVfUArhkYaZqx~EIP1^S*Yarb!xQUWf}2c+2DhwkYTaDl$3 zOWb|lfRum>^Z_Y$_n~{b1YDr+=@NIJHy|aTKo6zw9grNk4|PjmHJ@iz?8?@VSfxe4N+D&diOMtj0 eBd^00$o~h|I>I!iU1q!h0000 + + + + + + + SwipeView + + + + + + + +

+ + + + diff --git a/demo/gallery6/infinitegraphset.js b/demo/gallery6/infinitegraphset.js new file mode 100644 index 0000000..cc869bb --- /dev/null +++ b/demo/gallery6/infinitegraphset.js @@ -0,0 +1,86 @@ +/* + * infinitegraphset.js + */ +(function (win, doc) { + + function InfiniteGraphSet(id, dataO) { + var gallery = new SwipeView(id, { + hastyPageFlip:true, + numberOfPages: dataO.length + }), i, page, df = dataO; + + function genImgs(container, page, d) { + var img, div; + for(var i=0; i< 5; i++) { + div = doc.createElement('div'); + div.className = 'container'; + img = doc.createElement('img'); + img.className = 'loading'; + img.src = d.get(page).imgs[i]; + img.width = d.get(page).width; + img.height = d.get(page).height; + div.style.width = d.get(page).width + "px"; + div.style.height = d.get(page).height + "px"; + img.onload = function () { this.className = ''; } + div.appendChild(img); + container.appendChild(div); + } + } + + for(i=0; i<3; i++) { + page = i==0 ? df.length-1 : i-1; + div = doc.createElement('div'); + div.className = 'set-container'; + genImgs(div, page, df); + gallery.masterPages[i].appendChild(div); + } + + function setImg(el, src) { + el.className = 'loading'; + el.src = src; + el.onload = function () { this.className = ''; } + } + + function init(newdf) { + df = newdf; + var el, page, i; + for (i=0; i<3; i++) { + page = i==0 ? newdf.length-1 : i-1; + els = gallery.masterPages[i].querySelectorAll('img'); + setImg(els[0], newdf.get(page).imgs[0]); + setImg(els[1], newdf.get(page).imgs[1]); + setImg(els[2], newdf.get(page).imgs[2]); + setImg(els[3], newdf.get(page).imgs[3]); + setImg(els[4], newdf.get(page).imgs[4]); + } + } + + gallery.onFlip(function () { + var els, + upcoming, + i; + + for (i=0; i<3; i++) { + upcoming = gallery.masterPages[i].dataset.upcomingPageIndex; + + if (upcoming != gallery.masterPages[i].dataset.pageIndex) { + els = gallery.masterPages[i].querySelectorAll('img'); + setImg(els[0], df.get(upcoming).imgs[0]); + setImg(els[1], df.get(upcoming).imgs[1]); + setImg(els[2], df.get(upcoming).imgs[2]); + setImg(els[3], df.get(upcoming).imgs[3]); + setImg(els[4], df.get(upcoming).imgs[4]); + } + } + }); + return { + gallery: gallery, + reset:function (newdf) { + gallery.reset(); + init(newdf); + } + }; + } + + win.InfiniteGraphSet = InfiniteGraphSet; +})(window, window.document); diff --git a/demo/gallery6/style.css b/demo/gallery6/style.css new file mode 100644 index 0000000..8a119db --- /dev/null +++ b/demo/gallery6/style.css @@ -0,0 +1,89 @@ +html, body { height:100%; } +body { + padding:0; + margin:0; + background:#333; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + -o-user-select:none; + user-select:none; + -webkit-text-size-adjust:none; + -moz-text-size-adjust:none; + -ms-text-size-adjust:none; + -o-text-size-adjust:none; + text-size-adjust:none; + color:#eee; + font-family:helvetica; + font-size:12px; +} + +#wrapper { + width:100%; + height:100%; + position:relative; +} + +.wrapper { + width:1024px; + min-width:320px; + height:145px; + margin:20px auto; + background-color: rgb(43, 38, 38); +} + +.swipeview-slider > div , .vertical-swipeview-slider > div{ + position:relative; + display:-webkit-box; + display:-moz-box; + display:-ms-box; + display:-o-box; + display:box; + -webkit-box-orient:vertical; + -moz-box-orient:vertical; + -ms-box-orient:vertical; + -o-box-orient:vertical; + box-orient:vertical; + -webkit-box-pack:center; + -moz-box-pack:center; + -ms-box-pack:center; + -o-box-pack:center; + box-pack:center; + -webkit-box-align:center; + -mox-box-align:center; + -ms-box-align:center; + -o-box-align:center; + box-align:center; + overflow:hidden; +} + +.swipeview-slider img { + display:block; + -webkit-transition-duration:.4s; + -moz-transition-duration:.4s; + -ms-transition-duration:.4s; + -o-transition-duration:.4s; + transition-duration:.4s; + -webkit-transition-property:opacity; + -moz-transition-property:opacity; + -ms-transition-property:opacity; + -o-transition-property:opacity; + transition-property:opacity; + opacity:1; + pointer-events:none; + visibility:visible; +} + +.swipeview-slider .set-container { + margin:auto; +} + +.swipeview-slider .container { + background: rgb(197, 197, 197); + float: left; + margin: 0 5px; +} + +.swipeview-slider img.loading { + visibility:hidden; +} From 6e290f58b9819e9102cdc982f72a4015c7a79de9 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Thu, 27 Jun 2013 15:51:07 +0200 Subject: [PATCH 27/61] fix mouse out issues --- src/swipeview.js | 5 ++++- src/verticalswipeview.js | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 1b4e571..d5f0034 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -259,8 +259,11 @@ var SwipeView = (function (window, document) { case moveEvent: this.__move(e); break; - case cancelEvent: case "mouseout": + if (!this.initiated) { break; } + else if ( e.toElement == document.childNodes[1]) { } + else if ( e.toElement != this.wrapper.parentNode ) { break; } + case cancelEvent: case endEvent: this.__end(e); break; diff --git a/src/verticalswipeview.js b/src/verticalswipeview.js index 22399e7..8a852b3 100644 --- a/src/verticalswipeview.js +++ b/src/verticalswipeview.js @@ -259,8 +259,11 @@ var VerticalSwipeView = (function (window, document) { case moveEvent: this.__move(e); break; - case cancelEvent: - case "mouseout": + case "mouseout": + if (!this.initiated) { break; } + else if ( e.toElement == document.childNodes[1]) { } + else if ( e.toElement != this.wrapper.parentNode ) { break; } + case cancelEvent: case endEvent: this.__end(e); break; From 6343c9b5f3c3cf3f97aa180ada69f6b4683b76ff Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Thu, 27 Jun 2013 15:51:07 +0200 Subject: [PATCH 28/61] fix mouse out issues --- src/swipeview.js | 5 ++++- src/verticalswipeview.js | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 1b4e571..d5f0034 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -259,8 +259,11 @@ var SwipeView = (function (window, document) { case moveEvent: this.__move(e); break; - case cancelEvent: case "mouseout": + if (!this.initiated) { break; } + else if ( e.toElement == document.childNodes[1]) { } + else if ( e.toElement != this.wrapper.parentNode ) { break; } + case cancelEvent: case endEvent: this.__end(e); break; diff --git a/src/verticalswipeview.js b/src/verticalswipeview.js index 22399e7..8a852b3 100644 --- a/src/verticalswipeview.js +++ b/src/verticalswipeview.js @@ -259,8 +259,11 @@ var VerticalSwipeView = (function (window, document) { case moveEvent: this.__move(e); break; - case cancelEvent: - case "mouseout": + case "mouseout": + if (!this.initiated) { break; } + else if ( e.toElement == document.childNodes[1]) { } + else if ( e.toElement != this.wrapper.parentNode ) { break; } + case cancelEvent: case endEvent: this.__end(e); break; From d6997723558291ee4044caee080af71e55cd97cf Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Mon, 1 Jul 2013 11:26:19 +0200 Subject: [PATCH 29/61] wip adding a vertical option in SwipeView rm VerticalSwipeView --- demo/gallery4/index.html | 4 +- demo/gallery5/index.html | 3 +- demo/gallery6/index.html | 3 +- demo/gallery7/index.html | 137 ++++++++ demo/gallery7/infinitegraphset.js | 86 +++++ demo/gallery7/style.css | 89 +++++ src/swipeview.js | 108 +++---- src/verticalswipeview.js | 521 ------------------------------ 8 files changed, 369 insertions(+), 582 deletions(-) create mode 100644 demo/gallery7/index.html create mode 100644 demo/gallery7/infinitegraphset.js create mode 100644 demo/gallery7/style.css delete mode 100644 src/verticalswipeview.js diff --git a/demo/gallery4/index.html b/demo/gallery4/index.html index 1553e51..8936ed2 100644 --- a/demo/gallery4/index.html +++ b/demo/gallery4/index.html @@ -7,7 +7,7 @@ SwipeView - + @@ -52,7 +52,7 @@ } ]; -gallery = new VerticalSwipeView('#wrapper', { numberOfPages: slides.length, hastyPageFlip:true }); +gallery = new SwipeView('#wrapper', { numberOfPages: slides.length, hastyPageFlip:true, vertical:true}); // Load initial data for (i=0; i<3; i++) { diff --git a/demo/gallery5/index.html b/demo/gallery5/index.html index ba29849..9a1cb2d 100644 --- a/demo/gallery5/index.html +++ b/demo/gallery5/index.html @@ -7,7 +7,6 @@ SwipeView - @@ -47,7 +46,7 @@ i, page; -gallery = new VerticalSwipeView('#wrapper', { numberOfPages: 100, hastyPageFlip:true}); +gallery = new SwipeView('#wrapper', { numberOfPages: 100, hastyPageFlip:true, vertical:true}); // Load initial data for (i=0; i<3; i++) { diff --git a/demo/gallery6/index.html b/demo/gallery6/index.html index 77ec427..287c2d1 100644 --- a/demo/gallery6/index.html +++ b/demo/gallery6/index.html @@ -7,7 +7,6 @@ SwipeView - @@ -70,7 +69,7 @@ i, page; -gallery = new VerticalSwipeView('#wrapper', { numberOfPages: 100, hastyPageFlip:true}); +gallery = new SwipeView('#wrapper', { numberOfPages: 100, hastyPageFlip:true, vertical:true}); // Load initial data for (i=0; i<3; i++) { diff --git a/demo/gallery7/index.html b/demo/gallery7/index.html new file mode 100644 index 0000000..6170433 --- /dev/null +++ b/demo/gallery7/index.html @@ -0,0 +1,137 @@ + + + + + + + + SwipeView + + + + + + +
+ + + + diff --git a/demo/gallery7/infinitegraphset.js b/demo/gallery7/infinitegraphset.js new file mode 100644 index 0000000..cc869bb --- /dev/null +++ b/demo/gallery7/infinitegraphset.js @@ -0,0 +1,86 @@ +/* + * infinitegraphset.js + */ +(function (win, doc) { + + function InfiniteGraphSet(id, dataO) { + var gallery = new SwipeView(id, { + hastyPageFlip:true, + numberOfPages: dataO.length + }), i, page, df = dataO; + + function genImgs(container, page, d) { + var img, div; + for(var i=0; i< 5; i++) { + div = doc.createElement('div'); + div.className = 'container'; + img = doc.createElement('img'); + img.className = 'loading'; + img.src = d.get(page).imgs[i]; + img.width = d.get(page).width; + img.height = d.get(page).height; + div.style.width = d.get(page).width + "px"; + div.style.height = d.get(page).height + "px"; + img.onload = function () { this.className = ''; } + div.appendChild(img); + container.appendChild(div); + } + } + + for(i=0; i<3; i++) { + page = i==0 ? df.length-1 : i-1; + div = doc.createElement('div'); + div.className = 'set-container'; + genImgs(div, page, df); + gallery.masterPages[i].appendChild(div); + } + + function setImg(el, src) { + el.className = 'loading'; + el.src = src; + el.onload = function () { this.className = ''; } + } + + function init(newdf) { + df = newdf; + var el, page, i; + for (i=0; i<3; i++) { + page = i==0 ? newdf.length-1 : i-1; + els = gallery.masterPages[i].querySelectorAll('img'); + setImg(els[0], newdf.get(page).imgs[0]); + setImg(els[1], newdf.get(page).imgs[1]); + setImg(els[2], newdf.get(page).imgs[2]); + setImg(els[3], newdf.get(page).imgs[3]); + setImg(els[4], newdf.get(page).imgs[4]); + } + } + + gallery.onFlip(function () { + var els, + upcoming, + i; + + for (i=0; i<3; i++) { + upcoming = gallery.masterPages[i].dataset.upcomingPageIndex; + + if (upcoming != gallery.masterPages[i].dataset.pageIndex) { + els = gallery.masterPages[i].querySelectorAll('img'); + setImg(els[0], df.get(upcoming).imgs[0]); + setImg(els[1], df.get(upcoming).imgs[1]); + setImg(els[2], df.get(upcoming).imgs[2]); + setImg(els[3], df.get(upcoming).imgs[3]); + setImg(els[4], df.get(upcoming).imgs[4]); + } + } + }); + return { + gallery: gallery, + reset:function (newdf) { + gallery.reset(); + init(newdf); + } + }; + } + + win.InfiniteGraphSet = InfiniteGraphSet; +})(window, window.document); diff --git a/demo/gallery7/style.css b/demo/gallery7/style.css new file mode 100644 index 0000000..8a119db --- /dev/null +++ b/demo/gallery7/style.css @@ -0,0 +1,89 @@ +html, body { height:100%; } +body { + padding:0; + margin:0; + background:#333; + -webkit-user-select:none; + -moz-user-select:none; + -ms-user-select:none; + -o-user-select:none; + user-select:none; + -webkit-text-size-adjust:none; + -moz-text-size-adjust:none; + -ms-text-size-adjust:none; + -o-text-size-adjust:none; + text-size-adjust:none; + color:#eee; + font-family:helvetica; + font-size:12px; +} + +#wrapper { + width:100%; + height:100%; + position:relative; +} + +.wrapper { + width:1024px; + min-width:320px; + height:145px; + margin:20px auto; + background-color: rgb(43, 38, 38); +} + +.swipeview-slider > div , .vertical-swipeview-slider > div{ + position:relative; + display:-webkit-box; + display:-moz-box; + display:-ms-box; + display:-o-box; + display:box; + -webkit-box-orient:vertical; + -moz-box-orient:vertical; + -ms-box-orient:vertical; + -o-box-orient:vertical; + box-orient:vertical; + -webkit-box-pack:center; + -moz-box-pack:center; + -ms-box-pack:center; + -o-box-pack:center; + box-pack:center; + -webkit-box-align:center; + -mox-box-align:center; + -ms-box-align:center; + -o-box-align:center; + box-align:center; + overflow:hidden; +} + +.swipeview-slider img { + display:block; + -webkit-transition-duration:.4s; + -moz-transition-duration:.4s; + -ms-transition-duration:.4s; + -o-transition-duration:.4s; + transition-duration:.4s; + -webkit-transition-property:opacity; + -moz-transition-property:opacity; + -ms-transition-property:opacity; + -o-transition-property:opacity; + transition-property:opacity; + opacity:1; + pointer-events:none; + visibility:visible; +} + +.swipeview-slider .set-container { + margin:auto; +} + +.swipeview-slider .container { + background: rgb(197, 197, 197); + float: left; + margin: 0 5px; +} + +.swipeview-slider img.loading { + visibility:hidden; +} diff --git a/src/swipeview.js b/src/swipeview.js index d5f0034..215a2f0 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -69,6 +69,7 @@ var SwipeView = (function (window, document) { numberOfPages: 3, snapThreshold: null, hastyPageFlip: false, + vertical: false, loop: true }; @@ -90,7 +91,7 @@ var SwipeView = (function (window, document) { for (i=-1; i<2; i++) { div = document.createElement('div'); - div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;left:' + i*100 + '%'; + div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;' + (this.options.vertical ? 'top' : 'left') + ':' + i*100 + '%'; if (!div.dataset) div.dataset = {}; pageIndex = i == -1 ? this.options.numberOfPages - 1 : i; div.dataset.pageIndex = pageIndex; @@ -120,15 +121,15 @@ var SwipeView = (function (window, document) { SwipeView.prototype = { currentMasterPage: 1, - x: 0, + k: 0, page: 0, pageIndex: 0, customEvents: [], reset : function (pageCount) { this.goToPage(0); - this.updatePageCount(); - this.refreshSize(pageCount); + this.updatePageCount(pageCount); + this.refreshSize(); }, onFlip: function (fn) { @@ -173,18 +174,19 @@ var SwipeView = (function (window, document) { // FIXME, get container width/height if wrapper width/height equals 0 this.wrapperWidth = this.wrapper.clientWidth === 0 ? 1024 : this.wrapper.clientWidth; this.wrapperHeight = this.wrapper.clientHeight === 0 ? 145 : this.wrapper.clientHeight; - this.pageWidth = this.wrapperWidth; - this.maxX = -this.options.numberOfPages * this.pageWidth + this.wrapperWidth; + this.wrapperSize = this.options.vertical ? this.wrapperHeight : this.wrapperWidth; + this.pageSize = this.options.vertical ? this.wrapperHeight : this.wrapperWidth; + this.maxX = -this.options.numberOfPages * this.pageSize + this.wrapperSize; this.snapThreshold = this.options.snapThreshold === null ? - Math.round(this.pageWidth * 0.15) : + Math.round(this.pageSize * 0.15) : /%/.test(this.options.snapThreshold) ? - Math.round(this.pageWidth * this.options.snapThreshold.replace('%', '') / 100) : + Math.round(this.pageSize * this.options.snapThreshold.replace('%', '') / 100) : this.options.snapThreshold; }, updatePageCount: function (n) { this.options.numberOfPages = n; - this.maxX = -this.options.numberOfPages * this.pageWidth + this.wrapperWidth; + this.maxX = -this.options.numberOfPages * this.pageSize + this.wrapperSize; }, goToPage: function (p) { @@ -200,32 +202,32 @@ var SwipeView = (function (window, document) { this.page = p; this.pageIndex = p; this.slider.style[transitionDuration] = '0s'; - this.__pos(-p * this.pageWidth); + this.__pos(-p * this.pageSize); this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className + ' swipeview-active'; if (this.currentMasterPage === 0) { - this.masterPages[2].style.left = this.page * 100 - 100 + '%'; - this.masterPages[0].style.left = this.page * 100 + '%'; - this.masterPages[1].style.left = this.page * 100 + 100 + '%'; + this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; + this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; + this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; this.masterPages[2].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; this.masterPages[0].dataset.upcomingPageIndex = this.page; this.masterPages[1].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; } else if (this.currentMasterPage == 1) { - this.masterPages[0].style.left = this.page * 100 - 100 + '%'; - this.masterPages[1].style.left = this.page * 100 + '%'; - this.masterPages[2].style.left = this.page * 100 + 100 + '%'; + this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; + this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; + this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; this.masterPages[0].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; this.masterPages[1].dataset.upcomingPageIndex = this.page; this.masterPages[2].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; } else { - this.masterPages[1].style.left = this.page * 100 - 100 + '%'; - this.masterPages[2].style.left = this.page * 100 + '%'; - this.masterPages[0].style.left = this.page * 100 + 100 + '%'; + this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; + this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; + this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; this.masterPages[1].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; this.masterPages[2].dataset.upcomingPageIndex = this.page; @@ -236,18 +238,18 @@ var SwipeView = (function (window, document) { }, next: function () { - if (!this.options.loop && this.x == this.maxX) return; + if (!this.options.loop && this.k == this.maxX) return; - this.directionX = -1; - this.x -= 1; + this.direction = -1; + this.k -= 1; this.__checkPosition(); }, prev: function () { - if (!this.options.loop && this.x === 0) return; + if (!this.options.loop && this.k === 0) return; - this.directionX = 1; - this.x += 1; + this.direction = 1; + this.k += 1; this.__checkPosition(); }, @@ -283,15 +285,15 @@ var SwipeView = (function (window, document) { * Pseudo private methods * */ - __pos: function (x) { - this.x = x; - this.slider.style[transform] = 'translate(' + x + 'px,0)' + translateZ; + __pos: function (k) { + this.k = k; + this.slider.style[transform] = (this.options.vertical ? 'translate(0,' + k + 'px)' : 'translate(' + k + 'px,0)') + translateZ; }, __resize: function () { this.refreshSize(); this.slider.style[transitionDuration] = '0s'; - this.__pos(-this.page * this.pageWidth); + this.__pos(-this.page * this.pageSize); }, __start: function (e) { @@ -311,7 +313,7 @@ var SwipeView = (function (window, document) { this.pointY = point.pageY; this.stepsX = 0; this.stepsY = 0; - this.directionX = 0; + this.direction = 0; this.directionLocked = false; /* var matrix = getComputedStyle(this.slider, null).webkitTransform.replace(/[^0-9-.,]/g, '').split(','); @@ -341,13 +343,13 @@ var SwipeView = (function (window, document) { var deltaX = point.pageX - this.pointX, deltaY = point.pageY - this.pointY, - newX = this.x + deltaX, - dist = Math.abs(point.pageX - this.startX); + newC = this.options.vertical ? this.k + deltaY : this.k + deltaX, + dist = this.options.vertical ? Math.abs(point.pageY - this.startY): Math.abs(point.pageX - this.startX); this.moved = true; this.pointX = point.pageX; this.pointY = point.pageY; - this.directionX = deltaX > 0 ? 1 : deltaX < 0 ? -1 : 0; + this.direction = this.options.vertical ? (deltaY > 0 ? 1 : deltaY < 0 ? -1 : 0): (deltaX > 0 ? 1 : deltaX < 0 ? -1 : 0); this.stepsX += Math.abs(deltaX); this.stepsY += Math.abs(deltaY); @@ -358,7 +360,7 @@ var SwipeView = (function (window, document) { } // We are scrolling vertically, so skip SwipeView and give the control back to the browser - if (!this.directionLocked && this.stepsY > this.stepsX) { + if (!this.directionLocked && (this.options.vertical ? this.stepsX > this.stepsY : this.stepsY > this.stepsX)) { this.initiated = false; return; } @@ -367,8 +369,8 @@ var SwipeView = (function (window, document) { this.directionLocked = true; - if (!this.options.loop && (newX > 0 || newX < this.maxX)) { - newX = this.x + (deltaX / 2); + if (!this.options.loop && (newC > 0 || newC < this.maxC)) { + newC = this.k + ((this.options.vertical ?deltaY : deltaX) / 2); } if (!this.thresholdExceeded && dist >= this.snapThreshold) { @@ -379,11 +381,7 @@ var SwipeView = (function (window, document) { this.__event('movein'); } -/* if (newX > 0 || newX < this.maxX) { - newX = this.x + (deltaX / 2); - }*/ - - this.__pos(newX); + this.__pos(newC); }, __end: function (e) { @@ -403,7 +401,7 @@ var SwipeView = (function (window, document) { point = e.changedTouches.item(i); } if (!point) { - this.__pos(-this.page * this.pageWidth); + this.__pos(-this.page * this.pageSize); this.initiated = false; return; } @@ -412,14 +410,14 @@ var SwipeView = (function (window, document) { point = e; } - var dist = Math.abs(point.pageX - this.startX); + var dist = this.options.vertical ? Math.abs(point.pageY - this.startY) : Math.abs(point.pageX - this.startX); this.initiated = false; if (!this.moved) return; - if (!this.options.loop && (this.x > 0 || this.x < this.maxX)) { + if (!this.options.loop && (this.k > 0 || this.k < this.maxX)) { dist = 0; this.__event('movein'); } @@ -427,7 +425,7 @@ var SwipeView = (function (window, document) { // Check if we exceeded the snap threshold if (dist < this.snapThreshold) { this.slider.style[transitionDuration] = Math.floor(300 * dist / this.snapThreshold) + 'ms'; - this.__pos(-this.page * this.pageWidth); + this.__pos(-this.page * this.pageSize); return; } @@ -442,24 +440,24 @@ var SwipeView = (function (window, document) { this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); // Flip the page - if (this.directionX > 0) { - this.page = -Math.ceil(this.x / this.pageWidth); + if (this.direction > 0) { + this.page = -Math.ceil(this.k / this.pageSize); this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; this.pageIndex = this.pageIndex === 0 ? this.options.numberOfPages - 1 : this.pageIndex - 1; pageFlip = this.currentMasterPage - 1; pageFlip = pageFlip < 0 ? 2 : pageFlip; - this.masterPages[pageFlip].style.left = this.page * 100 - 100 + '%'; + this.masterPages[pageFlip].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; pageFlipIndex = this.page - 1; } else { - this.page = -Math.floor(this.x / this.pageWidth); + this.page = -Math.floor(this.k / this.pageSize); this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; this.pageIndex = this.pageIndex == this.options.numberOfPages - 1 ? 0 : this.pageIndex + 1; pageFlip = this.currentMasterPage + 1; pageFlip = pageFlip > 2 ? 0 : pageFlip; - this.masterPages[pageFlip].style.left = this.page * 100 + 100 + '%'; + this.masterPages[pageFlip].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; pageFlipIndex = this.page + 1; } @@ -475,19 +473,19 @@ var SwipeView = (function (window, document) { pageFlipIndex = pageFlipIndex - Math.floor(pageFlipIndex / this.options.numberOfPages) * this.options.numberOfPages; this.masterPages[pageFlip].dataset.upcomingPageIndex = pageFlipIndex; // Index to be loaded in the newly flipped page - newX = -this.page * this.pageWidth; + newC = -this.page * this.pageSize; - this.slider.style[transitionDuration] = Math.floor(500 * Math.abs(this.x - newX) / this.pageWidth) + 'ms'; + this.slider.style[transitionDuration] = Math.floor(500 * Math.abs(this.k - newC) / this.pageSize) + 'ms'; // Hide the next page if we decided to disable looping if (!this.options.loop) { - this.masterPages[pageFlip].style.visibility = newX === 0 || newX == this.maxX ? 'hidden' : ''; + this.masterPages[pageFlip].style.visibility = newC === 0 || newC == this.maxX ? 'hidden' : ''; } - if (this.x == newX) { + if (this.k == newC) { this.__flip(); // If we swiped all the way long to the next page (extremely rare but still) } else { - this.__pos(newX); + this.__pos(newC); if (this.options.hastyPageFlip) this.__flip(); } }, diff --git a/src/verticalswipeview.js b/src/verticalswipeview.js deleted file mode 100644 index 8a852b3..0000000 --- a/src/verticalswipeview.js +++ /dev/null @@ -1,521 +0,0 @@ -/*! - * VerticalSwipeView - * Fork from SwipeView v1.0 ~ Copyright (c) 2012 Matteo Spinelli, http://cubiq.org - * Released under MIT license, http://cubiq.org/license - */ -var VerticalSwipeView = (function (window, document) { - var dummyStyle = document.createElement('div').style, - vendor = (function () { - var vendors = 't,webkitT,MozT,msT,OT'.split(','), - t, - i = 0, - l = vendors.length; - - for ( ; i < l; i++ ) { - t = vendors[i] + 'ransform'; - if ( t in dummyStyle ) { - return vendors[i].substr(0, vendors[i].length - 1); - } - } - - return false; - })(), - cssVendor = vendor ? '-' + vendor.toLowerCase() + '-' : '', - - // Style properties - transform = prefixStyle('transform'), - transitionDuration = prefixStyle('transitionDuration'), - - // Browser capabilities - has3d = prefixStyle('perspective') in dummyStyle, - hasTouch = 'ontouchstart' in window, - hasTransform = !!vendor, - hasTransitionEnd = prefixStyle('transition') in dummyStyle, - - // Helpers - translateZ = has3d ? ' translateZ(0)' : '', - - // Events - resizeEvent = 'onorientationchange' in window ? 'orientationchange' : 'resize', - startEvent = hasTouch ? 'touchstart' : 'mousedown', - moveEvent = hasTouch ? 'touchmove' : 'mousemove', - endEvent = hasTouch ? 'touchend' : 'mouseup', - cancelEvent = hasTouch ? 'touchcancel' : 'mouseup', - transitionEndEvent = (function () { - if ( vendor === false ) return false; - - var transitionEnd = { - '' : 'transitionend', - 'webkit' : 'webkitTransitionEnd', - 'Moz' : 'transitionend', - 'O' : 'oTransitionEnd', - 'ms' : 'MSTransitionEnd' - }; - - return transitionEnd[vendor]; - })(), - - uuid = 0, - - VerticalSwipeView = function (el, options) { - var i, - div, - className, - pageIndex; - - this.wrapper = typeof el == 'string' ? document.querySelector(el) : el; - this.id = this.wrapper.id || ++uuid; - this.options = { - text: null, - numberOfPages: 3, - snapThreshold: null, - hastyPageFlip: false, - loop: true - }; - - // User defined options - for (i in options) this.options[i] = options[i]; - - this.wrapper.style.overflow = 'hidden'; - this.wrapper.style.position = 'relative'; - - this.masterPages = []; - - div = document.createElement('div'); - div.className = 'vertical-swipeview-slider'; - div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform:translateZ(0);' + cssVendor + 'transition-timing-function:ease-out'; - this.wrapper.appendChild(div); - this.slider = div; - - this.refreshSize(); - - for (i=-1; i<2; i++) { - div = document.createElement('div'); - div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;top:' + i*100 + '%'; - if (!div.dataset) div.dataset = {}; - pageIndex = i == -1 ? this.options.numberOfPages - 1 : i; - div.dataset.pageIndex = pageIndex; - div.dataset.upcomingPageIndex = pageIndex; - - if (!this.options.loop && i == -1) div.style.visibility = 'hidden'; - - this.slider.appendChild(div); - this.masterPages.push(div); - } - - className = this.masterPages[1].className; - this.masterPages[1].className = !className ? 'vertical-swipeview-active' : className + ' vertical-swipeview-active'; - - window.addEventListener(resizeEvent, this, false); - this.wrapper.addEventListener(startEvent, this, false); - this.wrapper.addEventListener(moveEvent, this, false); - this.wrapper.addEventListener(endEvent, this, false); - this.slider.addEventListener(transitionEndEvent, this, false); - // in Opera >= 12 the transitionend event is lowercase so we register both events - if ( vendor == 'O' ) this.slider.addEventListener(transitionEndEvent.toLowerCase(), this, false); - - if (!hasTouch) { - this.wrapper.addEventListener('mouseout', this, false); - } - }; - - VerticalSwipeView.prototype = { - currentMasterPage: 1, - y: 0, - page: 0, - pageIndex: 0, - customEvents: [], - - reset : function (pageCount) { - this.goToPage(0); - this.updatePageCount(pageCount); - this.refreshSize(); - }, - - onFlip: function (fn) { - this.wrapper.addEventListener(this.id + 'vertical-swipeview-flip', fn, false); - this.customEvents.push(['flip', fn]); - }, - - onMoveOut: function (fn) { - this.wrapper.addEventListener(this.id + 'vertical-swipeview-moveout', fn, false); - this.customEvents.push(['moveout', fn]); - }, - - onMoveIn: function (fn) { - this.wrapper.addEventListener(this.id + 'vertical-swipeview-movein', fn, false); - this.customEvents.push(['movein', fn]); - }, - - onTouchStart: function (fn) { - this.wrapper.addEventListener(this.id + 'vertical-swipeview-touchstart', fn, false); - this.customEvents.push(['touchstart', fn]); - }, - - destroy: function () { - while ( this.customEvents.length ) { - this.wrapper.removeEventListener(this.id + 'vertical-swipeview-' + this.customEvents[0][0], this.customEvents[0][1], false); - this.customEvents.shift(); - } - - // Remove the event listeners - window.removeEventListener(resizeEvent, this, false); - this.wrapper.removeEventListener(startEvent, this, false); - this.wrapper.removeEventListener(moveEvent, this, false); - this.wrapper.removeEventListener(endEvent, this, false); - this.slider.removeEventListener(transitionEndEvent, this, false); - - if (!hasTouch) { - this.wrapper.removeEventListener('mouseout', this, false); - } - }, - - refreshSize: function () { - this.wrapperWidth = this.wrapper.clientWidth; - this.wrapperHeight = this.wrapper.clientHeight; - this.pageHeight = this.wrapperHeight; - this.maxY = -this.options.numberOfPages * this.pageHeight + this.wrapperHeight; - this.snapThreshold = this.options.snapThreshold === null ? - Math.round(this.pageHeight * 0.15) : - /%/.test(this.options.snapThreshold) ? - Math.round(this.pageHeight * this.options.snapThreshold.replace('%', '') / 100) : - this.options.snapThreshold; - }, - - updatePageCount: function (n) { - this.options.numberOfPages = n; - this.maxY = -this.options.numberOfPages * this.pageHeight + this.wrapperHeight; - }, - - goToPage: function (p) { - var i; - - this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)vertical-swipeview-active(\s|$)/, ''); - for (i=0; i<3; i++) { - className = this.masterPages[i].className; - /(^|\s)vertical-swipeview-loading(\s|$)/.test(className) || (this.masterPages[i].className = !className ? 'vertical-swipeview-loading' : className + ' swipeview-loading'); - } - - p = p < 0 ? 0 : p > this.options.numberOfPages-1 ? this.options.numberOfPages-1 : p; - this.page = p; - this.pageIndex = p; - this.slider.style[transitionDuration] = '0s'; - this.__pos(-p * this.pageHeight); - - this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; - - this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className + ' vertical-swipeview-active'; - - if (this.currentMasterPage === 0) { - this.masterPages[2].style.top = this.page * 100 - 100 + '%'; - this.masterPages[0].style.top = this.page * 100 + '%'; - this.masterPages[1].style.top = this.page * 100 + 100 + '%'; - - this.masterPages[2].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; - this.masterPages[0].dataset.upcomingPageIndex = this.page; - this.masterPages[1].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; - } else if (this.currentMasterPage == 1) { - this.masterPages[0].style.top = this.page * 100 - 100 + '%'; - this.masterPages[1].style.top = this.page * 100 + '%'; - this.masterPages[2].style.top = this.page * 100 + 100 + '%'; - - this.masterPages[0].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; - this.masterPages[1].dataset.upcomingPageIndex = this.page; - this.masterPages[2].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; - } else { - this.masterPages[1].style.top = this.page * 100 - 100 + '%'; - this.masterPages[2].style.top = this.page * 100 + '%'; - this.masterPages[0].style.top = this.page * 100 + 100 + '%'; - - this.masterPages[1].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; - this.masterPages[2].dataset.upcomingPageIndex = this.page; - this.masterPages[0].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; - } - - this.__flip(); - }, - - next: function () { - if (!this.options.loop && this.y == this.maxY) return; - - this.directionY = -1; - this.y -= 1; - this.__checkPosition(); - }, - - prev: function () { - if (!this.options.loop && this.y === 0) return; - - this.directionY = 1; - this.y += 1; - this.__checkPosition(); - }, - - handleEvent: function (e) { - switch (e.type) { - case startEvent: - this.__start(e); - break; - case moveEvent: - this.__move(e); - break; - case "mouseout": - if (!this.initiated) { break; } - else if ( e.toElement == document.childNodes[1]) { } - else if ( e.toElement != this.wrapper.parentNode ) { break; } - case cancelEvent: - case endEvent: - this.__end(e); - break; - case resizeEvent: - this.__resize(); - break; - case transitionEndEvent: - case 'otransitionend': - if (e.target == this.slider && !this.options.hastyPageFlip) this.__flip(); - break; - } - }, - - - /** - * - * Pseudo private methods - * - */ - __pos: function (y) { - this.y = y; - this.slider.style[transform] = 'translate(0, ' + y + 'px)' + translateZ; - }, - - __resize: function () { - this.refreshSize(); - this.slider.style[transitionDuration] = '0s'; - this.__pos(-this.page * this.pageHeight); - }, - - __start: function (e) { - //e.preventDefault(); - - if (this.initiated) return; - - var point = hasTouch ? e.targetTouches[0] : e; - - this.initiated = true; - this.identifier = point.identifier; - this.moved = false; - this.thresholdExceeded = false; - this.startX = point.pageX; - this.startY = point.pageY; - this.pointX = point.pageX; - this.pointY = point.pageY; - this.stepsX = 0; - this.stepsY = 0; - this.directionY = 0; - this.directionLocked = false; - -/* var matrix = getComputedStyle(this.slider, null).webkitTransform.replace(/[^0-9-.,]/g, '').split(','); - this.x = matrix[4] * 1;*/ - - this.slider.style[transitionDuration] = '0s'; - - this.__event('touchstart'); - }, - - __move: function (e) { - if (!this.initiated) return; - var i, l, point; - - if (hasTouch) { - i = 0; - l = e.changedTouches.length; - for(;i 0 ? 1 : deltaY < 0 ? -1 : 0; - this.stepsX += Math.abs(deltaX); - this.stepsY += Math.abs(deltaY); - - // We take a 10px buffer to figure out the direction of the swipe - if (this.stepsX < 10 && this.stepsY < 10) { -// e.preventDefault(); - return; - } - - // We are scrolling horizontaly, so skip VerticalSwipeView and give the control back to the browser - if (!this.directionLocked && this.stepsX > this.stepsY) { - this.initiated = false; - return; - } - - e.preventDefault(); - - this.directionLocked = true; - - if (!this.options.loop && (newY > 0 || newY < this.maxY)) { - newY = this.y + (deltaY / 2); - } - - if (!this.thresholdExceeded && dist >= this.snapThreshold) { - this.thresholdExceeded = true; - this.__event('moveout'); - } else if (this.thresholdExceeded && dist < this.snapThreshold) { - this.thresholdExceeded = false; - this.__event('movein'); - } - -/* if (newX > 0 || newX < this.maxX) { - newX = this.x + (deltaX / 2); - }*/ - - this.__pos(newY); - }, - - __end: function (e) { - if (!this.initiated) return; - - var point; - - if(hasTouch) { - var i=0, l=e.touches.length; - for(;i 0 || this.y < this.maxY)) { - dist = 0; - this.__event('movein'); - } - - // Check if we exceeded the snap threshold - if (dist < this.snapThreshold) { - this.slider.style[transitionDuration] = Math.floor(300 * dist / this.snapThreshold) + 'ms'; - this.__pos(-this.page * this.pageHeight); - return; - } - - this.__checkPosition(); - }, - - __checkPosition: function () { - var pageFlip, - pageFlipIndex, - className; - - this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)vertical-swipeview-active(\s|$)/, ''); - - // Flip the page - if (this.directionY > 0) { - this.page = -Math.ceil(this.y / this.pageHeight); - this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; - this.pageIndex = this.pageIndex === 0 ? this.options.numberOfPages - 1 : this.pageIndex - 1; - - pageFlip = this.currentMasterPage - 1; - pageFlip = pageFlip < 0 ? 2 : pageFlip; - this.masterPages[pageFlip].style.top = this.page * 100 - 100 + '%'; - - pageFlipIndex = this.page - 1; - } else { - this.page = -Math.floor(this.y / this.pageHeight); - this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; - this.pageIndex = this.pageIndex == this.options.numberOfPages - 1 ? 0 : this.pageIndex + 1; - - pageFlip = this.currentMasterPage + 1; - pageFlip = pageFlip > 2 ? 0 : pageFlip; - this.masterPages[pageFlip].style.top = this.page * 100 + 100 + '%'; - - pageFlipIndex = this.page + 1; - } - - // Add active class to current page - className = this.masterPages[this.currentMasterPage].className; - /(^|\s)vertical-swipeview-active(\s|$)/.test(className) || (this.masterPages[this.currentMasterPage].className = !className ? 'vertical-swipeview-active' : className + ' vertical-swipeview-active'); - - // Add loading class to flipped page - className = this.masterPages[pageFlip].className; - /(^|\s)vertical-swipeview-loading(\s|$)/.test(className) || (this.masterPages[pageFlip].className = !className ? 'vertical-swipeview-loading' : className + ' vertical-swipeview-loading'); - - pageFlipIndex = pageFlipIndex - Math.floor(pageFlipIndex / this.options.numberOfPages) * this.options.numberOfPages; - this.masterPages[pageFlip].dataset.upcomingPageIndex = pageFlipIndex; // Index to be loaded in the newly flipped page - - newY = -this.page * this.pageHeight; - - this.slider.style[transitionDuration] = Math.floor(500 * Math.abs(this.y - newY) / this.pageHeight) + 'ms'; - - // Hide the next page if we decided to disable looping - if (!this.options.loop) { - this.masterPages[pageFlip].style.visibility = newY === 0 || newY == this.maxY ? 'hidden' : ''; - } - - if (this.y == newY) { - this.__flip(); // If we swiped all the way long to the next page (extremely rare but still) - } else { - this.__pos(newY); - if (this.options.hastyPageFlip) this.__flip(); - } - }, - - __flip: function () { - this.__event('flip'); - - for (var i=0; i<3; i++) { - this.masterPages[i].className = this.masterPages[i].className.replace(/(^|\s)vertical-swipeview-loading(\s|$)/, ''); // Remove the loading class - this.masterPages[i].dataset.pageIndex = this.masterPages[i].dataset.upcomingPageIndex; - } - }, - - __event: function (type) { - var ev = document.createEvent("Event"); - - ev.initEvent(this.id + 'vertical-swipeview-' + type, true, true); - - this.wrapper.dispatchEvent(ev); - } - }; - - function prefixStyle (style) { - if ( vendor === '' ) return style; - - style = style.charAt(0).toUpperCase() + style.substr(1); - return vendor + style; - } - - return VerticalSwipeView; -})(window, document); From 97ec3a27e271f31f2bdb26f5641f6623dcb131e5 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Mon, 1 Jul 2013 15:03:46 +0200 Subject: [PATCH 30/61] %s/\t/ /g --- src/swipeview.js | 986 +++++++++++++++++++++++------------------------ 1 file changed, 493 insertions(+), 493 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 215a2f0..7b12c13 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -3,517 +3,517 @@ * Released under MIT license, http://cubiq.org/license */ var SwipeView = (function (window, document) { - var dummyStyle = document.createElement('div').style, - vendor = (function () { - var vendors = 't,webkitT,MozT,msT,OT'.split(','), - t, - i = 0, - l = vendors.length; - - for ( ; i < l; i++ ) { - t = vendors[i] + 'ransform'; - if ( t in dummyStyle ) { - return vendors[i].substr(0, vendors[i].length - 1); - } - } - - return false; - })(), - cssVendor = vendor ? '-' + vendor.toLowerCase() + '-' : '', - - // Style properties - transform = prefixStyle('transform'), - transitionDuration = prefixStyle('transitionDuration'), - - // Browser capabilities - has3d = prefixStyle('perspective') in dummyStyle, - hasTouch = 'ontouchstart' in window, - hasTransform = !!vendor, - hasTransitionEnd = prefixStyle('transition') in dummyStyle, - - // Helpers - translateZ = has3d ? ' translateZ(0)' : '', - - // Events - resizeEvent = 'onorientationchange' in window ? 'orientationchange' : 'resize', - startEvent = hasTouch ? 'touchstart' : 'mousedown', - moveEvent = hasTouch ? 'touchmove' : 'mousemove', - endEvent = hasTouch ? 'touchend' : 'mouseup', - cancelEvent = hasTouch ? 'touchcancel' : 'mouseup', - transitionEndEvent = (function () { - if ( vendor === false ) return false; - - var transitionEnd = { - '' : 'transitionend', - 'webkit' : 'webkitTransitionEnd', - 'Moz' : 'transitionend', - 'O' : 'oTransitionEnd', - 'ms' : 'MSTransitionEnd' - }; - - return transitionEnd[vendor]; - })(), - + var dummyStyle = document.createElement('div').style, + vendor = (function () { + var vendors = 't,webkitT,MozT,msT,OT'.split(','), + t, + i = 0, + l = vendors.length; + + for ( ; i < l; i++ ) { + t = vendors[i] + 'ransform'; + if ( t in dummyStyle ) { + return vendors[i].substr(0, vendors[i].length - 1); + } + } + + return false; + })(), + cssVendor = vendor ? '-' + vendor.toLowerCase() + '-' : '', + + // Style properties + transform = prefixStyle('transform'), + transitionDuration = prefixStyle('transitionDuration'), + + // Browser capabilities + has3d = prefixStyle('perspective') in dummyStyle, + hasTouch = 'ontouchstart' in window, + hasTransform = !!vendor, + hasTransitionEnd = prefixStyle('transition') in dummyStyle, + + // Helpers + translateZ = has3d ? ' translateZ(0)' : '', + + // Events + resizeEvent = 'onorientationchange' in window ? 'orientationchange' : 'resize', + startEvent = hasTouch ? 'touchstart' : 'mousedown', + moveEvent = hasTouch ? 'touchmove' : 'mousemove', + endEvent = hasTouch ? 'touchend' : 'mouseup', + cancelEvent = hasTouch ? 'touchcancel' : 'mouseup', + transitionEndEvent = (function () { + if ( vendor === false ) return false; + + var transitionEnd = { + '' : 'transitionend', + 'webkit' : 'webkitTransitionEnd', + 'Moz' : 'transitionend', + 'O' : 'oTransitionEnd', + 'ms' : 'MSTransitionEnd' + }; + + return transitionEnd[vendor]; + })(), + uuid = 0, - SwipeView = function (el, options) { - var i, - div, - className, - pageIndex; + SwipeView = function (el, options) { + var i, + div, + className, + pageIndex; - this.wrapper = typeof el == 'string' ? document.querySelector(el) : el; + this.wrapper = typeof el == 'string' ? document.querySelector(el) : el; this.id = this.wrapper.id || 'sw-id' + (++uuid); - this.options = { - text: null, - numberOfPages: 3, - snapThreshold: null, - hastyPageFlip: false, + this.options = { + text: null, + numberOfPages: 3, + snapThreshold: null, + hastyPageFlip: false, vertical: false, - loop: true - }; - - // User defined options - for (i in options) this.options[i] = options[i]; - - this.wrapper.style.overflow = 'hidden'; - this.wrapper.style.position = 'relative'; - - this.masterPages = []; - - div = document.createElement('div'); - div.className = 'swipeview-slider'; - div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform:translateZ(0);' + cssVendor + 'transition-timing-function:ease-out'; - this.wrapper.appendChild(div); - this.slider = div; - - this.refreshSize(); - - for (i=-1; i<2; i++) { - div = document.createElement('div'); - div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;' + (this.options.vertical ? 'top' : 'left') + ':' + i*100 + '%'; - if (!div.dataset) div.dataset = {}; - pageIndex = i == -1 ? this.options.numberOfPages - 1 : i; - div.dataset.pageIndex = pageIndex; - div.dataset.upcomingPageIndex = pageIndex; - - if (!this.options.loop && i == -1) div.style.visibility = 'hidden'; - - this.slider.appendChild(div); - this.masterPages.push(div); - } - - className = this.masterPages[1].className; - this.masterPages[1].className = !className ? 'swipeview-active' : className + ' swipeview-active'; - - window.addEventListener(resizeEvent, this, false); - this.wrapper.addEventListener(startEvent, this, false); - this.wrapper.addEventListener(moveEvent, this, false); - this.wrapper.addEventListener(endEvent, this, false); - this.slider.addEventListener(transitionEndEvent, this, false); - // in Opera >= 12 the transitionend event is lowercase so we register both events - if ( vendor == 'O' ) this.slider.addEventListener(transitionEndEvent.toLowerCase(), this, false); - - if (!hasTouch) { - this.wrapper.addEventListener('mouseout', this, false); - } - }; - - SwipeView.prototype = { - currentMasterPage: 1, - k: 0, - page: 0, - pageIndex: 0, - customEvents: [], - + loop: true + }; + + // User defined options + for (i in options) this.options[i] = options[i]; + + this.wrapper.style.overflow = 'hidden'; + this.wrapper.style.position = 'relative'; + + this.masterPages = []; + + div = document.createElement('div'); + div.className = 'swipeview-slider'; + div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform:translateZ(0);' + cssVendor + 'transition-timing-function:ease-out'; + this.wrapper.appendChild(div); + this.slider = div; + + this.refreshSize(); + + for (i=-1; i<2; i++) { + div = document.createElement('div'); + div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;' + (this.options.vertical ? 'top' : 'left') + ':' + i*100 + '%'; + if (!div.dataset) div.dataset = {}; + pageIndex = i == -1 ? this.options.numberOfPages - 1 : i; + div.dataset.pageIndex = pageIndex; + div.dataset.upcomingPageIndex = pageIndex; + + if (!this.options.loop && i == -1) div.style.visibility = 'hidden'; + + this.slider.appendChild(div); + this.masterPages.push(div); + } + + className = this.masterPages[1].className; + this.masterPages[1].className = !className ? 'swipeview-active' : className + ' swipeview-active'; + + window.addEventListener(resizeEvent, this, false); + this.wrapper.addEventListener(startEvent, this, false); + this.wrapper.addEventListener(moveEvent, this, false); + this.wrapper.addEventListener(endEvent, this, false); + this.slider.addEventListener(transitionEndEvent, this, false); + // in Opera >= 12 the transitionend event is lowercase so we register both events + if ( vendor == 'O' ) this.slider.addEventListener(transitionEndEvent.toLowerCase(), this, false); + + if (!hasTouch) { + this.wrapper.addEventListener('mouseout', this, false); + } + }; + + SwipeView.prototype = { + currentMasterPage: 1, + k: 0, + page: 0, + pageIndex: 0, + customEvents: [], + reset : function (pageCount) { this.goToPage(0); this.updatePageCount(pageCount); this.refreshSize(); }, - onFlip: function (fn) { - this.wrapper.addEventListener(this.id + 'swipeview-flip', fn, false); - this.customEvents.push(['flip', fn]); - }, - - onMoveOut: function (fn) { - this.wrapper.addEventListener(this.id + 'swipeview-moveout', fn, false); - this.customEvents.push(['moveout', fn]); - }, - - onMoveIn: function (fn) { - this.wrapper.addEventListener(this.id + 'swipeview-movein', fn, false); - this.customEvents.push(['movein', fn]); - }, - - onTouchStart: function (fn) { - this.wrapper.addEventListener(this.id + 'swipeview-touchstart', fn, false); - this.customEvents.push(['touchstart', fn]); - }, - - destroy: function () { - while ( this.customEvents.length ) { - this.wrapper.removeEventListener(this.id + 'swipeview-' + this.customEvents[0][0], this.customEvents[0][1], false); - this.customEvents.shift(); - } - - // Remove the event listeners - window.removeEventListener(resizeEvent, this, false); - this.wrapper.removeEventListener(startEvent, this, false); - this.wrapper.removeEventListener(moveEvent, this, false); - this.wrapper.removeEventListener(endEvent, this, false); - this.slider.removeEventListener(transitionEndEvent, this, false); - - if (!hasTouch) { - this.wrapper.removeEventListener('mouseout', this, false); - } - }, - - refreshSize: function () { + onFlip: function (fn) { + this.wrapper.addEventListener(this.id + 'swipeview-flip', fn, false); + this.customEvents.push(['flip', fn]); + }, + + onMoveOut: function (fn) { + this.wrapper.addEventListener(this.id + 'swipeview-moveout', fn, false); + this.customEvents.push(['moveout', fn]); + }, + + onMoveIn: function (fn) { + this.wrapper.addEventListener(this.id + 'swipeview-movein', fn, false); + this.customEvents.push(['movein', fn]); + }, + + onTouchStart: function (fn) { + this.wrapper.addEventListener(this.id + 'swipeview-touchstart', fn, false); + this.customEvents.push(['touchstart', fn]); + }, + + destroy: function () { + while ( this.customEvents.length ) { + this.wrapper.removeEventListener(this.id + 'swipeview-' + this.customEvents[0][0], this.customEvents[0][1], false); + this.customEvents.shift(); + } + + // Remove the event listeners + window.removeEventListener(resizeEvent, this, false); + this.wrapper.removeEventListener(startEvent, this, false); + this.wrapper.removeEventListener(moveEvent, this, false); + this.wrapper.removeEventListener(endEvent, this, false); + this.slider.removeEventListener(transitionEndEvent, this, false); + + if (!hasTouch) { + this.wrapper.removeEventListener('mouseout', this, false); + } + }, + + refreshSize: function () { // FIXME, get container width/height if wrapper width/height equals 0 - this.wrapperWidth = this.wrapper.clientWidth === 0 ? 1024 : this.wrapper.clientWidth; - this.wrapperHeight = this.wrapper.clientHeight === 0 ? 145 : this.wrapper.clientHeight; - this.wrapperSize = this.options.vertical ? this.wrapperHeight : this.wrapperWidth; - this.pageSize = this.options.vertical ? this.wrapperHeight : this.wrapperWidth; - this.maxX = -this.options.numberOfPages * this.pageSize + this.wrapperSize; - this.snapThreshold = this.options.snapThreshold === null ? - Math.round(this.pageSize * 0.15) : - /%/.test(this.options.snapThreshold) ? - Math.round(this.pageSize * this.options.snapThreshold.replace('%', '') / 100) : - this.options.snapThreshold; - }, - - updatePageCount: function (n) { - this.options.numberOfPages = n; - this.maxX = -this.options.numberOfPages * this.pageSize + this.wrapperSize; - }, - - goToPage: function (p) { - var i; - - this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); - for (i=0; i<3; i++) { - className = this.masterPages[i].className; - /(^|\s)swipeview-loading(\s|$)/.test(className) || (this.masterPages[i].className = !className ? 'swipeview-loading' : className + ' swipeview-loading'); - } - - p = p < 0 ? 0 : p > this.options.numberOfPages-1 ? this.options.numberOfPages-1 : p; - this.page = p; - this.pageIndex = p; - this.slider.style[transitionDuration] = '0s'; - this.__pos(-p * this.pageSize); - - this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; - - this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className + ' swipeview-active'; - - if (this.currentMasterPage === 0) { - this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; - this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; - this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; - - this.masterPages[2].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; - this.masterPages[0].dataset.upcomingPageIndex = this.page; - this.masterPages[1].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; - } else if (this.currentMasterPage == 1) { - this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; - this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; - this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; - - this.masterPages[0].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; - this.masterPages[1].dataset.upcomingPageIndex = this.page; - this.masterPages[2].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; - } else { - this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; - this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; - this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; - - this.masterPages[1].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; - this.masterPages[2].dataset.upcomingPageIndex = this.page; - this.masterPages[0].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; - } - - this.__flip(); - }, - - next: function () { - if (!this.options.loop && this.k == this.maxX) return; - - this.direction = -1; - this.k -= 1; - this.__checkPosition(); - }, - - prev: function () { - if (!this.options.loop && this.k === 0) return; - - this.direction = 1; - this.k += 1; - this.__checkPosition(); - }, - - handleEvent: function (e) { - switch (e.type) { - case startEvent: - this.__start(e); - break; - case moveEvent: - this.__move(e); - break; - case "mouseout": + this.wrapperWidth = this.wrapper.clientWidth === 0 ? 1024 : this.wrapper.clientWidth; + this.wrapperHeight = this.wrapper.clientHeight === 0 ? 145 : this.wrapper.clientHeight; + this.wrapperSize = this.options.vertical ? this.wrapperHeight : this.wrapperWidth; + this.pageSize = this.options.vertical ? this.wrapperHeight : this.wrapperWidth; + this.maxX = -this.options.numberOfPages * this.pageSize + this.wrapperSize; + this.snapThreshold = this.options.snapThreshold === null ? + Math.round(this.pageSize * 0.15) : + /%/.test(this.options.snapThreshold) ? + Math.round(this.pageSize * this.options.snapThreshold.replace('%', '') / 100) : + this.options.snapThreshold; + }, + + updatePageCount: function (n) { + this.options.numberOfPages = n; + this.maxX = -this.options.numberOfPages * this.pageSize + this.wrapperSize; + }, + + goToPage: function (p) { + var i; + + this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); + for (i=0; i<3; i++) { + className = this.masterPages[i].className; + /(^|\s)swipeview-loading(\s|$)/.test(className) || (this.masterPages[i].className = !className ? 'swipeview-loading' : className + ' swipeview-loading'); + } + + p = p < 0 ? 0 : p > this.options.numberOfPages-1 ? this.options.numberOfPages-1 : p; + this.page = p; + this.pageIndex = p; + this.slider.style[transitionDuration] = '0s'; + this.__pos(-p * this.pageSize); + + this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; + + this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className + ' swipeview-active'; + + if (this.currentMasterPage === 0) { + this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; + this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; + this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; + + this.masterPages[2].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; + this.masterPages[0].dataset.upcomingPageIndex = this.page; + this.masterPages[1].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; + } else if (this.currentMasterPage == 1) { + this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; + this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; + this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; + + this.masterPages[0].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; + this.masterPages[1].dataset.upcomingPageIndex = this.page; + this.masterPages[2].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; + } else { + this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; + this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; + this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; + + this.masterPages[1].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; + this.masterPages[2].dataset.upcomingPageIndex = this.page; + this.masterPages[0].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; + } + + this.__flip(); + }, + + next: function () { + if (!this.options.loop && this.k == this.maxX) return; + + this.direction = -1; + this.k -= 1; + this.__checkPosition(); + }, + + prev: function () { + if (!this.options.loop && this.k === 0) return; + + this.direction = 1; + this.k += 1; + this.__checkPosition(); + }, + + handleEvent: function (e) { + switch (e.type) { + case startEvent: + this.__start(e); + break; + case moveEvent: + this.__move(e); + break; + case "mouseout": if (!this.initiated) { break; } else if ( e.toElement == document.childNodes[1]) { } else if ( e.toElement != this.wrapper.parentNode ) { break; } case cancelEvent: - case endEvent: - this.__end(e); - break; - case resizeEvent: - this.__resize(); - break; - case transitionEndEvent: - case 'otransitionend': - if (e.target == this.slider && !this.options.hastyPageFlip) this.__flip(); - break; - } - }, - - - /** - * - * Pseudo private methods - * - */ - __pos: function (k) { - this.k = k; - this.slider.style[transform] = (this.options.vertical ? 'translate(0,' + k + 'px)' : 'translate(' + k + 'px,0)') + translateZ; - }, - - __resize: function () { - this.refreshSize(); - this.slider.style[transitionDuration] = '0s'; - this.__pos(-this.page * this.pageSize); - }, - - __start: function (e) { - //e.preventDefault(); - - if (this.initiated) return; - - var point = hasTouch ? e.targetTouches[0] : e; - - this.initiated = true; - this.identifier = point.identifier; - this.moved = false; - this.thresholdExceeded = false; - this.startX = point.pageX; - this.startY = point.pageY; - this.pointX = point.pageX; - this.pointY = point.pageY; - this.stepsX = 0; - this.stepsY = 0; - this.direction = 0; - this.directionLocked = false; - -/* var matrix = getComputedStyle(this.slider, null).webkitTransform.replace(/[^0-9-.,]/g, '').split(','); - this.x = matrix[4] * 1;*/ - - this.slider.style[transitionDuration] = '0s'; - - this.__event('touchstart'); - }, - - __move: function (e) { - if (!this.initiated) return; - var i, l, point; - - if (hasTouch) { - i = 0; - l = e.changedTouches.length; - for(;i 0 ? 1 : deltaY < 0 ? -1 : 0): (deltaX > 0 ? 1 : deltaX < 0 ? -1 : 0); - this.stepsX += Math.abs(deltaX); - this.stepsY += Math.abs(deltaY); - - // We take a 10px buffer to figure out the direction of the swipe - if (this.stepsX < 10 && this.stepsY < 10) { -// e.preventDefault(); - return; - } - - // We are scrolling vertically, so skip SwipeView and give the control back to the browser - if (!this.directionLocked && (this.options.vertical ? this.stepsX > this.stepsY : this.stepsY > this.stepsX)) { - this.initiated = false; - return; - } - - e.preventDefault(); - - this.directionLocked = true; - - if (!this.options.loop && (newC > 0 || newC < this.maxC)) { - newC = this.k + ((this.options.vertical ?deltaY : deltaX) / 2); - } - - if (!this.thresholdExceeded && dist >= this.snapThreshold) { - this.thresholdExceeded = true; - this.__event('moveout'); - } else if (this.thresholdExceeded && dist < this.snapThreshold) { - this.thresholdExceeded = false; - this.__event('movein'); - } - - this.__pos(newC); - }, - - __end: function (e) { - if (!this.initiated) return; - - var point; - - if(hasTouch) { - var i=0, l=e.touches.length; - for(;i 0 ? 1 : deltaY < 0 ? -1 : 0): (deltaX > 0 ? 1 : deltaX < 0 ? -1 : 0); + this.stepsX += Math.abs(deltaX); + this.stepsY += Math.abs(deltaY); + + // We take a 10px buffer to figure out the direction of the swipe + if (this.stepsX < 10 && this.stepsY < 10) { +// e.preventDefault(); + return; + } + + // We are scrolling vertically, so skip SwipeView and give the control back to the browser + if (!this.directionLocked && (this.options.vertical ? this.stepsX > this.stepsY : this.stepsY > this.stepsX)) { + this.initiated = false; + return; + } + + e.preventDefault(); + + this.directionLocked = true; + + if (!this.options.loop && (newC > 0 || newC < this.maxC)) { + newC = this.k + ((this.options.vertical ?deltaY : deltaX) / 2); + } + + if (!this.thresholdExceeded && dist >= this.snapThreshold) { + this.thresholdExceeded = true; + this.__event('moveout'); + } else if (this.thresholdExceeded && dist < this.snapThreshold) { + this.thresholdExceeded = false; + this.__event('movein'); + } + + this.__pos(newC); + }, + + __end: function (e) { + if (!this.initiated) return; + + var point; + + if(hasTouch) { + var i=0, l=e.touches.length; + for(;i 0 || this.k < this.maxX)) { - dist = 0; - this.__event('movein'); - } - - // Check if we exceeded the snap threshold - if (dist < this.snapThreshold) { - this.slider.style[transitionDuration] = Math.floor(300 * dist / this.snapThreshold) + 'ms'; - this.__pos(-this.page * this.pageSize); - return; - } - - this.__checkPosition(); - }, - - __checkPosition: function () { - var pageFlip, - pageFlipIndex, - className; - - this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); - - // Flip the page - if (this.direction > 0) { - this.page = -Math.ceil(this.k / this.pageSize); - this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; - this.pageIndex = this.pageIndex === 0 ? this.options.numberOfPages - 1 : this.pageIndex - 1; - - pageFlip = this.currentMasterPage - 1; - pageFlip = pageFlip < 0 ? 2 : pageFlip; - this.masterPages[pageFlip].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; - - pageFlipIndex = this.page - 1; - } else { - this.page = -Math.floor(this.k / this.pageSize); - this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; - this.pageIndex = this.pageIndex == this.options.numberOfPages - 1 ? 0 : this.pageIndex + 1; - - pageFlip = this.currentMasterPage + 1; - pageFlip = pageFlip > 2 ? 0 : pageFlip; - this.masterPages[pageFlip].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; - - pageFlipIndex = this.page + 1; - } - - // Add active class to current page - className = this.masterPages[this.currentMasterPage].className; - /(^|\s)swipeview-active(\s|$)/.test(className) || (this.masterPages[this.currentMasterPage].className = !className ? 'swipeview-active' : className + ' swipeview-active'); - - // Add loading class to flipped page - className = this.masterPages[pageFlip].className; - /(^|\s)swipeview-loading(\s|$)/.test(className) || (this.masterPages[pageFlip].className = !className ? 'swipeview-loading' : className + ' swipeview-loading'); - - pageFlipIndex = pageFlipIndex - Math.floor(pageFlipIndex / this.options.numberOfPages) * this.options.numberOfPages; - this.masterPages[pageFlip].dataset.upcomingPageIndex = pageFlipIndex; // Index to be loaded in the newly flipped page - - newC = -this.page * this.pageSize; - - this.slider.style[transitionDuration] = Math.floor(500 * Math.abs(this.k - newC) / this.pageSize) + 'ms'; - - // Hide the next page if we decided to disable looping - if (!this.options.loop) { - this.masterPages[pageFlip].style.visibility = newC === 0 || newC == this.maxX ? 'hidden' : ''; - } - - if (this.k == newC) { - this.__flip(); // If we swiped all the way long to the next page (extremely rare but still) - } else { - this.__pos(newC); - if (this.options.hastyPageFlip) this.__flip(); - } - }, - - __flip: function () { - this.__event('flip'); - - for (var i=0; i<3; i++) { - this.masterPages[i].className = this.masterPages[i].className.replace(/(^|\s)swipeview-loading(\s|$)/, ''); // Remove the loading class - this.masterPages[i].dataset.pageIndex = this.masterPages[i].dataset.upcomingPageIndex; - } - }, - - __event: function (type) { - var ev = document.createEvent("Event"); - - ev.initEvent(this.id + '-swipeview-' + type, true, true); - - this.wrapper.dispatchEvent(ev); - } - }; - - function prefixStyle (style) { - if ( vendor === '' ) return style; - - style = style.charAt(0).toUpperCase() + style.substr(1); - return vendor + style; - } - - return SwipeView; + } + else { + point = e; + } + + var dist = this.options.vertical ? Math.abs(point.pageY - this.startY) : Math.abs(point.pageX - this.startX); + + + this.initiated = false; + + if (!this.moved) return; + + if (!this.options.loop && (this.k > 0 || this.k < this.maxX)) { + dist = 0; + this.__event('movein'); + } + + // Check if we exceeded the snap threshold + if (dist < this.snapThreshold) { + this.slider.style[transitionDuration] = Math.floor(300 * dist / this.snapThreshold) + 'ms'; + this.__pos(-this.page * this.pageSize); + return; + } + + this.__checkPosition(); + }, + + __checkPosition: function () { + var pageFlip, + pageFlipIndex, + className; + + this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); + + // Flip the page + if (this.direction > 0) { + this.page = -Math.ceil(this.k / this.pageSize); + this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; + this.pageIndex = this.pageIndex === 0 ? this.options.numberOfPages - 1 : this.pageIndex - 1; + + pageFlip = this.currentMasterPage - 1; + pageFlip = pageFlip < 0 ? 2 : pageFlip; + this.masterPages[pageFlip].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; + + pageFlipIndex = this.page - 1; + } else { + this.page = -Math.floor(this.k / this.pageSize); + this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; + this.pageIndex = this.pageIndex == this.options.numberOfPages - 1 ? 0 : this.pageIndex + 1; + + pageFlip = this.currentMasterPage + 1; + pageFlip = pageFlip > 2 ? 0 : pageFlip; + this.masterPages[pageFlip].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; + + pageFlipIndex = this.page + 1; + } + + // Add active class to current page + className = this.masterPages[this.currentMasterPage].className; + /(^|\s)swipeview-active(\s|$)/.test(className) || (this.masterPages[this.currentMasterPage].className = !className ? 'swipeview-active' : className + ' swipeview-active'); + + // Add loading class to flipped page + className = this.masterPages[pageFlip].className; + /(^|\s)swipeview-loading(\s|$)/.test(className) || (this.masterPages[pageFlip].className = !className ? 'swipeview-loading' : className + ' swipeview-loading'); + + pageFlipIndex = pageFlipIndex - Math.floor(pageFlipIndex / this.options.numberOfPages) * this.options.numberOfPages; + this.masterPages[pageFlip].dataset.upcomingPageIndex = pageFlipIndex; // Index to be loaded in the newly flipped page + + newC = -this.page * this.pageSize; + + this.slider.style[transitionDuration] = Math.floor(500 * Math.abs(this.k - newC) / this.pageSize) + 'ms'; + + // Hide the next page if we decided to disable looping + if (!this.options.loop) { + this.masterPages[pageFlip].style.visibility = newC === 0 || newC == this.maxX ? 'hidden' : ''; + } + + if (this.k == newC) { + this.__flip(); // If we swiped all the way long to the next page (extremely rare but still) + } else { + this.__pos(newC); + if (this.options.hastyPageFlip) this.__flip(); + } + }, + + __flip: function () { + this.__event('flip'); + + for (var i=0; i<3; i++) { + this.masterPages[i].className = this.masterPages[i].className.replace(/(^|\s)swipeview-loading(\s|$)/, ''); // Remove the loading class + this.masterPages[i].dataset.pageIndex = this.masterPages[i].dataset.upcomingPageIndex; + } + }, + + __event: function (type) { + var ev = document.createEvent("Event"); + + ev.initEvent(this.id + '-swipeview-' + type, true, true); + + this.wrapper.dispatchEvent(ev); + } + }; + + function prefixStyle (style) { + if ( vendor === '' ) return style; + + style = style.charAt(0).toUpperCase() + style.substr(1); + return vendor + style; + } + + return SwipeView; })(window, document); From b965bc11629c2966406db2002a9527afc1ec30e4 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Mon, 1 Jul 2013 15:19:31 +0200 Subject: [PATCH 31/61] allow to specify clientHeight and clientWidth in the option needed when, the wrapper is not visible and has no size yet --- src/swipeview.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 7b12c13..c78e9d0 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -70,7 +70,9 @@ var SwipeView = (function (window, document) { snapThreshold: null, hastyPageFlip: false, vertical: false, - loop: true + loop: true, + clientWidth: 1024, + clientHeight: 145 }; // User defined options @@ -171,9 +173,8 @@ var SwipeView = (function (window, document) { }, refreshSize: function () { - // FIXME, get container width/height if wrapper width/height equals 0 - this.wrapperWidth = this.wrapper.clientWidth === 0 ? 1024 : this.wrapper.clientWidth; - this.wrapperHeight = this.wrapper.clientHeight === 0 ? 145 : this.wrapper.clientHeight; + this.wrapperWidth = this.wrapper.clientWidth === 0 ? this.options.clientWidth : this.wrapper.clientWidth; + this.wrapperHeight = this.wrapper.clientHeight === 0 ? this.options.clientHeight : this.wrapper.clientHeight; this.wrapperSize = this.options.vertical ? this.wrapperHeight : this.wrapperWidth; this.pageSize = this.options.vertical ? this.wrapperHeight : this.wrapperWidth; this.maxX = -this.options.numberOfPages * this.pageSize + this.wrapperSize; From e5d766ffb74d073c469c34648b73236134858496 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Mon, 1 Jul 2013 18:08:01 +0200 Subject: [PATCH 32/61] tiny refactoring --- src/swipeview.js | 73 ++++++++++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 27 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index c78e9d0..00980c9 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -78,6 +78,29 @@ var SwipeView = (function (window, document) { // User defined options for (i in options) this.options[i] = options[i]; + this.currentMasterPage = 1; + this.k = 0; + this.maxK = 0; + this.page = 0; + this.pageIndex = 0; + this.customEvents = []; + this.wrapperWidth = 0; + this.wrapperHeight = 0; + this.pageSize = 0; + this.initiated = false; + this.identifier = null; + this.moved = false; + this.thresholdExceeded = false; + this.startX = 0; + this.startX = 0; + this.pointX = 0; + this.pointY = 0; + this.stepsX = 0; + this.stepsY = 0; + this.direction = 0; + this.directionLocked = false; + this.cssPosition = this.options.vertical ? 'top' : 'left'; + this.wrapper.style.overflow = 'hidden'; this.wrapper.style.position = 'relative'; @@ -85,7 +108,10 @@ var SwipeView = (function (window, document) { div = document.createElement('div'); div.className = 'swipeview-slider'; - div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' + cssVendor + 'transition-duration:0;' + cssVendor + 'transform:translateZ(0);' + cssVendor + 'transition-timing-function:ease-out'; + div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' + + cssVendor + 'transition-duration:0;' + + cssVendor + 'transform:translateZ(0);' + + cssVendor + 'transition-timing-function:ease-out'; this.wrapper.appendChild(div); this.slider = div; @@ -93,7 +119,9 @@ var SwipeView = (function (window, document) { for (i=-1; i<2; i++) { div = document.createElement('div'); - div.style.cssText = cssVendor + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;' + (this.options.vertical ? 'top' : 'left') + ':' + i*100 + '%'; + div.style.cssText = cssVendor + + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;' + + this.cssPosition + ':' + i*100 + '%'; if (!div.dataset) div.dataset = {}; pageIndex = i == -1 ? this.options.numberOfPages - 1 : i; div.dataset.pageIndex = pageIndex; @@ -122,12 +150,6 @@ var SwipeView = (function (window, document) { }; SwipeView.prototype = { - currentMasterPage: 1, - k: 0, - page: 0, - pageIndex: 0, - customEvents: [], - reset : function (pageCount) { this.goToPage(0); this.updatePageCount(pageCount); @@ -177,7 +199,7 @@ var SwipeView = (function (window, document) { this.wrapperHeight = this.wrapper.clientHeight === 0 ? this.options.clientHeight : this.wrapper.clientHeight; this.wrapperSize = this.options.vertical ? this.wrapperHeight : this.wrapperWidth; this.pageSize = this.options.vertical ? this.wrapperHeight : this.wrapperWidth; - this.maxX = -this.options.numberOfPages * this.pageSize + this.wrapperSize; + this.maxK = -this.options.numberOfPages * this.pageSize + this.wrapperSize; this.snapThreshold = this.options.snapThreshold === null ? Math.round(this.pageSize * 0.15) : /%/.test(this.options.snapThreshold) ? @@ -187,7 +209,7 @@ var SwipeView = (function (window, document) { updatePageCount: function (n) { this.options.numberOfPages = n; - this.maxX = -this.options.numberOfPages * this.pageSize + this.wrapperSize; + this.maxK = -this.options.numberOfPages * this.pageSize + this.wrapperSize; }, goToPage: function (p) { @@ -210,25 +232,25 @@ var SwipeView = (function (window, document) { this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className + ' swipeview-active'; if (this.currentMasterPage === 0) { - this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; - this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; - this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; + this.masterPages[2].style[this.cssPosition] = this.page * 100 - 100 + '%'; + this.masterPages[0].style[this.cssPosition] = this.page * 100 + '%'; + this.masterPages[1].style[this.cssPosition] = this.page * 100 + 100 + '%'; this.masterPages[2].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; this.masterPages[0].dataset.upcomingPageIndex = this.page; this.masterPages[1].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; } else if (this.currentMasterPage == 1) { - this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; - this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; - this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; + this.masterPages[0].style[this.cssPosition] = this.page * 100 - 100 + '%'; + this.masterPages[1].style[this.cssPosition] = this.page * 100 + '%'; + this.masterPages[2].style[this.cssPosition] = this.page * 100 + 100 + '%'; this.masterPages[0].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; this.masterPages[1].dataset.upcomingPageIndex = this.page; this.masterPages[2].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; } else { - this.masterPages[1].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; - this.masterPages[2].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + '%'; - this.masterPages[0].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; + this.masterPages[1].style[this.cssPosition] = this.page * 100 - 100 + '%'; + this.masterPages[2].style[this.cssPosition] = this.page * 100 + '%'; + this.masterPages[0].style[this.cssPosition] = this.page * 100 + 100 + '%'; this.masterPages[1].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; this.masterPages[2].dataset.upcomingPageIndex = this.page; @@ -239,7 +261,7 @@ var SwipeView = (function (window, document) { }, next: function () { - if (!this.options.loop && this.k == this.maxX) return; + if (!this.options.loop && this.k == this.maxK) return; this.direction = -1; this.k -= 1; @@ -317,9 +339,6 @@ var SwipeView = (function (window, document) { this.direction = 0; this.directionLocked = false; -/* var matrix = getComputedStyle(this.slider, null).webkitTransform.replace(/[^0-9-.,]/g, '').split(','); - this.x = matrix[4] * 1;*/ - this.slider.style[transitionDuration] = '0s'; this.__event('touchstart'); @@ -418,7 +437,7 @@ var SwipeView = (function (window, document) { if (!this.moved) return; - if (!this.options.loop && (this.k > 0 || this.k < this.maxX)) { + if (!this.options.loop && (this.k > 0 || this.k < this.maxK)) { dist = 0; this.__event('movein'); } @@ -448,7 +467,7 @@ var SwipeView = (function (window, document) { pageFlip = this.currentMasterPage - 1; pageFlip = pageFlip < 0 ? 2 : pageFlip; - this.masterPages[pageFlip].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 - 100 + '%'; + this.masterPages[pageFlip].style[this.cssPosition] = this.page * 100 - 100 + '%'; pageFlipIndex = this.page - 1; } else { @@ -458,7 +477,7 @@ var SwipeView = (function (window, document) { pageFlip = this.currentMasterPage + 1; pageFlip = pageFlip > 2 ? 0 : pageFlip; - this.masterPages[pageFlip].style[this.options.vertical ? 'top' : 'left'] = this.page * 100 + 100 + '%'; + this.masterPages[pageFlip].style[this.cssPosition] = this.page * 100 + 100 + '%'; pageFlipIndex = this.page + 1; } @@ -480,7 +499,7 @@ var SwipeView = (function (window, document) { // Hide the next page if we decided to disable looping if (!this.options.loop) { - this.masterPages[pageFlip].style.visibility = newC === 0 || newC == this.maxX ? 'hidden' : ''; + this.masterPages[pageFlip].style.visibility = newC === 0 || newC == this.maxK ? 'hidden' : ''; } if (this.k == newC) { From a2e444d43ba6d67f459df531c1cce9a16b93fdda Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Mon, 1 Jul 2013 18:16:59 +0200 Subject: [PATCH 33/61] improve README --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ceb4d06..eb3b23a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ -SwipeView v1.0 - 2012-08-25 -============================ +SwipeView v1.0.4 - 2013-07-01 +============================= + +Modified version of Matteo's SwipeView which allows vertical swipe (with the `vertical` option) and also allows multiple SwipeViews in the same document: + +example: Multiple SwipeViews in the same document + vertical swipe: [http://peutetre.github.io/SwipeView/demo/gallery7/](http://peutetre.github.io/SwipeView/demo/gallery7/) Virtually infinite loop-able horizontal carousel for desktop and mobile browsers. @@ -7,8 +11,6 @@ Read more at [cubiq.org](http://cubiq.org/swipeview) Gallery Demo: [http://cubiq.org/dropbox/SwipeView/demo/gallery](http://cubiq.org/dropbox/SwipeView/demo/gallery) -Multiple SwipeViews in the same document: [http://peutetre.github.io/SwipeView/demo/gallery2/](http://peutetre.github.io/SwipeView/demo/gallery2/) - eReader Demo: [http://cubiq.org/dropbox/SwipeView/demo/ereader](http://cubiq.org/dropbox/SwipeView/demo/ereader) Inline Demo: [http://cubiq.org/dropbox/SwipeView/demo/inline](http://cubiq.org/dropbox/SwipeView/demo/inline) From 9b9d50278d66da984f6a0d8af8e9b02116abfbdc Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Mon, 1 Jul 2013 18:16:59 +0200 Subject: [PATCH 34/61] improve README --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ceb4d06..eb3b23a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ -SwipeView v1.0 - 2012-08-25 -============================ +SwipeView v1.0.4 - 2013-07-01 +============================= + +Modified version of Matteo's SwipeView which allows vertical swipe (with the `vertical` option) and also allows multiple SwipeViews in the same document: + +example: Multiple SwipeViews in the same document + vertical swipe: [http://peutetre.github.io/SwipeView/demo/gallery7/](http://peutetre.github.io/SwipeView/demo/gallery7/) Virtually infinite loop-able horizontal carousel for desktop and mobile browsers. @@ -7,8 +11,6 @@ Read more at [cubiq.org](http://cubiq.org/swipeview) Gallery Demo: [http://cubiq.org/dropbox/SwipeView/demo/gallery](http://cubiq.org/dropbox/SwipeView/demo/gallery) -Multiple SwipeViews in the same document: [http://peutetre.github.io/SwipeView/demo/gallery2/](http://peutetre.github.io/SwipeView/demo/gallery2/) - eReader Demo: [http://cubiq.org/dropbox/SwipeView/demo/ereader](http://cubiq.org/dropbox/SwipeView/demo/ereader) Inline Demo: [http://cubiq.org/dropbox/SwipeView/demo/inline](http://cubiq.org/dropbox/SwipeView/demo/inline) From 8a730100802bf2e788b88eaeaf9c400908ece6dd Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 2 Jul 2013 11:18:47 +0200 Subject: [PATCH 35/61] refactoring demo gallery7 --- demo/gallery7/app.js | 60 ++++++++++++++++ demo/gallery7/index.html | 149 ++++----------------------------------- 2 files changed, 75 insertions(+), 134 deletions(-) create mode 100644 demo/gallery7/app.js diff --git a/demo/gallery7/app.js b/demo/gallery7/app.js new file mode 100644 index 0000000..c97bafc --- /dev/null +++ b/demo/gallery7/app.js @@ -0,0 +1,60 @@ +/** + * app.js + */ + +function genData(size) { + + function getImgURL() { + return "http://lorempixel.com/186/125/?t=" + Math.ceil(Math.random()*100000); + } + + return { + get : function (i) { + return { + imgs : [getImgURL(), getImgURL(), getImgURL(), getImgURL(), getImgURL()], + height : 125, + width : 186 + }; + }, + length : size + }; +} + +var gallery, el, i = 0, page; + +gallery = new SwipeView('#wrapper', { + numberOfPages: 100, + vertical: true, + hastyPageFlip:true +}); + +function init(domElt, myGallery, id, idx) { + domElt = document.createElement('div'); + domElt.className = 'wrapper'; + domElt.id = "wrap" + idx + "-" + id; + + myGallery.masterPages[id]['swipeview'+idx] = InfiniteGraphSet(domElt, genData(100)); + myGallery.masterPages[id].appendChild(domElt); +} + +// Load initial data +for (; i<3; i++) { + page = i==0 ? 100-1 : i-1; + init(el, gallery, i, 0); + init(el, gallery, i, 1); + init(el, gallery, i, 2); + init(el, gallery, i, 3); +} + +gallery.onFlip(function () { + var upcoming, i=0; + for (; i<3; i++) { + upcoming = gallery.masterPages[i].dataset.upcomingPageIndex; + if (upcoming != gallery.masterPages[i].dataset.pageIndex) { + gallery.masterPages[i].swipeview0.reset(genData(100)); + gallery.masterPages[i].swipeview1.reset(genData(100)); + gallery.masterPages[i].swipeview2.reset(genData(100)); + gallery.masterPages[i].swipeview3.reset(genData(100)); + } + } +}); diff --git a/demo/gallery7/index.html b/demo/gallery7/index.html index 6170433..c9a862b 100644 --- a/demo/gallery7/index.html +++ b/demo/gallery7/index.html @@ -1,137 +1,18 @@ - - - - - - SwipeView - - - - - - -
- - - + + + + + + SwipeView + + + + +
+ + + + From 6398e7415e2c5bc292e059fca023166aed07f05f Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Thu, 4 Jul 2013 15:15:33 +0200 Subject: [PATCH 36/61] add package.json + Gruntfile.js + pass jshint --- .gitignore | 3 +- Gruntfile.js | 32 ++++++++++++++++++++ dist/swipeview.min.js | 2 ++ package.json | 30 +++++++++++++++++++ src/swipeview.js | 69 ++++++++++++++++++++++--------------------- 5 files changed, 102 insertions(+), 34 deletions(-) create mode 100644 Gruntfile.js create mode 100644 dist/swipeview.min.js create mode 100644 package.json diff --git a/.gitignore b/.gitignore index 6b319f8..365a945 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ .DS_Store -*-min.js \ No newline at end of file +*-min.js +/node_modules/ \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js new file mode 100644 index 0000000..b1f7010 --- /dev/null +++ b/Gruntfile.js @@ -0,0 +1,32 @@ +module.exports = function(grunt) { + + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + uglify: { + options: { + banner: '/*! <%= pkg.name %> <%= pkg.version %> - <%= pkg.description %> */\n' + }, + build: { + src: 'src/<%= pkg.name %>.js', + dest: 'dist/<%= pkg.name %>.min.js' + } + }, + jshint: { + all: { + src: ['src/<%= pkg.name %>.js'] + } + }, + watch: { + all: { + files: ['src/*.js'], + tasks: ['default'] + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-jshint'); + + grunt.registerTask('default', ['jshint', 'uglify']); +}; diff --git a/dist/swipeview.min.js b/dist/swipeview.min.js new file mode 100644 index 0000000..2e2c835 --- /dev/null +++ b/dist/swipeview.min.js @@ -0,0 +1,2 @@ +/*! swipeview 1.0.4 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo */ +var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push(["touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":this.initiated&&a.toElement==b.childNodes[1]&&this.__end();break;case p:case o:this.__end(a);break;case l:this.__resize();break;case q:case"otransitionend":a.target!=this.slider||this.options.hastyPageFlip||this.__flip()}},__pos:function(a){this.k=a,this.slider.style[g]=(this.options.vertical?"translate(0,"+a+"px)":"translate("+a+"px,0)")+k},__resize:function(){this.refreshSize(),this.slider.style[h]="0s",this.__pos(-this.page*this.pageSize)},__start:function(a){if(!this.initiated){var b=j?a.targetTouches[0]:a;this.initiated=!0,this.identifier=b.identifier,this.moved=!1,this.thresholdExceeded=!1,this.startX=b.pageX,this.startY=b.pageY,this.pointX=b.pageX,this.pointY=b.pageY,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.slider.style[h]="0s",this.__event("touchstart")}},__move:function(a){if(this.initiated){var b,c,d;if(j){for(b=0,c=a.changedTouches.length;c>b;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),!(this.stepsX<10&&this.stepsY<10)){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"-swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..14c0066 --- /dev/null +++ b/package.json @@ -0,0 +1,30 @@ +{ + "name": "swipeview", + "version": "1.0.5", + "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo", + "keywords": [ + "swipe", + "mobile", + "carousel", + "infinite" + ], + "author": "Matteo Spinelli (http://cubiq.org/)", + "contributors": [{ + "name" : "Paul Panserrieu", + "email": "paul@42loops.com", + "url" : "http://42loops.com" + }], + "dependencies" : { }, + "devDependencies": { + "grunt": "~0.4.1", + "grunt-contrib-jshint": "~0.6.0", + "grunt-contrib-uglify": "~0.2.2", + "grunt-contrib-watch": "~0.4.4" + }, + "main": "src/swipeview.js", + "license": "MIT", + "repository": { + "type": "git", + "url": "git@github.com:peutetre/SwipeView.git" + } +} diff --git a/src/swipeview.js b/src/swipeview.js index 00980c9..d51beea 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -2,6 +2,7 @@ * SwipeView v1.0 ~ Copyright (c) 2012 Matteo Spinelli, http://cubiq.org * Released under MIT license, http://cubiq.org/license */ + var SwipeView = (function (window, document) { var dummyStyle = document.createElement('div').style, vendor = (function () { @@ -108,10 +109,10 @@ var SwipeView = (function (window, document) { div = document.createElement('div'); div.className = 'swipeview-slider'; - div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' - + cssVendor + 'transition-duration:0;' - + cssVendor + 'transform:translateZ(0);' - + cssVendor + 'transition-timing-function:ease-out'; + div.style.cssText = 'position:relative;top:0;height:100%;width:100%;' + + cssVendor + 'transition-duration:0;' + + cssVendor + 'transform:translateZ(0);' + + cssVendor + 'transition-timing-function:ease-out'; this.wrapper.appendChild(div); this.slider = div; @@ -119,9 +120,9 @@ var SwipeView = (function (window, document) { for (i=-1; i<2; i++) { div = document.createElement('div'); - div.style.cssText = cssVendor - + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;' - + this.cssPosition + ':' + i*100 + '%'; + div.style.cssText = cssVendor + + 'transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;' + + this.cssPosition + ':' + i*100 + '%'; if (!div.dataset) div.dataset = {}; pageIndex = i == -1 ? this.options.numberOfPages - 1 : i; div.dataset.pageIndex = pageIndex; @@ -218,7 +219,8 @@ var SwipeView = (function (window, document) { this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/, ''); for (i=0; i<3; i++) { className = this.masterPages[i].className; - /(^|\s)swipeview-loading(\s|$)/.test(className) || (this.masterPages[i].className = !className ? 'swipeview-loading' : className + ' swipeview-loading'); + if(!/(^|\s)swipeview-loading(\s|$)/.test(className)) + this.masterPages[i].className = !className ? 'swipeview-loading' : className + ' swipeview-loading'; } p = p < 0 ? 0 : p > this.options.numberOfPages-1 ? this.options.numberOfPages-1 : p; @@ -278,27 +280,26 @@ var SwipeView = (function (window, document) { handleEvent: function (e) { switch (e.type) { - case startEvent: - this.__start(e); - break; - case moveEvent: - this.__move(e); - break; - case "mouseout": - if (!this.initiated) { break; } - else if ( e.toElement == document.childNodes[1]) { } - else if ( e.toElement != this.wrapper.parentNode ) { break; } - case cancelEvent: - case endEvent: - this.__end(e); - break; - case resizeEvent: - this.__resize(); - break; - case transitionEndEvent: - case 'otransitionend': - if (e.target == this.slider && !this.options.hastyPageFlip) this.__flip(); - break; + case startEvent: + this.__start(e); + break; + case moveEvent: + this.__move(e); + break; + case "mouseout": + if (this.initiated && e.toElement == document.childNodes[1]) this.__end(); + break; + case cancelEvent: + case endEvent: + this.__end(e); + break; + case resizeEvent: + this.__resize(); + break; + case transitionEndEvent: + case 'otransitionend': + if (e.target == this.slider && !this.options.hastyPageFlip) this.__flip(); + break; } }, @@ -410,12 +411,12 @@ var SwipeView = (function (window, document) { var point; if(hasTouch) { - var i=0, l=e.touches.length; + var i=0, l = e.touches.length; for(;i Date: Thu, 4 Jul 2013 15:18:30 +0200 Subject: [PATCH 37/61] update read me --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index eb3b23a..94deb76 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -SwipeView v1.0.4 - 2013-07-01 +SwipeView v1.0.5 - 2013-07-04 ============================= Modified version of Matteo's SwipeView which allows vertical swipe (with the `vertical` option) and also allows multiple SwipeViews in the same document: From d6a314f6932de4026fcb8e681e837aebcca1a5a9 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Thu, 4 Jul 2013 15:22:33 +0200 Subject: [PATCH 38/61] add version in dist filename --- Gruntfile.js | 2 +- dist/{swipeview.min.js => swipeview-1.0.5.min.js} | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename dist/{swipeview.min.js => swipeview-1.0.5.min.js} (99%) diff --git a/Gruntfile.js b/Gruntfile.js index b1f7010..945ad21 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -8,7 +8,7 @@ module.exports = function(grunt) { }, build: { src: 'src/<%= pkg.name %>.js', - dest: 'dist/<%= pkg.name %>.min.js' + dest: 'dist/<%= pkg.name %>-<%= pkg.version %>.min.js' } }, jshint: { diff --git a/dist/swipeview.min.js b/dist/swipeview-1.0.5.min.js similarity index 99% rename from dist/swipeview.min.js rename to dist/swipeview-1.0.5.min.js index 2e2c835..c68a73d 100644 --- a/dist/swipeview.min.js +++ b/dist/swipeview-1.0.5.min.js @@ -1,2 +1,2 @@ -/*! swipeview 1.0.4 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo */ +/*! swipeview 1.0.5 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo */ var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push(["touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":this.initiated&&a.toElement==b.childNodes[1]&&this.__end();break;case p:case o:this.__end(a);break;case l:this.__resize();break;case q:case"otransitionend":a.target!=this.slider||this.options.hastyPageFlip||this.__flip()}},__pos:function(a){this.k=a,this.slider.style[g]=(this.options.vertical?"translate(0,"+a+"px)":"translate("+a+"px,0)")+k},__resize:function(){this.refreshSize(),this.slider.style[h]="0s",this.__pos(-this.page*this.pageSize)},__start:function(a){if(!this.initiated){var b=j?a.targetTouches[0]:a;this.initiated=!0,this.identifier=b.identifier,this.moved=!1,this.thresholdExceeded=!1,this.startX=b.pageX,this.startY=b.pageY,this.pointX=b.pageX,this.pointY=b.pageY,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.slider.style[h]="0s",this.__event("touchstart")}},__move:function(a){if(this.initiated){var b,c,d;if(j){for(b=0,c=a.changedTouches.length;c>b;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),!(this.stepsX<10&&this.stepsY<10)){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"-swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file From dbf6d89062b1ed309686d6ce1ad95feed5b6c1e2 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Fri, 5 Jul 2013 00:00:26 +0200 Subject: [PATCH 39/61] oops --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 14c0066..2ac8e42 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "swipeview", "version": "1.0.5", - "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo", + "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli", "keywords": [ "swipe", "mobile", From e3ee9355d1e0a2762b5a0197186ed08da280fed0 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 9 Jul 2013 12:16:52 +0200 Subject: [PATCH 40/61] add grunt-contrib-connect --- Gruntfile.js | 14 ++++++++++++-- package.json | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 945ad21..d782015 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -2,6 +2,14 @@ module.exports = function(grunt) { grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), + connect: { + server: { + options: { + base: "", + port: 9999 + } + } + }, uglify: { options: { banner: '/*! <%= pkg.name %> <%= pkg.version %> - <%= pkg.description %> */\n' @@ -18,15 +26,17 @@ module.exports = function(grunt) { }, watch: { all: { - files: ['src/*.js'], - tasks: ['default'] + files: ['src/*.js', 'demo/*/*.js'], + tasks: ['default', 'dev'] } } }); grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-connect'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.registerTask('default', ['jshint', 'uglify']); + grunt.registerTask("dev", ["connect", "watch"]); }; diff --git a/package.json b/package.json index 2ac8e42..572350e 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "devDependencies": { "grunt": "~0.4.1", "grunt-contrib-jshint": "~0.6.0", + "grunt-contrib-connect" : "~0.1.2", "grunt-contrib-uglify": "~0.2.2", "grunt-contrib-watch": "~0.4.4" }, From b00696bfe4d2033ebf0b8331933ab116cdbccafa Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 9 Jul 2013 12:17:45 +0200 Subject: [PATCH 41/61] new demos... --- demo/gallery7/style.css | 2 +- demo/gallery8/app.js | 60 +++++++++++++ demo/gallery8/index.html | 18 ++++ demo/gallery8/infinitegraphset.js | 135 +++++++++++++++++++++++++++++ demo/gallery8/style.css | 33 ++++++++ demo/gallery9/app.js | 60 +++++++++++++ demo/gallery9/index.html | 20 +++++ demo/gallery9/infinitegraphset.js | 136 ++++++++++++++++++++++++++++++ demo/gallery9/style.css | 88 +++++++++++++++++++ 9 files changed, 551 insertions(+), 1 deletion(-) create mode 100644 demo/gallery8/app.js create mode 100644 demo/gallery8/index.html create mode 100644 demo/gallery8/infinitegraphset.js create mode 100644 demo/gallery8/style.css create mode 100644 demo/gallery9/app.js create mode 100644 demo/gallery9/index.html create mode 100644 demo/gallery9/infinitegraphset.js create mode 100644 demo/gallery9/style.css diff --git a/demo/gallery7/style.css b/demo/gallery7/style.css index 8a119db..5b48ebd 100644 --- a/demo/gallery7/style.css +++ b/demo/gallery7/style.css @@ -50,7 +50,7 @@ body { -o-box-pack:center; box-pack:center; -webkit-box-align:center; - -mox-box-align:center; + -moz-box-align:center; -ms-box-align:center; -o-box-align:center; box-align:center; diff --git a/demo/gallery8/app.js b/demo/gallery8/app.js new file mode 100644 index 0000000..c97bafc --- /dev/null +++ b/demo/gallery8/app.js @@ -0,0 +1,60 @@ +/** + * app.js + */ + +function genData(size) { + + function getImgURL() { + return "http://lorempixel.com/186/125/?t=" + Math.ceil(Math.random()*100000); + } + + return { + get : function (i) { + return { + imgs : [getImgURL(), getImgURL(), getImgURL(), getImgURL(), getImgURL()], + height : 125, + width : 186 + }; + }, + length : size + }; +} + +var gallery, el, i = 0, page; + +gallery = new SwipeView('#wrapper', { + numberOfPages: 100, + vertical: true, + hastyPageFlip:true +}); + +function init(domElt, myGallery, id, idx) { + domElt = document.createElement('div'); + domElt.className = 'wrapper'; + domElt.id = "wrap" + idx + "-" + id; + + myGallery.masterPages[id]['swipeview'+idx] = InfiniteGraphSet(domElt, genData(100)); + myGallery.masterPages[id].appendChild(domElt); +} + +// Load initial data +for (; i<3; i++) { + page = i==0 ? 100-1 : i-1; + init(el, gallery, i, 0); + init(el, gallery, i, 1); + init(el, gallery, i, 2); + init(el, gallery, i, 3); +} + +gallery.onFlip(function () { + var upcoming, i=0; + for (; i<3; i++) { + upcoming = gallery.masterPages[i].dataset.upcomingPageIndex; + if (upcoming != gallery.masterPages[i].dataset.pageIndex) { + gallery.masterPages[i].swipeview0.reset(genData(100)); + gallery.masterPages[i].swipeview1.reset(genData(100)); + gallery.masterPages[i].swipeview2.reset(genData(100)); + gallery.masterPages[i].swipeview3.reset(genData(100)); + } + } +}); diff --git a/demo/gallery8/index.html b/demo/gallery8/index.html new file mode 100644 index 0000000..c9a862b --- /dev/null +++ b/demo/gallery8/index.html @@ -0,0 +1,18 @@ + + + + + + + + SwipeView + + + + +
+ + + + + diff --git a/demo/gallery8/infinitegraphset.js b/demo/gallery8/infinitegraphset.js new file mode 100644 index 0000000..006bdc8 --- /dev/null +++ b/demo/gallery8/infinitegraphset.js @@ -0,0 +1,135 @@ +/* + * infinitegraphset.js + */ +(function (win, doc) { + + function InfiniteGraphSet(id, dataO, f) { + var gallery = new SwipeView(id, { + hastyPageFlip:true, + numberOfPages: dataO.length + }), i, page, df = dataO, + Æ’ = f || function () { + console.log("tap cb"); + }, + locked = false, + x = 0, y = 0, id; + + function onTouchStart(evt) { + console.log('touchstart'); + if (locked) return; + locked = true; + x = evt.targetTouches.item(0).pageX; + y = evt.targetTouches.item(0).pageY; + id = evt.targetTouches.item(0).identifier; + } + function onTouchMove(evt) { + console.log('touchmove'); + if(!locked) return; + var i,l= evt.changedTouches.length, point; + for(; i + + + + + + + SwipeView + + + + +
+
+
+ + + + + diff --git a/demo/gallery9/infinitegraphset.js b/demo/gallery9/infinitegraphset.js new file mode 100644 index 0000000..4349413 --- /dev/null +++ b/demo/gallery9/infinitegraphset.js @@ -0,0 +1,136 @@ +/* + * infinitegraphset.js + */ +(function (win, doc) { + + function InfiniteGraphSet(id, dataO, f, n, w, h) { + var gallery = new SwipeView(id, { + hastyPageFlip:true, + numberOfPages: dataO.length, + clientWidth : w, + clientHeight : h + }), i, page, df = dataO, + Æ’ = f || function () { + console.log("tap cb"); + }, + n = n || 5; + locked = false, + x = 0, y = 0, id; + + // FIXME + /*function onTouchStart(evt) { + console.log('touchstart'); + if (locked) return; + locked = true; + x = evt.targetTouches.item(0).pageX; + y = evt.targetTouches.item(0).pageY; + id = evt.targetTouches.item(0).identifier; + } + function onTouchMove(evt) { + console.log('touchmove'); + if(!locked) return; + var i,l= evt.changedTouches.length, point; + for(; i div , .vertical-swipeview-slider > div{ + position:relative; + display:-webkit-box; + display:-moz-box; + display:-ms-box; + display:-o-box; + display:box; + -webkit-box-orient:vertical; + -moz-box-orient:vertical; + -ms-box-orient:vertical; + -o-box-orient:vertical; + box-orient:vertical; + -webkit-box-pack:center; + -moz-box-pack:center; + -ms-box-pack:center; + -o-box-pack:center; + box-pack:center; + -webkit-box-align:center; + -mox-box-align:center; + -ms-box-align:center; + -o-box-align:center; + box-align:center; + overflow:hidden; +} From a5ad40fad508b64e7fbcbb148690ec5512ffa0ce Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 9 Jul 2013 12:18:26 +0200 Subject: [PATCH 42/61] fix desktop mouse stuff --- dist/swipeview-1.0.5.min.js | 4 ++-- src/swipeview.js | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/dist/swipeview-1.0.5.min.js b/dist/swipeview-1.0.5.min.js index c68a73d..679dd8e 100644 --- a/dist/swipeview-1.0.5.min.js +++ b/dist/swipeview-1.0.5.min.js @@ -1,2 +1,2 @@ -/*! swipeview 1.0.5 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo */ -var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push(["touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":this.initiated&&a.toElement==b.childNodes[1]&&this.__end();break;case p:case o:this.__end(a);break;case l:this.__resize();break;case q:case"otransitionend":a.target!=this.slider||this.options.hastyPageFlip||this.__flip()}},__pos:function(a){this.k=a,this.slider.style[g]=(this.options.vertical?"translate(0,"+a+"px)":"translate("+a+"px,0)")+k},__resize:function(){this.refreshSize(),this.slider.style[h]="0s",this.__pos(-this.page*this.pageSize)},__start:function(a){if(!this.initiated){var b=j?a.targetTouches[0]:a;this.initiated=!0,this.identifier=b.identifier,this.moved=!1,this.thresholdExceeded=!1,this.startX=b.pageX,this.startY=b.pageY,this.pointX=b.pageX,this.pointY=b.pageY,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.slider.style[h]="0s",this.__event("touchstart")}},__move:function(a){if(this.initiated){var b,c,d;if(j){for(b=0,c=a.changedTouches.length;c>b;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),!(this.stepsX<10&&this.stepsY<10)){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"-swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file +/*! swipeview 1.0.5 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ +var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push(["touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),!(this.stepsX<10&&this.stepsY<10)){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"-swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file diff --git a/src/swipeview.js b/src/swipeview.js index d51beea..960b6be 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -287,7 +287,12 @@ var SwipeView = (function (window, document) { this.__move(e); break; case "mouseout": - if (this.initiated && e.toElement == document.childNodes[1]) this.__end(); + if (this.initiated) { + var elts = this.wrapper.getElementsByTagName('*'); + for (var i=0; i< elts.length; i++) + if( e.toElement == elts[i]) return; + this.__end(e); + } break; case cancelEvent: case endEvent: From 9eb73cefa9c6687dcf7cd0b554c68ecce42ba70e Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 9 Jul 2013 12:20:38 +0200 Subject: [PATCH 43/61] bump version to 1.0.6 * fix desktop mouse events --- dist/{swipeview-1.0.5.min.js => swipeview-1.0.6.min.js} | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename dist/{swipeview-1.0.5.min.js => swipeview-1.0.6.min.js} (99%) diff --git a/dist/swipeview-1.0.5.min.js b/dist/swipeview-1.0.6.min.js similarity index 99% rename from dist/swipeview-1.0.5.min.js rename to dist/swipeview-1.0.6.min.js index 679dd8e..b40be4a 100644 --- a/dist/swipeview-1.0.5.min.js +++ b/dist/swipeview-1.0.6.min.js @@ -1,2 +1,2 @@ -/*! swipeview 1.0.5 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ +/*! swipeview 1.0.6 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push(["touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),!(this.stepsX<10&&this.stepsY<10)){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"-swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file diff --git a/package.json b/package.json index 572350e..dde8183 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swipeview", - "version": "1.0.5", + "version": "1.0.6", "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli", "keywords": [ "swipe", From 7a7b42e5389d3c52dd4a9b91428304cd4ce22fff Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Tue, 9 Jul 2013 15:12:09 +0200 Subject: [PATCH 44/61] fix when swipeview < viewport --- dist/{swipeview-1.0.6.min.js => swipeview-1.1.0.min.js} | 4 ++-- package.json | 2 +- src/swipeview.js | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) rename dist/{swipeview-1.0.6.min.js => swipeview-1.1.0.min.js} (70%) diff --git a/dist/swipeview-1.0.6.min.js b/dist/swipeview-1.1.0.min.js similarity index 70% rename from dist/swipeview-1.0.6.min.js rename to dist/swipeview-1.1.0.min.js index b40be4a..17eb642 100644 --- a/dist/swipeview-1.0.6.min.js +++ b/dist/swipeview-1.1.0.min.js @@ -1,2 +1,2 @@ -/*! swipeview 1.0.6 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ -var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push(["touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),!(this.stepsX<10&&this.stepsY<10)){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"-swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file +/*! swipeview 1.1.0 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ +var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push(["touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"-swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file diff --git a/package.json b/package.json index dde8183..0230e92 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swipeview", - "version": "1.0.6", + "version": "1.1.0", "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli", "keywords": [ "swipe", diff --git a/src/swipeview.js b/src/swipeview.js index 960b6be..1e88091 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -372,6 +372,8 @@ var SwipeView = (function (window, document) { newC = this.options.vertical ? this.k + deltaY : this.k + deltaX, dist = this.options.vertical ? Math.abs(point.pageY - this.startY): Math.abs(point.pageX - this.startX); + if (Math.abs(dist) >= this.pageSize) { return; } + this.moved = true; this.pointX = point.pageX; this.pointY = point.pageY; From 9d91b06a97993365599b0e2e469f50d7ef2b0230 Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Wed, 10 Jul 2013 16:54:51 +0200 Subject: [PATCH 45/61] fix inner swipeview events --- src/swipeview.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 1e88091..fb942db 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -159,22 +159,22 @@ var SwipeView = (function (window, document) { onFlip: function (fn) { this.wrapper.addEventListener(this.id + 'swipeview-flip', fn, false); - this.customEvents.push(['flip', fn]); + this.customEvents.push([this.id + 'flip', fn]); }, onMoveOut: function (fn) { this.wrapper.addEventListener(this.id + 'swipeview-moveout', fn, false); - this.customEvents.push(['moveout', fn]); + this.customEvents.push([this.id + 'moveout', fn]); }, onMoveIn: function (fn) { this.wrapper.addEventListener(this.id + 'swipeview-movein', fn, false); - this.customEvents.push(['movein', fn]); + this.customEvents.push([this.id + 'movein', fn]); }, onTouchStart: function (fn) { this.wrapper.addEventListener(this.id + 'swipeview-touchstart', fn, false); - this.customEvents.push(['touchstart', fn]); + this.customEvents.push([this.id + 'touchstart', fn]); }, destroy: function () { @@ -532,7 +532,7 @@ var SwipeView = (function (window, document) { __event: function (type) { var ev = document.createEvent("Event"); - ev.initEvent(this.id + '-swipeview-' + type, true, true); + ev.initEvent(this.id + 'swipeview-' + type, true, true); this.wrapper.dispatchEvent(ev); } From 016c937ba4a10e0dff1160c8e8fd27b1c89913ba Mon Sep 17 00:00:00 2001 From: Paul Panserrieu Date: Wed, 10 Jul 2013 16:56:02 +0200 Subject: [PATCH 46/61] 1.1.1 --- dist/swipeview-1.1.0.min.js | 2 -- dist/swipeview-1.1.1.min.js | 2 ++ package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 dist/swipeview-1.1.0.min.js create mode 100644 dist/swipeview-1.1.1.min.js diff --git a/dist/swipeview-1.1.0.min.js b/dist/swipeview-1.1.0.min.js deleted file mode 100644 index 17eb642..0000000 --- a/dist/swipeview-1.1.0.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! swipeview 1.1.0 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ -var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push(["touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"-swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file diff --git a/dist/swipeview-1.1.1.min.js b/dist/swipeview-1.1.1.min.js new file mode 100644 index 0000000..c31a819 --- /dev/null +++ b/dist/swipeview-1.1.1.min.js @@ -0,0 +1,2 @@ +/*! swipeview 1.1.1 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ +var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push([this.id+"flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push([this.id+"moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push([this.id+"movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push([this.id+"touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file diff --git a/package.json b/package.json index 0230e92..afba7c2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swipeview", - "version": "1.1.0", + "version": "1.1.1", "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli", "keywords": [ "swipe", From f938534b88e5913ab7a8a02e30752dc7d1087cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Tue, 16 Jul 2013 18:25:30 +0200 Subject: [PATCH 47/61] Add .abort() method --- dist/swipeview-1.1.1.min.js | 2 +- src/swipeview.js | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/dist/swipeview-1.1.1.min.js b/dist/swipeview-1.1.1.min.js index c31a819..bc7d833 100644 --- a/dist/swipeview-1.1.1.min.js +++ b/dist/swipeview-1.1.1.min.js @@ -1,2 +1,2 @@ /*! swipeview 1.1.1 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ -var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push([this.id+"flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push([this.id+"moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push([this.id+"movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push([this.id+"touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file +var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push([this.id+"flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push([this.id+"moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push([this.id+"movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push([this.id+"touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file diff --git a/src/swipeview.js b/src/swipeview.js index fb942db..9be8155 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -460,6 +460,12 @@ var SwipeView = (function (window, document) { this.__checkPosition(); }, + abort: function () { + if (!this.initiated) return; + this.__pos(-this.page * this.pageSize); + this.initiated = false; + }, + __checkPosition: function () { var pageFlip, pageFlipIndex, From 7309f9564b212d00398fd426023e225e11ba3a14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Wed, 17 Jul 2013 11:26:37 +0200 Subject: [PATCH 48/61] Increment version 1.1.2 --- dist/swipeview-1.1.2.min.js | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 dist/swipeview-1.1.2.min.js diff --git a/dist/swipeview-1.1.2.min.js b/dist/swipeview-1.1.2.min.js new file mode 100644 index 0000000..b7dc22f --- /dev/null +++ b/dist/swipeview-1.1.2.min.js @@ -0,0 +1,2 @@ +/*! swipeview 1.1.2 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ +var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push([this.id+"flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push([this.id+"moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push([this.id+"movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push([this.id+"touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file diff --git a/package.json b/package.json index afba7c2..ca60c5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swipeview", - "version": "1.1.1", + "version": "1.1.2", "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli", "keywords": [ "swipe", From 30eff4dd373ce8f22e1523b089479405869c5d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Wed, 17 Jul 2013 18:24:02 +0200 Subject: [PATCH 49/61] Making it work on IE8 ! + polyfill for events (on, off, preventDefault) + polyfill for evt.pageX / evt.pageY + using MicroEvent for custom events + Fix examples (img unselectable=on, ondragstart: return false) --- demo/gallery/index.html | 6 +- demo/gallery2/index.html | 3 + demo/gallery3/infinitegraphset.js | 3 + demo/gallery4/index.html | 3 + demo/gallery5/infinitegraphset.js | 3 + demo/gallery6/infinitegraphset.js | 3 + demo/gallery7/infinitegraphset.js | 3 + demo/gallery8/infinitegraphset.js | 3 + demo/gallery9/infinitegraphset.js | 3 + dist/swipeview-1.1.2.min.js | 2 +- dist/swipeview-1.2.0.min.js | 2 + package.json | 2 +- src/swipeview.js | 182 ++++++++++++++++++++++-------- 13 files changed, 170 insertions(+), 48 deletions(-) create mode 100644 dist/swipeview-1.2.0.min.js diff --git a/demo/gallery/index.html b/demo/gallery/index.html index 8feb43b..e017211 100644 --- a/demo/gallery/index.html +++ b/demo/gallery/index.html @@ -81,6 +81,10 @@ el.width = slides[page].width; el.height = slides[page].height; el.onload = function () { this.className = ''; } + // fixes for IE + el.setAttribute("unselectable", "on"); + el.ondragstart = function() { return false; }; + gallery.masterPages[i].appendChild(el); el = document.createElement('span'); @@ -123,4 +127,4 @@ - \ No newline at end of file + diff --git a/demo/gallery2/index.html b/demo/gallery2/index.html index bdc427d..360199d 100644 --- a/demo/gallery2/index.html +++ b/demo/gallery2/index.html @@ -59,6 +59,9 @@ img.src = d.get(page).imgs[i]; img.width = d.get(page).width; img.height = d.get(page).height; + // fixes for IE + img.setAttribute("unselectable", "on"); + img.ondragstart = function() { return false; }; div.style.width = d.get(page).width + "px"; div.style.height = d.get(page).height + "px"; img.onload = function () { this.className = ''; } diff --git a/demo/gallery3/infinitegraphset.js b/demo/gallery3/infinitegraphset.js index e9ddffe..0785645 100644 --- a/demo/gallery3/infinitegraphset.js +++ b/demo/gallery3/infinitegraphset.js @@ -22,6 +22,9 @@ div.style.width = d.get(page).width + "px"; div.style.height = d.get(page).height + "px"; img.onload = function () { this.className = ''; } + // fixes for IE + img.setAttribute("unselectable", "on"); + img.ondragstart = function() { return false; }; div.appendChild(img); container.appendChild(div); } diff --git a/demo/gallery4/index.html b/demo/gallery4/index.html index 8936ed2..9521d5d 100644 --- a/demo/gallery4/index.html +++ b/demo/gallery4/index.html @@ -63,6 +63,9 @@ el.width = slides[page].width; el.height = slides[page].height; el.onload = function () { this.className = ''; } + // fixes for IE + el.setAttribute("unselectable", "on"); + el.ondragstart = function() { return false; }; gallery.masterPages[i].appendChild(el); } diff --git a/demo/gallery5/infinitegraphset.js b/demo/gallery5/infinitegraphset.js index e9ddffe..8b85a07 100644 --- a/demo/gallery5/infinitegraphset.js +++ b/demo/gallery5/infinitegraphset.js @@ -19,6 +19,9 @@ img.src = d.get(page).imgs[i]; img.width = d.get(page).width; img.height = d.get(page).height; + // fixes for IE + img.setAttribute("unselectable", "on"); + img.ondragstart = function() { return false; }; div.style.width = d.get(page).width + "px"; div.style.height = d.get(page).height + "px"; img.onload = function () { this.className = ''; } diff --git a/demo/gallery6/infinitegraphset.js b/demo/gallery6/infinitegraphset.js index cc869bb..42bcebd 100644 --- a/demo/gallery6/infinitegraphset.js +++ b/demo/gallery6/infinitegraphset.js @@ -19,6 +19,9 @@ img.src = d.get(page).imgs[i]; img.width = d.get(page).width; img.height = d.get(page).height; + // fixes for IE + img.setAttribute("unselectable", "on"); + img.ondragstart = function() { return false; }; div.style.width = d.get(page).width + "px"; div.style.height = d.get(page).height + "px"; img.onload = function () { this.className = ''; } diff --git a/demo/gallery7/infinitegraphset.js b/demo/gallery7/infinitegraphset.js index cc869bb..42bcebd 100644 --- a/demo/gallery7/infinitegraphset.js +++ b/demo/gallery7/infinitegraphset.js @@ -19,6 +19,9 @@ img.src = d.get(page).imgs[i]; img.width = d.get(page).width; img.height = d.get(page).height; + // fixes for IE + img.setAttribute("unselectable", "on"); + img.ondragstart = function() { return false; }; div.style.width = d.get(page).width + "px"; div.style.height = d.get(page).height + "px"; img.onload = function () { this.className = ''; } diff --git a/demo/gallery8/infinitegraphset.js b/demo/gallery8/infinitegraphset.js index 006bdc8..fcb2108 100644 --- a/demo/gallery8/infinitegraphset.js +++ b/demo/gallery8/infinitegraphset.js @@ -65,6 +65,9 @@ img.src = d.get(page).imgs[i]; img.width = d.get(page).width; img.height = d.get(page).height; + // fixes for IE + img.setAttribute("unselectable", "on"); + img.ondragstart = function() { return false; }; div.style.width = d.get(page).width + "px"; div.style.height = d.get(page).height + "px"; img.onload = function () { this.className = ''; } diff --git a/demo/gallery9/infinitegraphset.js b/demo/gallery9/infinitegraphset.js index 4349413..31071c2 100644 --- a/demo/gallery9/infinitegraphset.js +++ b/demo/gallery9/infinitegraphset.js @@ -72,6 +72,9 @@ div.style.width = d.get(page).width + "px"; div.style.height = d.get(page).height + "px"; img.onload = function () { this.className = ''; } + // fixes for IE + img.setAttribute("unselectable", "on"); + img.ondragstart = function() { return false; }; // FIXME /*div.ontouchstart = onTouchStart; div.ontouchmove = onTouchMove; diff --git a/dist/swipeview-1.1.2.min.js b/dist/swipeview-1.1.2.min.js index b7dc22f..4893cc7 100644 --- a/dist/swipeview-1.1.2.min.js +++ b/dist/swipeview-1.1.2.min.js @@ -1,2 +1,2 @@ /*! swipeview 1.1.2 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ -var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=0,s=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++r,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",a.addEventListener(l,this,!1),this.wrapper.addEventListener(m,this,!1),this.wrapper.addEventListener(n,this,!1),this.wrapper.addEventListener(o,this,!1),this.slider.addEventListener(q,this,!1),"O"==e&&this.slider.addEventListener(q.toLowerCase(),this,!1),j||this.wrapper.addEventListener("mouseout",this,!1)};return s.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.wrapper.addEventListener(this.id+"swipeview-flip",a,!1),this.customEvents.push([this.id+"flip",a])},onMoveOut:function(a){this.wrapper.addEventListener(this.id+"swipeview-moveout",a,!1),this.customEvents.push([this.id+"moveout",a])},onMoveIn:function(a){this.wrapper.addEventListener(this.id+"swipeview-movein",a,!1),this.customEvents.push([this.id+"movein",a])},onTouchStart:function(a){this.wrapper.addEventListener(this.id+"swipeview-touchstart",a,!1),this.customEvents.push([this.id+"touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},s}(window,document); \ No newline at end of file +var SwipeView=function(a,b){function c(a){return""===e?a:(a=a.charAt(0).toUpperCase()+a.substr(1),e+a)}var d=b.createElement("div").style,e=function(){for(var a,b="t,webkitT,MozT,msT,OT".split(","),c=0,e=b.length;e>c;c++)if(a=b[c]+"ransform",a in d)return b[c].substr(0,b[c].length-1);return!1}(),f=e?"-"+e.toLowerCase()+"-":"",g=c("transform"),h=c("transitionDuration"),i=c("perspective")in d,j="ontouchstart"in a,k=(c("transition")in d,i?" translateZ(0)":""),l="onorientationchange"in a?"orientationchange":"resize",m=j?"touchstart":"mousedown",n=j?"touchmove":"mousemove",o=j?"touchend":"mouseup",p=j?"touchcancel":"mouseup",q=function(){if(e===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[e]}(),r=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&("object"==typeof c&&c.handleEvent?a.attachEvent("on"+b,function(a){c.handleEvent.call(c,a)}):a.attachEvent("on"+b,c))},s=0,t=function(c,d){var g,h,i,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++s,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(g in d)this.options[g]=d[g];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],h=b.createElement("div"),h.className="swipeview-slider",h.style.cssText="position:relative;top:0;height:100%;width:100%;"+f+"transition-duration:0;"+f+"transform:translateZ(0);"+f+"transition-timing-function:ease-out",this.wrapper.appendChild(h),this.slider=h,this.refreshSize(),g=-1;2>g;g++)h=b.createElement("div"),h.style.cssText=f+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*g+"%",h.dataset||(h.dataset={}),k=-1==g?this.options.numberOfPages-1:g,h.dataset.pageIndex=k,h.dataset.upcomingPageIndex=k,this.options.loop||-1!=g||(h.style.visibility="hidden"),this.slider.appendChild(h),this.masterPages.push(h);i=this.masterPages[1].className,this.masterPages[1].className=i?i+" swipeview-active":"swipeview-active",r(a,l,this,!1),r(this.wrapper,m,this,!1),r(this.wrapper,n,this,!1),r(this.wrapper,o,this,!1),r(this.slider,q,this,!1),"O"==e&&r(this.slider,q.toLowerCase(),this,!1),j||r(this.wrapper,"mouseout",this,!1)};return t.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){r(this.wrapper,this.id+"swipeview-flip",a,!1),this.customEvents.push([this.id+"flip",a])},onMoveOut:function(a){r(this.wrapper,this.id+"swipeview-moveout",a,!1),this.customEvents.push([this.id+"moveout",a])},onMoveIn:function(a){r(this.wrapper,this.id+"swipeview-movein",a,!1),this.customEvents.push([this.id+"movein",a])},onTouchStart:function(a){r(this.wrapper,this.id+"swipeview-touchstart",a,!1),this.customEvents.push([this.id+"touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.wrapper.removeEventListener(this.id+"swipeview-"+this.customEvents[0][0],this.customEvents[0][1],!1),this.customEvents.shift();a.removeEventListener(l,this,!1),this.wrapper.removeEventListener(m,this,!1),this.wrapper.removeEventListener(n,this,!1),this.wrapper.removeEventListener(o,this,!1),this.slider.removeEventListener(q,this,!1),j||this.wrapper.removeEventListener("mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[h]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case m:this.__start(a);break;case n:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=d.pageX-this.pointX,f=d.pageY-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(d.pageY-this.startY):Math.abs(d.pageX-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=d.pageX,this.pointY=d.pageY,this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;a.preventDefault(),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.__event("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(b.pageY-this.startY):Math.abs(b.pageX-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[h]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.__event("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex},__event:function(a){var c=b.createEvent("Event");c.initEvent(this.id+"swipeview-"+a,!0,!0),this.wrapper.dispatchEvent(c)}},t}(window,document); \ No newline at end of file diff --git a/dist/swipeview-1.2.0.min.js b/dist/swipeview-1.2.0.min.js new file mode 100644 index 0000000..b84ef36 --- /dev/null +++ b/dist/swipeview-1.2.0.min.js @@ -0,0 +1,2 @@ +/*! swipeview 1.2.0 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ +var SwipeView=function(a,b){function c(a){return""===f?a:(a=a.charAt(0).toUpperCase()+a.substr(1),f+a)}var d=function(){};d.prototype={bind:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},unbind:function(a,b){this._events=this._events||{},a in this._events!=!1&&this._events[a].splice(this._events[a].indexOf(b),1)},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;bc;c++)if(a=b[c]+"ransform",a in e)return b[c].substr(0,b[c].length-1);return!1}(),g=f?"-"+f.toLowerCase()+"-":"",h=c("transform"),i=c("transitionDuration"),j=c("perspective")in e,k="ontouchstart"in a,l=!!f,m=(c("transition")in e,j?" translateZ(0)":""),n="onorientationchange"in a?"orientationchange":"resize",o=k?"touchstart":"mousedown",p=k?"touchmove":"mousemove",q=k?"touchend":"mouseup",r=k?"touchcancel":"mouseup",s=function(){if(f===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[f]}(),t=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&("object"==typeof c&&c.handleEvent?a.attachEvent("on"+b,function(a){c.handleEvent.call(c,a)}):a.attachEvent("on"+b,c))},u=function(a,b,c){"removeEventListener"in a?a.removeEventListener(b,c):"detachEvent"in a&&a.detachEvent(b,c)},v=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},w=function(a){return"pageX"in a?a.pageX:a.clientX+b.body.scrollLeft+b.documentElement.scrollLeft},x=function(a){return"pageY"in a?a.pageY:a.clientY+b.body.scrollTop+b.documentElement.scrollTop},y=0,z=function(c,e){var h,i,j,l;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++y,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(h in e)this.options[h]=e[h];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.E=new d,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],i=b.createElement("div"),i.className="swipeview-slider",i.style.cssText="position:relative;top:0;height:100%;width:100%;"+g+"transition-duration:0;"+g+"transform:translateZ(0);"+g+"transition-timing-function:ease-out",this.wrapper.appendChild(i),this.slider=i,this.refreshSize(),h=-1;2>h;h++)i=b.createElement("div"),i.style.cssText=g+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*h+"%",i.dataset||(i.dataset={}),l=-1==h?this.options.numberOfPages-1:h,i.dataset.pageIndex=l,i.dataset.upcomingPageIndex=l,this.options.loop||-1!=h||(i.style.visibility="hidden"),this.slider.appendChild(i),this.masterPages.push(i);j=this.masterPages[1].className,this.masterPages[1].className=j?j+" swipeview-active":"swipeview-active",t(a,n,this,!1),t(this.wrapper,o,this,!1),t(this.wrapper,p,this,!1),t(this.wrapper,q,this,!1),t(this.slider,s,this,!1),"O"==f&&t(this.slider,s.toLowerCase(),this,!1),k||t(this.wrapper,"mouseout",this,!1)};return z.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.E.bind(this.id+"flip",a),this.customEvents.push([this.id+"flip",a])},onMoveOut:function(a){this.E.bind(this.id+"moveout",a),this.customEvents.push([this.id+"moveout",a])},onMoveIn:function(a){this.E.bind(this.id+"movein",a),this.customEvents.push([this.id+"movein",a])},onTouchStart:function(a){this.E.bind(this.id+"touchstart",a),this.customEvents.push([this.id+"touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.E.unbind(this.customEvents[0][0],this.customEvents[0][1]),this.customEvents.shift();u(a,n,this,!1),u(this.wrapper,o,this,!1),u(this.wrapper,p,this,!1),u(this.wrapper,q,this,!1),u(this.slider,s,this,!1),k||u(this.wrapper,"mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[i]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case o:this.__start(a);break;case p:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=w(d)-this.pointX,f=x(d)-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(x(d)-this.startY):Math.abs(w(d)-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=w(d),this.pointY=x(d),this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;v(a),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.E.trigger("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(x(b)-this.startY):Math.abs(w(b)-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[i]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.E.trigger("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex}},z}(window,document); \ No newline at end of file diff --git a/package.json b/package.json index ca60c5c..bb56140 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swipeview", - "version": "1.1.2", + "version": "1.2.0", "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli", "keywords": [ "swipe", diff --git a/src/swipeview.js b/src/swipeview.js index 9be8155..11e654f 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -4,7 +4,54 @@ */ var SwipeView = (function (window, document) { - var dummyStyle = document.createElement('div').style, + + /** + * MicroEvent - https://github.com/jeromeetienne/microevent.js + * +Copyright (c) 2011 Jerome Etienne, http://jetienne.com + +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: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + */ + var MicroEvent = function(){}; + MicroEvent.prototype = { + bind: function(event, fct){ + this._events = this._events || {}; + this._events[event] = this._events[event] || []; + this._events[event].push(fct); + }, + unbind: function(event, fct){ + this._events = this._events || {}; + if( event in this._events === false ) return; + this._events[event].splice(this._events[event].indexOf(fct), 1); + }, + trigger: function(event /* , args... */){ + this._events = this._events || {}; + if( event in this._events === false ) return; + for(var i = 0; i < this._events[event].length; i++){ + this._events[event][i].apply(this, Array.prototype.slice.call(arguments, 1)); + } + } + }; + + + var dummyStyle = document.createElement('div').style, vendor = (function () { var vendors = 't,webkitT,MozT,msT,OT'.split(','), t, @@ -55,6 +102,48 @@ var SwipeView = (function (window, document) { return transitionEnd[vendor]; })(), + //~~~ IE polyfills + on = function (el, evt, fn, bubble) { + if("addEventListener" in el) { + el.addEventListener(evt, fn, bubble); + } else if("attachEvent" in el) { + if(typeof fn == "object" && fn.handleEvent) { + el.attachEvent("on" + evt, function(e){ + fn.handleEvent.call(fn, e); + }); + } else { + el.attachEvent("on" + evt, fn); + } + } + }, + off = function (el, evt, fn) { + if("removeEventListener" in el) { + el.removeEventListener(evt, fn); + } + else if ("detachEvent" in el) { + el.detachEvent(evt, fn); + } + }, + preventDefault = function (e) { + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + }, + getPageX = function (e) { + if ('pageX' in e) + return e.pageX; + else + return e.clientX + document.body.scrollLeft + document.documentElement.scrollLeft; + return 0; + }, + getPageY = function (e) { + if ('pageY' in e) + return e.pageY; + else + return e.clientY + document.body.scrollTop + document.documentElement.scrollTop; + return 0; + }, + //~~~ end of IE polyfills + uuid = 0, SwipeView = function (el, options) { @@ -84,6 +173,7 @@ var SwipeView = (function (window, document) { this.maxK = 0; this.page = 0; this.pageIndex = 0; + this.E = new MicroEvent(); this.customEvents = []; this.wrapperWidth = 0; this.wrapperHeight = 0; @@ -137,16 +227,16 @@ var SwipeView = (function (window, document) { className = this.masterPages[1].className; this.masterPages[1].className = !className ? 'swipeview-active' : className + ' swipeview-active'; - window.addEventListener(resizeEvent, this, false); - this.wrapper.addEventListener(startEvent, this, false); - this.wrapper.addEventListener(moveEvent, this, false); - this.wrapper.addEventListener(endEvent, this, false); - this.slider.addEventListener(transitionEndEvent, this, false); + on(window, resizeEvent, this, false); + on(this.wrapper, startEvent, this, false); + on(this.wrapper, moveEvent, this, false); + on(this.wrapper, endEvent, this, false); + on(this.slider, transitionEndEvent, this, false); // in Opera >= 12 the transitionend event is lowercase so we register both events - if ( vendor == 'O' ) this.slider.addEventListener(transitionEndEvent.toLowerCase(), this, false); + if ( vendor == 'O' ) on(this.slider, transitionEndEvent.toLowerCase(), this, false); if (!hasTouch) { - this.wrapper.addEventListener('mouseout', this, false); + on(this.wrapper, 'mouseout', this, false); } }; @@ -158,40 +248,40 @@ var SwipeView = (function (window, document) { }, onFlip: function (fn) { - this.wrapper.addEventListener(this.id + 'swipeview-flip', fn, false); - this.customEvents.push([this.id + 'flip', fn]); + this.E.bind(this.id + 'flip', fn); + this.customEvents.push([this.id + 'flip', fn]); }, onMoveOut: function (fn) { - this.wrapper.addEventListener(this.id + 'swipeview-moveout', fn, false); + this.E.bind(this.id + 'moveout', fn); this.customEvents.push([this.id + 'moveout', fn]); }, onMoveIn: function (fn) { - this.wrapper.addEventListener(this.id + 'swipeview-movein', fn, false); + this.E.bind(this.id + 'movein', fn); this.customEvents.push([this.id + 'movein', fn]); }, onTouchStart: function (fn) { - this.wrapper.addEventListener(this.id + 'swipeview-touchstart', fn, false); + this.E.bind(this.id + 'touchstart', fn); this.customEvents.push([this.id + 'touchstart', fn]); }, destroy: function () { while ( this.customEvents.length ) { - this.wrapper.removeEventListener(this.id + 'swipeview-' + this.customEvents[0][0], this.customEvents[0][1], false); + this.E.unbind(this.customEvents[0][0], this.customEvents[0][1]); this.customEvents.shift(); } // Remove the event listeners - window.removeEventListener(resizeEvent, this, false); - this.wrapper.removeEventListener(startEvent, this, false); - this.wrapper.removeEventListener(moveEvent, this, false); - this.wrapper.removeEventListener(endEvent, this, false); - this.slider.removeEventListener(transitionEndEvent, this, false); + off(window, resizeEvent, this, false); + off(this.wrapper, startEvent, this, false); + off(this.wrapper, moveEvent, this, false); + off(this.wrapper, endEvent, this, false); + off(this.slider, transitionEndEvent, this, false); if (!hasTouch) { - this.wrapper.removeEventListener('mouseout', this, false); + off(this.wrapper, 'mouseout', this, false); } }, @@ -316,7 +406,17 @@ var SwipeView = (function (window, document) { */ __pos: function (k) { this.k = k; - this.slider.style[transform] = (this.options.vertical ? 'translate(0,' + k + 'px)' : 'translate(' + k + 'px,0)') + translateZ; + if (hasTransform) { + this.slider.style[transform] = (this.options.vertical ? 'translate(0,' + k + 'px)' : 'translate(' + k + 'px,0)') + translateZ; + } + else { + if (this.options.vertical) { + this.slider.style.top = k+"px"; + } + else { + this.slider.style.left = k+"px"; + } + } }, __resize: function () { @@ -336,10 +436,10 @@ var SwipeView = (function (window, document) { this.identifier = point.identifier; this.moved = false; this.thresholdExceeded = false; - this.startX = point.pageX; - this.startY = point.pageY; - this.pointX = point.pageX; - this.pointY = point.pageY; + this.startX = getPageX(point); + this.startY = getPageY(point); + this.pointX = getPageX(point); + this.pointY = getPageY(point); this.stepsX = 0; this.stepsY = 0; this.direction = 0; @@ -347,7 +447,7 @@ var SwipeView = (function (window, document) { this.slider.style[transitionDuration] = '0s'; - this.__event('touchstart'); + this.E.trigger('touchstart'); }, __move: function (e) { @@ -367,16 +467,16 @@ var SwipeView = (function (window, document) { point = e; } - var deltaX = point.pageX - this.pointX, - deltaY = point.pageY - this.pointY, + var deltaX = getPageX(point) - this.pointX, + deltaY = getPageY(point) - this.pointY, newC = this.options.vertical ? this.k + deltaY : this.k + deltaX, - dist = this.options.vertical ? Math.abs(point.pageY - this.startY): Math.abs(point.pageX - this.startX); + dist = this.options.vertical ? Math.abs(getPageY(point) - this.startY): Math.abs(getPageX(point) - this.startX); if (Math.abs(dist) >= this.pageSize) { return; } this.moved = true; - this.pointX = point.pageX; - this.pointY = point.pageY; + this.pointX = getPageX(point); + this.pointY = getPageY(point); this.direction = this.options.vertical ? (deltaY > 0 ? 1 : deltaY < 0 ? -1 : 0): (deltaX > 0 ? 1 : deltaX < 0 ? -1 : 0); this.stepsX += Math.abs(deltaX); this.stepsY += Math.abs(deltaY); @@ -393,7 +493,7 @@ var SwipeView = (function (window, document) { return; } - e.preventDefault(); + preventDefault(e); this.directionLocked = true; @@ -403,10 +503,10 @@ var SwipeView = (function (window, document) { if (!this.thresholdExceeded && dist >= this.snapThreshold) { this.thresholdExceeded = true; - this.__event('moveout'); + this.E.trigger('moveout'); } else if (this.thresholdExceeded && dist < this.snapThreshold) { this.thresholdExceeded = false; - this.__event('movein'); + this.E.trigger('movein'); } this.__pos(newC); @@ -438,7 +538,7 @@ var SwipeView = (function (window, document) { point = e; } - var dist = this.options.vertical ? Math.abs(point.pageY - this.startY) : Math.abs(point.pageX - this.startX); + var dist = this.options.vertical ? Math.abs(getPageY(point) - this.startY) : Math.abs(getPageX(point) - this.startX); this.initiated = false; @@ -447,7 +547,7 @@ var SwipeView = (function (window, document) { if (!this.options.loop && (this.k > 0 || this.k < this.maxK)) { dist = 0; - this.__event('movein'); + this.E.trigger('movein'); } // Check if we exceeded the snap threshold @@ -527,20 +627,12 @@ var SwipeView = (function (window, document) { }, __flip: function () { - this.__event('flip'); + this.E.trigger('flip'); for (var i=0; i<3; i++) { this.masterPages[i].className = this.masterPages[i].className.replace(/(^|\s)swipeview-loading(\s|$)/, ''); // Remove the loading class this.masterPages[i].dataset.pageIndex = this.masterPages[i].dataset.upcomingPageIndex; } - }, - - __event: function (type) { - var ev = document.createEvent("Event"); - - ev.initEvent(this.id + 'swipeview-' + type, true, true); - - this.wrapper.dispatchEvent(ev); } }; From a8c135450b151b41507fb93d11d2f8cde8d11ab0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Thu, 18 Jul 2013 11:20:04 +0200 Subject: [PATCH 50/61] Making the destroy function working on IE + indexOf polyfill + on/off polyfill only support functions + handleEvent: it was hard to handle the handleEvent for IE case, because we needed to create a new function which is not referenced anywhere and can't be unbound when doing a off(). --- src/swipeview.js | 67 ++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 30 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 11e654f..93c54cb 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -5,6 +5,13 @@ var SwipeView = (function (window, document) { + + function indexOf (array, el) { + var i; + for (i=array.length-1; i>-1 && array[i]!==el; --i); + return i; + } + /** * MicroEvent - https://github.com/jeromeetienne/microevent.js * @@ -39,7 +46,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. unbind: function(event, fct){ this._events = this._events || {}; if( event in this._events === false ) return; - this._events[event].splice(this._events[event].indexOf(fct), 1); + this._events[event].splice(indexOf(this._events[event], fct), 1); }, trigger: function(event /* , args... */){ this._events = this._events || {}; @@ -107,13 +114,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. if("addEventListener" in el) { el.addEventListener(evt, fn, bubble); } else if("attachEvent" in el) { - if(typeof fn == "object" && fn.handleEvent) { - el.attachEvent("on" + evt, function(e){ - fn.handleEvent.call(fn, e); - }); - } else { - el.attachEvent("on" + evt, fn); - } + el.attachEvent("on" + evt, fn); } }, off = function (el, evt, fn) { @@ -121,7 +122,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. el.removeEventListener(evt, fn); } else if ("detachEvent" in el) { - el.detachEvent(evt, fn); + el.detachEvent("on" + evt, fn); } }, preventDefault = function (e) { @@ -227,16 +228,22 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. className = this.masterPages[1].className; this.masterPages[1].className = !className ? 'swipeview-active' : className + ' swipeview-active'; - on(window, resizeEvent, this, false); - on(this.wrapper, startEvent, this, false); - on(this.wrapper, moveEvent, this, false); - on(this.wrapper, endEvent, this, false); - on(this.slider, transitionEndEvent, this, false); + // handleEventF is used for binding function (required for IE) + var self = this; + this.handleEventF = function (e) { + self.handleEvent(e); + }; + + on(window, resizeEvent, this.handleEventF, false); + on(this.wrapper, startEvent, this.handleEventF, false); + on(this.wrapper, moveEvent, this.handleEventF, false); + on(this.wrapper, endEvent, this.handleEventF, false); + on(this.slider, transitionEndEvent, this.handleEventF, false); // in Opera >= 12 the transitionend event is lowercase so we register both events - if ( vendor == 'O' ) on(this.slider, transitionEndEvent.toLowerCase(), this, false); + if ( vendor == 'O' ) on(this.slider, transitionEndEvent.toLowerCase(), this.handleEventF, false); if (!hasTouch) { - on(this.wrapper, 'mouseout', this, false); + on(this.wrapper, 'mouseout', this.handleEventF, false); } }; @@ -248,23 +255,23 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. }, onFlip: function (fn) { - this.E.bind(this.id + 'flip', fn); - this.customEvents.push([this.id + 'flip', fn]); + this.E.bind('flip', fn); + this.customEvents.push(['flip', fn]); }, onMoveOut: function (fn) { - this.E.bind(this.id + 'moveout', fn); - this.customEvents.push([this.id + 'moveout', fn]); + this.E.bind('moveout', fn); + this.customEvents.push(['moveout', fn]); }, onMoveIn: function (fn) { - this.E.bind(this.id + 'movein', fn); - this.customEvents.push([this.id + 'movein', fn]); + this.E.bind('movein', fn); + this.customEvents.push(['movein', fn]); }, onTouchStart: function (fn) { - this.E.bind(this.id + 'touchstart', fn); - this.customEvents.push([this.id + 'touchstart', fn]); + this.E.bind('touchstart', fn); + this.customEvents.push(['touchstart', fn]); }, destroy: function () { @@ -274,14 +281,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. } // Remove the event listeners - off(window, resizeEvent, this, false); - off(this.wrapper, startEvent, this, false); - off(this.wrapper, moveEvent, this, false); - off(this.wrapper, endEvent, this, false); - off(this.slider, transitionEndEvent, this, false); + off(window, resizeEvent, this.handleEventF); + off(this.wrapper, startEvent, this.handleEventF); + off(this.wrapper, moveEvent, this.handleEventF); + off(this.wrapper, endEvent, this.handleEventF); + off(this.slider, transitionEndEvent, this.handleEventF); if (!hasTouch) { - off(this.wrapper, 'mouseout', this, false); + off(this.wrapper, 'mouseout', this.handleEventF); } }, From bd5df63a2045b31cb96c4a83f87ffd9c03411a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Thu, 18 Jul 2013 11:49:06 +0200 Subject: [PATCH 51/61] compile --- dist/swipeview-1.2.0.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/swipeview-1.2.0.min.js b/dist/swipeview-1.2.0.min.js index b84ef36..cccd49f 100644 --- a/dist/swipeview-1.2.0.min.js +++ b/dist/swipeview-1.2.0.min.js @@ -1,2 +1,2 @@ /*! swipeview 1.2.0 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ -var SwipeView=function(a,b){function c(a){return""===f?a:(a=a.charAt(0).toUpperCase()+a.substr(1),f+a)}var d=function(){};d.prototype={bind:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},unbind:function(a,b){this._events=this._events||{},a in this._events!=!1&&this._events[a].splice(this._events[a].indexOf(b),1)},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;bc;c++)if(a=b[c]+"ransform",a in e)return b[c].substr(0,b[c].length-1);return!1}(),g=f?"-"+f.toLowerCase()+"-":"",h=c("transform"),i=c("transitionDuration"),j=c("perspective")in e,k="ontouchstart"in a,l=!!f,m=(c("transition")in e,j?" translateZ(0)":""),n="onorientationchange"in a?"orientationchange":"resize",o=k?"touchstart":"mousedown",p=k?"touchmove":"mousemove",q=k?"touchend":"mouseup",r=k?"touchcancel":"mouseup",s=function(){if(f===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[f]}(),t=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&("object"==typeof c&&c.handleEvent?a.attachEvent("on"+b,function(a){c.handleEvent.call(c,a)}):a.attachEvent("on"+b,c))},u=function(a,b,c){"removeEventListener"in a?a.removeEventListener(b,c):"detachEvent"in a&&a.detachEvent(b,c)},v=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},w=function(a){return"pageX"in a?a.pageX:a.clientX+b.body.scrollLeft+b.documentElement.scrollLeft},x=function(a){return"pageY"in a?a.pageY:a.clientY+b.body.scrollTop+b.documentElement.scrollTop},y=0,z=function(c,e){var h,i,j,l;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++y,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(h in e)this.options[h]=e[h];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.E=new d,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],i=b.createElement("div"),i.className="swipeview-slider",i.style.cssText="position:relative;top:0;height:100%;width:100%;"+g+"transition-duration:0;"+g+"transform:translateZ(0);"+g+"transition-timing-function:ease-out",this.wrapper.appendChild(i),this.slider=i,this.refreshSize(),h=-1;2>h;h++)i=b.createElement("div"),i.style.cssText=g+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*h+"%",i.dataset||(i.dataset={}),l=-1==h?this.options.numberOfPages-1:h,i.dataset.pageIndex=l,i.dataset.upcomingPageIndex=l,this.options.loop||-1!=h||(i.style.visibility="hidden"),this.slider.appendChild(i),this.masterPages.push(i);j=this.masterPages[1].className,this.masterPages[1].className=j?j+" swipeview-active":"swipeview-active",t(a,n,this,!1),t(this.wrapper,o,this,!1),t(this.wrapper,p,this,!1),t(this.wrapper,q,this,!1),t(this.slider,s,this,!1),"O"==f&&t(this.slider,s.toLowerCase(),this,!1),k||t(this.wrapper,"mouseout",this,!1)};return z.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.E.bind(this.id+"flip",a),this.customEvents.push([this.id+"flip",a])},onMoveOut:function(a){this.E.bind(this.id+"moveout",a),this.customEvents.push([this.id+"moveout",a])},onMoveIn:function(a){this.E.bind(this.id+"movein",a),this.customEvents.push([this.id+"movein",a])},onTouchStart:function(a){this.E.bind(this.id+"touchstart",a),this.customEvents.push([this.id+"touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.E.unbind(this.customEvents[0][0],this.customEvents[0][1]),this.customEvents.shift();u(a,n,this,!1),u(this.wrapper,o,this,!1),u(this.wrapper,p,this,!1),u(this.wrapper,q,this,!1),u(this.slider,s,this,!1),k||u(this.wrapper,"mouseout",this,!1)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[i]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case o:this.__start(a);break;case p:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=w(d)-this.pointX,f=x(d)-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(x(d)-this.startY):Math.abs(w(d)-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=w(d),this.pointY=x(d),this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;v(a),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.E.trigger("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(x(b)-this.startY):Math.abs(w(b)-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[i]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.E.trigger("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex}},z}(window,document); \ No newline at end of file +var SwipeView=function(a,b){function c(a,b){var c;for(c=a.length-1;c>-1&&a[c]!==b;--c);return c}function d(a){return""===g?a:(a=a.charAt(0).toUpperCase()+a.substr(1),g+a)}var e=function(){};e.prototype={bind:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},unbind:function(a,b){this._events=this._events||{},a in this._events!=!1&&this._events[a].splice(c(this._events[a],b),1)},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;bc;c++)if(a=b[c]+"ransform",a in f)return b[c].substr(0,b[c].length-1);return!1}(),h=g?"-"+g.toLowerCase()+"-":"",i=d("transform"),j=d("transitionDuration"),k=d("perspective")in f,l="ontouchstart"in a,m=!!g,n=(d("transition")in f,k?" translateZ(0)":""),o="onorientationchange"in a?"orientationchange":"resize",p=l?"touchstart":"mousedown",q=l?"touchmove":"mousemove",r=l?"touchend":"mouseup",s=l?"touchcancel":"mouseup",t=function(){if(g===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[g]}(),u=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&a.attachEvent("on"+b,c)},v=function(a,b,c){"removeEventListener"in a?a.removeEventListener(b,c):"detachEvent"in a&&a.detachEvent("on"+b,c)},w=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},x=function(a){return"pageX"in a?a.pageX:a.clientX+b.body.scrollLeft+b.documentElement.scrollLeft},y=function(a){return"pageY"in a?a.pageY:a.clientY+b.body.scrollTop+b.documentElement.scrollTop},z=0,A=function(c,d){var f,i,j,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++z,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(f in d)this.options[f]=d[f];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.E=new e,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],i=b.createElement("div"),i.className="swipeview-slider",i.style.cssText="position:relative;top:0;height:100%;width:100%;"+h+"transition-duration:0;"+h+"transform:translateZ(0);"+h+"transition-timing-function:ease-out",this.wrapper.appendChild(i),this.slider=i,this.refreshSize(),f=-1;2>f;f++)i=b.createElement("div"),i.style.cssText=h+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*f+"%",i.dataset||(i.dataset={}),k=-1==f?this.options.numberOfPages-1:f,i.dataset.pageIndex=k,i.dataset.upcomingPageIndex=k,this.options.loop||-1!=f||(i.style.visibility="hidden"),this.slider.appendChild(i),this.masterPages.push(i);j=this.masterPages[1].className,this.masterPages[1].className=j?j+" swipeview-active":"swipeview-active";var m=this;this.handleEventF=function(a){m.handleEvent(a)},u(a,o,this.handleEventF,!1),u(this.wrapper,p,this.handleEventF,!1),u(this.wrapper,q,this.handleEventF,!1),u(this.wrapper,r,this.handleEventF,!1),u(this.slider,t,this.handleEventF,!1),"O"==g&&u(this.slider,t.toLowerCase(),this.handleEventF,!1),l||u(this.wrapper,"mouseout",this.handleEventF,!1)};return A.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.E.bind("flip",a),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.E.bind("moveout",a),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.E.bind("movein",a),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.E.bind("touchstart",a),this.customEvents.push(["touchstart",a])},destroy:function(){for(;this.customEvents.length;)this.E.unbind(this.customEvents[0][0],this.customEvents[0][1]),this.customEvents.shift();v(a,o,this.handleEventF),v(this.wrapper,p,this.handleEventF),v(this.wrapper,q,this.handleEventF),v(this.wrapper,r,this.handleEventF),v(this.slider,t,this.handleEventF),l||v(this.wrapper,"mouseout",this.handleEventF)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[j]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case p:this.__start(a);break;case q:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=x(d)-this.pointX,f=y(d)-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(y(d)-this.startY):Math.abs(x(d)-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=x(d),this.pointY=y(d),this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;w(a),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.E.trigger("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(y(b)-this.startY):Math.abs(x(b)-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[j]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.E.trigger("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex}},A}(window,document); \ No newline at end of file From 6af4c132c9a9c1629d7888c173684aaba13c1efb Mon Sep 17 00:00:00 2001 From: Alex S Date: Wed, 7 Aug 2013 15:49:15 +0200 Subject: [PATCH 52/61] Provide a way to unbind the external events without destroying --- src/swipeview.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/swipeview.js b/src/swipeview.js index 93c54cb..7dfdd01 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -274,11 +274,18 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. this.customEvents.push(['touchstart', fn]); }, - destroy: function () { + /** + * Removes all external events callbacks + */ + unbind : function(){ while ( this.customEvents.length ) { this.E.unbind(this.customEvents[0][0], this.customEvents[0][1]); this.customEvents.shift(); } + }, + + destroy: function () { + this.unbind(); // Remove the event listeners off(window, resizeEvent, this.handleEventF); From eed82a53e3f057b55ca6a6dc1c5560f8c16b665b Mon Sep 17 00:00:00 2001 From: Alex S Date: Wed, 7 Aug 2013 16:38:39 +0200 Subject: [PATCH 53/61] Bump to v1.2.1 --- dist/swipeview-1.2.1.min.js | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 dist/swipeview-1.2.1.min.js diff --git a/dist/swipeview-1.2.1.min.js b/dist/swipeview-1.2.1.min.js new file mode 100644 index 0000000..b3030a1 --- /dev/null +++ b/dist/swipeview-1.2.1.min.js @@ -0,0 +1,2 @@ +/*! swipeview 1.2.1 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ +var SwipeView=function(a,b){function c(a,b){var c;for(c=a.length-1;c>-1&&a[c]!==b;--c);return c}function d(a){return""===g?a:(a=a.charAt(0).toUpperCase()+a.substr(1),g+a)}var e=function(){};e.prototype={bind:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},unbind:function(a,b){this._events=this._events||{},a in this._events!=!1&&this._events[a].splice(c(this._events[a],b),1)},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;bc;c++)if(a=b[c]+"ransform",a in f)return b[c].substr(0,b[c].length-1);return!1}(),h=g?"-"+g.toLowerCase()+"-":"",i=d("transform"),j=d("transitionDuration"),k=d("perspective")in f,l="ontouchstart"in a,m=!!g,n=(d("transition")in f,k?" translateZ(0)":""),o="onorientationchange"in a?"orientationchange":"resize",p=l?"touchstart":"mousedown",q=l?"touchmove":"mousemove",r=l?"touchend":"mouseup",s=l?"touchcancel":"mouseup",t=function(){if(g===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[g]}(),u=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&a.attachEvent("on"+b,c)},v=function(a,b,c){"removeEventListener"in a?a.removeEventListener(b,c):"detachEvent"in a&&a.detachEvent("on"+b,c)},w=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},x=function(a){return"pageX"in a?a.pageX:a.clientX+b.body.scrollLeft+b.documentElement.scrollLeft},y=function(a){return"pageY"in a?a.pageY:a.clientY+b.body.scrollTop+b.documentElement.scrollTop},z=0,A=function(c,d){var f,i,j,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++z,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(f in d)this.options[f]=d[f];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.E=new e,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],i=b.createElement("div"),i.className="swipeview-slider",i.style.cssText="position:relative;top:0;height:100%;width:100%;"+h+"transition-duration:0;"+h+"transform:translateZ(0);"+h+"transition-timing-function:ease-out",this.wrapper.appendChild(i),this.slider=i,this.refreshSize(),f=-1;2>f;f++)i=b.createElement("div"),i.style.cssText=h+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*f+"%",i.dataset||(i.dataset={}),k=-1==f?this.options.numberOfPages-1:f,i.dataset.pageIndex=k,i.dataset.upcomingPageIndex=k,this.options.loop||-1!=f||(i.style.visibility="hidden"),this.slider.appendChild(i),this.masterPages.push(i);j=this.masterPages[1].className,this.masterPages[1].className=j?j+" swipeview-active":"swipeview-active";var m=this;this.handleEventF=function(a){m.handleEvent(a)},u(a,o,this.handleEventF,!1),u(this.wrapper,p,this.handleEventF,!1),u(this.wrapper,q,this.handleEventF,!1),u(this.wrapper,r,this.handleEventF,!1),u(this.slider,t,this.handleEventF,!1),"O"==g&&u(this.slider,t.toLowerCase(),this.handleEventF,!1),l||u(this.wrapper,"mouseout",this.handleEventF,!1)};return A.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.E.bind("flip",a),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.E.bind("moveout",a),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.E.bind("movein",a),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.E.bind("touchstart",a),this.customEvents.push(["touchstart",a])},unbind:function(){for(;this.customEvents.length;)this.E.unbind(this.customEvents[0][0],this.customEvents[0][1]),this.customEvents.shift()},destroy:function(){this.unbind(),v(a,o,this.handleEventF),v(this.wrapper,p,this.handleEventF),v(this.wrapper,q,this.handleEventF),v(this.wrapper,r,this.handleEventF),v(this.slider,t,this.handleEventF),l||v(this.wrapper,"mouseout",this.handleEventF)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[j]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip()},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case p:this.__start(a);break;case q:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=x(d)-this.pointX,f=y(d)-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(y(d)-this.startY):Math.abs(x(d)-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=x(d),this.pointY=y(d),this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;w(a),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.E.trigger("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(y(b)-this.startY):Math.abs(x(b)-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[j]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(){this.E.trigger("flip");for(var a=0;3>a;a++)this.masterPages[a].className=this.masterPages[a].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[a].dataset.pageIndex=this.masterPages[a].dataset.upcomingPageIndex}},A}(window,document); \ No newline at end of file diff --git a/package.json b/package.json index bb56140..10b3665 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swipeview", - "version": "1.2.0", + "version": "1.2.1", "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli", "keywords": [ "swipe", From 5afdbd0a5ed350149ac1499c3cb557dc2a68fd98 Mon Sep 17 00:00:00 2001 From: Alex S Date: Mon, 12 Aug 2013 14:07:22 +0200 Subject: [PATCH 54/61] Add origin information in onFlip callback --- dist/swipeview-1.2.2.min.js | 2 ++ package.json | 2 +- src/swipeview.js | 6 +++--- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 dist/swipeview-1.2.2.min.js diff --git a/dist/swipeview-1.2.2.min.js b/dist/swipeview-1.2.2.min.js new file mode 100644 index 0000000..b849f08 --- /dev/null +++ b/dist/swipeview-1.2.2.min.js @@ -0,0 +1,2 @@ +/*! swipeview 1.2.2 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ +var SwipeView=function(a,b){function c(a,b){var c;for(c=a.length-1;c>-1&&a[c]!==b;--c);return c}function d(a){return""===g?a:(a=a.charAt(0).toUpperCase()+a.substr(1),g+a)}var e=function(){};e.prototype={bind:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},unbind:function(a,b){this._events=this._events||{},a in this._events!=!1&&this._events[a].splice(c(this._events[a],b),1)},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;bc;c++)if(a=b[c]+"ransform",a in f)return b[c].substr(0,b[c].length-1);return!1}(),h=g?"-"+g.toLowerCase()+"-":"",i=d("transform"),j=d("transitionDuration"),k=d("perspective")in f,l="ontouchstart"in a,m=!!g,n=(d("transition")in f,k?" translateZ(0)":""),o="onorientationchange"in a?"orientationchange":"resize",p=l?"touchstart":"mousedown",q=l?"touchmove":"mousemove",r=l?"touchend":"mouseup",s=l?"touchcancel":"mouseup",t=function(){if(g===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[g]}(),u=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&a.attachEvent("on"+b,c)},v=function(a,b,c){"removeEventListener"in a?a.removeEventListener(b,c):"detachEvent"in a&&a.detachEvent("on"+b,c)},w=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},x=function(a){return"pageX"in a?a.pageX:a.clientX+b.body.scrollLeft+b.documentElement.scrollLeft},y=function(a){return"pageY"in a?a.pageY:a.clientY+b.body.scrollTop+b.documentElement.scrollTop},z=0,A=function(c,d){var f,i,j,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++z,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(f in d)this.options[f]=d[f];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.E=new e,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],i=b.createElement("div"),i.className="swipeview-slider",i.style.cssText="position:relative;top:0;height:100%;width:100%;"+h+"transition-duration:0;"+h+"transform:translateZ(0);"+h+"transition-timing-function:ease-out",this.wrapper.appendChild(i),this.slider=i,this.refreshSize(),f=-1;2>f;f++)i=b.createElement("div"),i.style.cssText=h+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*f+"%",i.dataset||(i.dataset={}),k=-1==f?this.options.numberOfPages-1:f,i.dataset.pageIndex=k,i.dataset.upcomingPageIndex=k,this.options.loop||-1!=f||(i.style.visibility="hidden"),this.slider.appendChild(i),this.masterPages.push(i);j=this.masterPages[1].className,this.masterPages[1].className=j?j+" swipeview-active":"swipeview-active";var m=this;this.handleEventF=function(a){m.handleEvent(a)},u(a,o,this.handleEventF,!1),u(this.wrapper,p,this.handleEventF,!1),u(this.wrapper,q,this.handleEventF,!1),u(this.wrapper,r,this.handleEventF,!1),u(this.slider,t,this.handleEventF,!1),"O"==g&&u(this.slider,t.toLowerCase(),this.handleEventF,!1),l||u(this.wrapper,"mouseout",this.handleEventF,!1)};return A.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.E.bind("flip",a),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.E.bind("moveout",a),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.E.bind("movein",a),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.E.bind("touchstart",a),this.customEvents.push(["touchstart",a])},unbind:function(){for(;this.customEvents.length;)this.E.unbind(this.customEvents[0][0],this.customEvents[0][1]),this.customEvents.shift()},destroy:function(){this.unbind(),v(a,o,this.handleEventF),v(this.wrapper,p,this.handleEventF),v(this.wrapper,q,this.handleEventF),v(this.wrapper,r,this.handleEventF),v(this.slider,t,this.handleEventF),l||v(this.wrapper,"mouseout",this.handleEventF)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[j]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip(!0)},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case p:this.__start(a);break;case q:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=x(d)-this.pointX,f=y(d)-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(y(d)-this.startY):Math.abs(x(d)-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=x(d),this.pointY=y(d),this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;w(a),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.E.trigger("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(y(b)-this.startY):Math.abs(x(b)-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[j]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(a){this.E.trigger("flip",{triggeredByGoto:!!a});for(var b=0;3>b;b++)this.masterPages[b].className=this.masterPages[b].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[b].dataset.pageIndex=this.masterPages[b].dataset.upcomingPageIndex}},A}(window,document); \ No newline at end of file diff --git a/package.json b/package.json index 10b3665..cb2d7be 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swipeview", - "version": "1.2.1", + "version": "1.2.2", "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli", "keywords": [ "swipe", diff --git a/src/swipeview.js b/src/swipeview.js index 7dfdd01..4dc043a 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -363,7 +363,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. this.masterPages[0].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; } - this.__flip(); + this.__flip( true ); }, next: function () { @@ -640,8 +640,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. } }, - __flip: function () { - this.E.trigger('flip'); + __flip: function ( fromGoTo ) { + this.E.trigger('flip', { triggeredByGoto : !!fromGoTo }); for (var i=0; i<3; i++) { this.masterPages[i].className = this.masterPages[i].className.replace(/(^|\s)swipeview-loading(\s|$)/, ''); // Remove the loading class From c278ab62f1f8b046351fed793a761e9ea13da0a0 Mon Sep 17 00:00:00 2001 From: Alex S Date: Tue, 13 Aug 2013 17:00:04 +0200 Subject: [PATCH 55/61] GoToPage fix --- src/swipeview.js | 39 +++++++++++++++------------------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/src/swipeview.js b/src/swipeview.js index 4dc043a..89bd26e 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -337,31 +337,22 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. this.masterPages[this.currentMasterPage].className = this.masterPages[this.currentMasterPage].className + ' swipeview-active'; - if (this.currentMasterPage === 0) { - this.masterPages[2].style[this.cssPosition] = this.page * 100 - 100 + '%'; - this.masterPages[0].style[this.cssPosition] = this.page * 100 + '%'; - this.masterPages[1].style[this.cssPosition] = this.page * 100 + 100 + '%'; - - this.masterPages[2].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; - this.masterPages[0].dataset.upcomingPageIndex = this.page; - this.masterPages[1].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; - } else if (this.currentMasterPage == 1) { - this.masterPages[0].style[this.cssPosition] = this.page * 100 - 100 + '%'; - this.masterPages[1].style[this.cssPosition] = this.page * 100 + '%'; - this.masterPages[2].style[this.cssPosition] = this.page * 100 + 100 + '%'; - - this.masterPages[0].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; - this.masterPages[1].dataset.upcomingPageIndex = this.page; - this.masterPages[2].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; - } else { - this.masterPages[1].style[this.cssPosition] = this.page * 100 - 100 + '%'; - this.masterPages[2].style[this.cssPosition] = this.page * 100 + '%'; - this.masterPages[0].style[this.cssPosition] = this.page * 100 + 100 + '%'; - this.masterPages[1].dataset.upcomingPageIndex = this.page === 0 ? this.options.numberOfPages-1 : this.page - 1; - this.masterPages[2].dataset.upcomingPageIndex = this.page; - this.masterPages[0].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? 0 : this.page + 1; - } + var indices = (function calculatePagesIndexFromCurrent( currentMasterPage ){ + if (currentMasterPage === 0) return [2, 0, 1]; + else if (currentMasterPage === 1) return [0, 1, 2]; + else return [1, 2, 0]; + })(this.currentMasterPage); + + this.masterPages[ indices[0] ].style[this.cssPosition] = this.page * 100 - 100 + '%'; + this.masterPages[ indices[1] ].style[this.cssPosition] = this.page * 100 + '%'; + this.masterPages[ indices[2] ].style[this.cssPosition] = this.page * 100 + 100 + '%'; + + this.masterPages[ indices[0] ].dataset.upcomingPageIndex = this.page === 0 ? + (this.options.loop ? this.options.numberOfPages-1 : undefined ): this.page - 1; + this.masterPages[ indices[1] ].dataset.upcomingPageIndex = this.page; + this.masterPages[ indices[2] ].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? + (this.options.loop ? 0 : undefined ): this.page + 1; this.__flip( true ); }, From 714b56b1b9e37eaa90a2eb113a72cac40b7e99c4 Mon Sep 17 00:00:00 2001 From: Alex S Date: Tue, 13 Aug 2013 18:38:54 +0200 Subject: [PATCH 56/61] Fix no loop when swipe --- src/swipeview.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/swipeview.js b/src/swipeview.js index 89bd26e..c756678 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -589,6 +589,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. this.masterPages[pageFlip].style[this.cssPosition] = this.page * 100 - 100 + '%'; pageFlipIndex = this.page - 1; + pageFlipIndex = pageFlipIndex - Math.floor(pageFlipIndex / this.options.numberOfPages) * this.options.numberOfPages; + pageFlipIndex = pageFlipIndex === this.options.numberOfPages && !this.options.loop ? undefined : pageFlipIndex; } else { this.page = -Math.floor(this.k / this.pageSize); this.currentMasterPage = (this.page + 1) - Math.floor((this.page + 1) / 3) * 3; @@ -599,6 +601,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. this.masterPages[pageFlip].style[this.cssPosition] = this.page * 100 + 100 + '%'; pageFlipIndex = this.page + 1; + pageFlipIndex = pageFlipIndex - Math.floor(pageFlipIndex / this.options.numberOfPages) * this.options.numberOfPages; + pageFlipIndex = pageFlipIndex === 0 && !this.options.loop ? undefined : pageFlipIndex; } // Add active class to current page @@ -611,7 +615,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. if(!/(^|\s)swipeview-loading(\s|$)/.test(className)) this.masterPages[pageFlip].className = !className ? 'swipeview-loading' : className + ' swipeview-loading'; - pageFlipIndex = pageFlipIndex - Math.floor(pageFlipIndex / this.options.numberOfPages) * this.options.numberOfPages; this.masterPages[pageFlip].dataset.upcomingPageIndex = pageFlipIndex; // Index to be loaded in the newly flipped page newC = -this.page * this.pageSize; From 84ef88f9062794f6304270cff85607835fba804d Mon Sep 17 00:00:00 2001 From: Alex S Date: Mon, 19 Aug 2013 14:17:38 +0200 Subject: [PATCH 57/61] Correctly bump version 1.2.2 --- dist/swipeview-1.2.2.min.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dist/swipeview-1.2.2.min.js b/dist/swipeview-1.2.2.min.js index b849f08..611accf 100644 --- a/dist/swipeview-1.2.2.min.js +++ b/dist/swipeview-1.2.2.min.js @@ -1,2 +1,2 @@ /*! swipeview 1.2.2 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ -var SwipeView=function(a,b){function c(a,b){var c;for(c=a.length-1;c>-1&&a[c]!==b;--c);return c}function d(a){return""===g?a:(a=a.charAt(0).toUpperCase()+a.substr(1),g+a)}var e=function(){};e.prototype={bind:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},unbind:function(a,b){this._events=this._events||{},a in this._events!=!1&&this._events[a].splice(c(this._events[a],b),1)},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;bc;c++)if(a=b[c]+"ransform",a in f)return b[c].substr(0,b[c].length-1);return!1}(),h=g?"-"+g.toLowerCase()+"-":"",i=d("transform"),j=d("transitionDuration"),k=d("perspective")in f,l="ontouchstart"in a,m=!!g,n=(d("transition")in f,k?" translateZ(0)":""),o="onorientationchange"in a?"orientationchange":"resize",p=l?"touchstart":"mousedown",q=l?"touchmove":"mousemove",r=l?"touchend":"mouseup",s=l?"touchcancel":"mouseup",t=function(){if(g===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[g]}(),u=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&a.attachEvent("on"+b,c)},v=function(a,b,c){"removeEventListener"in a?a.removeEventListener(b,c):"detachEvent"in a&&a.detachEvent("on"+b,c)},w=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},x=function(a){return"pageX"in a?a.pageX:a.clientX+b.body.scrollLeft+b.documentElement.scrollLeft},y=function(a){return"pageY"in a?a.pageY:a.clientY+b.body.scrollTop+b.documentElement.scrollTop},z=0,A=function(c,d){var f,i,j,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++z,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(f in d)this.options[f]=d[f];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.E=new e,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],i=b.createElement("div"),i.className="swipeview-slider",i.style.cssText="position:relative;top:0;height:100%;width:100%;"+h+"transition-duration:0;"+h+"transform:translateZ(0);"+h+"transition-timing-function:ease-out",this.wrapper.appendChild(i),this.slider=i,this.refreshSize(),f=-1;2>f;f++)i=b.createElement("div"),i.style.cssText=h+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*f+"%",i.dataset||(i.dataset={}),k=-1==f?this.options.numberOfPages-1:f,i.dataset.pageIndex=k,i.dataset.upcomingPageIndex=k,this.options.loop||-1!=f||(i.style.visibility="hidden"),this.slider.appendChild(i),this.masterPages.push(i);j=this.masterPages[1].className,this.masterPages[1].className=j?j+" swipeview-active":"swipeview-active";var m=this;this.handleEventF=function(a){m.handleEvent(a)},u(a,o,this.handleEventF,!1),u(this.wrapper,p,this.handleEventF,!1),u(this.wrapper,q,this.handleEventF,!1),u(this.wrapper,r,this.handleEventF,!1),u(this.slider,t,this.handleEventF,!1),"O"==g&&u(this.slider,t.toLowerCase(),this.handleEventF,!1),l||u(this.wrapper,"mouseout",this.handleEventF,!1)};return A.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.E.bind("flip",a),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.E.bind("moveout",a),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.E.bind("movein",a),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.E.bind("touchstart",a),this.customEvents.push(["touchstart",a])},unbind:function(){for(;this.customEvents.length;)this.E.unbind(this.customEvents[0][0],this.customEvents[0][1]),this.customEvents.shift()},destroy:function(){this.unbind(),v(a,o,this.handleEventF),v(this.wrapper,p,this.handleEventF),v(this.wrapper,q,this.handleEventF),v(this.wrapper,r,this.handleEventF),v(this.slider,t,this.handleEventF),l||v(this.wrapper,"mouseout",this.handleEventF)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[j]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active",0===this.currentMasterPage?(this.masterPages[2].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[2].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[0].dataset.upcomingPageIndex=this.page,this.masterPages[1].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):1==this.currentMasterPage?(this.masterPages[0].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[1].style[this.cssPosition]=100*this.page+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[0].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[1].dataset.upcomingPageIndex=this.page,this.masterPages[2].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1):(this.masterPages[1].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[2].style[this.cssPosition]=100*this.page+"%",this.masterPages[0].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[1].dataset.upcomingPageIndex=0===this.page?this.options.numberOfPages-1:this.page-1,this.masterPages[2].dataset.upcomingPageIndex=this.page,this.masterPages[0].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?0:this.page+1),this.__flip(!0)},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case p:this.__start(a);break;case q:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=x(d)-this.pointX,f=y(d)-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(y(d)-this.startY):Math.abs(x(d)-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=x(d),this.pointY=y(d),this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;w(a),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.E.trigger("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(y(b)-this.startY):Math.abs(x(b)-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[j]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(a){this.E.trigger("flip",{triggeredByGoto:!!a});for(var b=0;3>b;b++)this.masterPages[b].className=this.masterPages[b].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[b].dataset.pageIndex=this.masterPages[b].dataset.upcomingPageIndex}},A}(window,document); \ No newline at end of file +var SwipeView=function(a,b){function c(a,b){var c;for(c=a.length-1;c>-1&&a[c]!==b;--c);return c}function d(a){return""===g?a:(a=a.charAt(0).toUpperCase()+a.substr(1),g+a)}var e=function(){};e.prototype={bind:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},unbind:function(a,b){this._events=this._events||{},a in this._events!=!1&&this._events[a].splice(c(this._events[a],b),1)},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;bc;c++)if(a=b[c]+"ransform",a in f)return b[c].substr(0,b[c].length-1);return!1}(),h=g?"-"+g.toLowerCase()+"-":"",i=d("transform"),j=d("transitionDuration"),k=d("perspective")in f,l="ontouchstart"in a,m=!!g,n=(d("transition")in f,k?" translateZ(0)":""),o="onorientationchange"in a?"orientationchange":"resize",p=l?"touchstart":"mousedown",q=l?"touchmove":"mousemove",r=l?"touchend":"mouseup",s=l?"touchcancel":"mouseup",t=function(){if(g===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[g]}(),u=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&a.attachEvent("on"+b,c)},v=function(a,b,c){"removeEventListener"in a?a.removeEventListener(b,c):"detachEvent"in a&&a.detachEvent("on"+b,c)},w=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},x=function(a){return"pageX"in a?a.pageX:a.clientX+b.body.scrollLeft+b.documentElement.scrollLeft},y=function(a){return"pageY"in a?a.pageY:a.clientY+b.body.scrollTop+b.documentElement.scrollTop},z=0,A=function(c,d){var f,i,j,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++z,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(f in d)this.options[f]=d[f];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.E=new e,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],i=b.createElement("div"),i.className="swipeview-slider",i.style.cssText="position:relative;top:0;height:100%;width:100%;"+h+"transition-duration:0;"+h+"transform:translateZ(0);"+h+"transition-timing-function:ease-out",this.wrapper.appendChild(i),this.slider=i,this.refreshSize(),f=-1;2>f;f++)i=b.createElement("div"),i.style.cssText=h+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*f+"%",i.dataset||(i.dataset={}),k=-1==f?this.options.numberOfPages-1:f,i.dataset.pageIndex=k,i.dataset.upcomingPageIndex=k,this.options.loop||-1!=f||(i.style.visibility="hidden"),this.slider.appendChild(i),this.masterPages.push(i);j=this.masterPages[1].className,this.masterPages[1].className=j?j+" swipeview-active":"swipeview-active";var m=this;this.handleEventF=function(a){m.handleEvent(a)},u(a,o,this.handleEventF,!1),u(this.wrapper,p,this.handleEventF,!1),u(this.wrapper,q,this.handleEventF,!1),u(this.wrapper,r,this.handleEventF,!1),u(this.slider,t,this.handleEventF,!1),"O"==g&&u(this.slider,t.toLowerCase(),this.handleEventF,!1),l||u(this.wrapper,"mouseout",this.handleEventF,!1)};return A.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.E.bind("flip",a),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.E.bind("moveout",a),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.E.bind("movein",a),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.E.bind("touchstart",a),this.customEvents.push(["touchstart",a])},unbind:function(){for(;this.customEvents.length;)this.E.unbind(this.customEvents[0][0],this.customEvents[0][1]),this.customEvents.shift()},destroy:function(){this.unbind(),v(a,o,this.handleEventF),v(this.wrapper,p,this.handleEventF),v(this.wrapper,q,this.handleEventF),v(this.wrapper,r,this.handleEventF),v(this.slider,t,this.handleEventF),l||v(this.wrapper,"mouseout",this.handleEventF)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[j]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active";var c=function(a){return 0===a?[2,0,1]:1===a?[0,1,2]:[1,2,0]}(this.currentMasterPage);this.masterPages[c[0]].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[c[1]].style[this.cssPosition]=100*this.page+"%",this.masterPages[c[2]].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[c[0]].dataset.upcomingPageIndex=0===this.page?this.options.loop?this.options.numberOfPages-1:void 0:this.page-1,this.masterPages[c[1]].dataset.upcomingPageIndex=this.page,this.masterPages[c[2]].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?this.options.loop?0:void 0:this.page+1,this.__flip(!0)},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case p:this.__start(a);break;case q:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=x(d)-this.pointX,f=y(d)-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(y(d)-this.startY):Math.abs(x(d)-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=x(d),this.pointY=y(d),this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;w(a),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.E.trigger("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(y(b)-this.startY):Math.abs(x(b)-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1,b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,b=b!==this.options.numberOfPages||this.options.loop?b:void 0):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1,b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,b=0!==b||this.options.loop?b:void 0),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[j]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(a){this.E.trigger("flip",{triggeredByGoto:!!a});for(var b=0;3>b;b++)this.masterPages[b].className=this.masterPages[b].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[b].dataset.pageIndex=this.masterPages[b].dataset.upcomingPageIndex}},A}(window,document); \ No newline at end of file From 23844de670ec6235b3b0a4011cd89a2570c300e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Wed, 18 Sep 2013 17:19:37 +0200 Subject: [PATCH 58/61] Using loop:false fix the initial state of pages (sometimes was hidden) --- dist/swipeview-1.2.3.min.js | 2 ++ package.json | 2 +- src/swipeview.js | 2 -- 3 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 dist/swipeview-1.2.3.min.js diff --git a/dist/swipeview-1.2.3.min.js b/dist/swipeview-1.2.3.min.js new file mode 100644 index 0000000..7eff245 --- /dev/null +++ b/dist/swipeview-1.2.3.min.js @@ -0,0 +1,2 @@ +/*! swipeview 1.2.3 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ +var SwipeView=function(a,b){function c(a,b){var c;for(c=a.length-1;c>-1&&a[c]!==b;--c);return c}function d(a){return""===g?a:(a=a.charAt(0).toUpperCase()+a.substr(1),g+a)}var e=function(){};e.prototype={bind:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},unbind:function(a,b){this._events=this._events||{},a in this._events!=!1&&this._events[a].splice(c(this._events[a],b),1)},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;bc;c++)if(a=b[c]+"ransform",a in f)return b[c].substr(0,b[c].length-1);return!1}(),h=g?"-"+g.toLowerCase()+"-":"",i=d("transform"),j=d("transitionDuration"),k=d("perspective")in f,l="ontouchstart"in a,m=!!g,n=(d("transition")in f,k?" translateZ(0)":""),o="onorientationchange"in a?"orientationchange":"resize",p=l?"touchstart":"mousedown",q=l?"touchmove":"mousemove",r=l?"touchend":"mouseup",s=l?"touchcancel":"mouseup",t=function(){if(g===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[g]}(),u=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&a.attachEvent("on"+b,c)},v=function(a,b,c){"removeEventListener"in a?a.removeEventListener(b,c):"detachEvent"in a&&a.detachEvent("on"+b,c)},w=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},x=function(a){return"pageX"in a?a.pageX:a.clientX+b.body.scrollLeft+b.documentElement.scrollLeft},y=function(a){return"pageY"in a?a.pageY:a.clientY+b.body.scrollTop+b.documentElement.scrollTop},z=0,A=function(c,d){var f,i,j,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++z,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(f in d)this.options[f]=d[f];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.E=new e,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],i=b.createElement("div"),i.className="swipeview-slider",i.style.cssText="position:relative;top:0;height:100%;width:100%;"+h+"transition-duration:0;"+h+"transform:translateZ(0);"+h+"transition-timing-function:ease-out",this.wrapper.appendChild(i),this.slider=i,this.refreshSize(),f=-1;2>f;f++)i=b.createElement("div"),i.style.cssText=h+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*f+"%",i.dataset||(i.dataset={}),k=-1==f?this.options.numberOfPages-1:f,i.dataset.pageIndex=k,i.dataset.upcomingPageIndex=k,this.slider.appendChild(i),this.masterPages.push(i);j=this.masterPages[1].className,this.masterPages[1].className=j?j+" swipeview-active":"swipeview-active";var m=this;this.handleEventF=function(a){m.handleEvent(a)},u(a,o,this.handleEventF,!1),u(this.wrapper,p,this.handleEventF,!1),u(this.wrapper,q,this.handleEventF,!1),u(this.wrapper,r,this.handleEventF,!1),u(this.slider,t,this.handleEventF,!1),"O"==g&&u(this.slider,t.toLowerCase(),this.handleEventF,!1),l||u(this.wrapper,"mouseout",this.handleEventF,!1)};return A.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.E.bind("flip",a),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.E.bind("moveout",a),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.E.bind("movein",a),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.E.bind("touchstart",a),this.customEvents.push(["touchstart",a])},unbind:function(){for(;this.customEvents.length;)this.E.unbind(this.customEvents[0][0],this.customEvents[0][1]),this.customEvents.shift()},destroy:function(){this.unbind(),v(a,o,this.handleEventF),v(this.wrapper,p,this.handleEventF),v(this.wrapper,q,this.handleEventF),v(this.wrapper,r,this.handleEventF),v(this.slider,t,this.handleEventF),l||v(this.wrapper,"mouseout",this.handleEventF)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[j]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active";var c=function(a){return 0===a?[2,0,1]:1===a?[0,1,2]:[1,2,0]}(this.currentMasterPage);this.masterPages[c[0]].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[c[1]].style[this.cssPosition]=100*this.page+"%",this.masterPages[c[2]].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[c[0]].dataset.upcomingPageIndex=0===this.page?this.options.loop?this.options.numberOfPages-1:void 0:this.page-1,this.masterPages[c[1]].dataset.upcomingPageIndex=this.page,this.masterPages[c[2]].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?this.options.loop?0:void 0:this.page+1,this.__flip(!0)},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case p:this.__start(a);break;case q:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=x(d)-this.pointX,f=y(d)-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(y(d)-this.startY):Math.abs(x(d)-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=x(d),this.pointY=y(d),this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;w(a),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.E.trigger("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(y(b)-this.startY):Math.abs(x(b)-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1,b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,b=b!==this.options.numberOfPages||this.options.loop?b:void 0):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1,b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,b=0!==b||this.options.loop?b:void 0),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[j]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(a){this.E.trigger("flip",{triggeredByGoto:!!a});for(var b=0;3>b;b++)this.masterPages[b].className=this.masterPages[b].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[b].dataset.pageIndex=this.masterPages[b].dataset.upcomingPageIndex}},A}(window,document); \ No newline at end of file diff --git a/package.json b/package.json index cb2d7be..c4a963c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swipeview", - "version": "1.2.2", + "version": "1.2.3", "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli", "keywords": [ "swipe", diff --git a/src/swipeview.js b/src/swipeview.js index c756678..28cb43e 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -219,8 +219,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. div.dataset.pageIndex = pageIndex; div.dataset.upcomingPageIndex = pageIndex; - if (!this.options.loop && i == -1) div.style.visibility = 'hidden'; - this.slider.appendChild(div); this.masterPages.push(div); } From 7ee74268a25f093f0241d5db7610cebfa43361d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Thu, 19 Sep 2013 14:33:33 +0200 Subject: [PATCH 59/61] Really fix the loop:false visibility:hidden bug - goToPage now reset the visibility --- dist/swipeview-1.2.3.min.js | 2 +- src/swipeview.js | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dist/swipeview-1.2.3.min.js b/dist/swipeview-1.2.3.min.js index 7eff245..ab63caf 100644 --- a/dist/swipeview-1.2.3.min.js +++ b/dist/swipeview-1.2.3.min.js @@ -1,2 +1,2 @@ /*! swipeview 1.2.3 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ -var SwipeView=function(a,b){function c(a,b){var c;for(c=a.length-1;c>-1&&a[c]!==b;--c);return c}function d(a){return""===g?a:(a=a.charAt(0).toUpperCase()+a.substr(1),g+a)}var e=function(){};e.prototype={bind:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},unbind:function(a,b){this._events=this._events||{},a in this._events!=!1&&this._events[a].splice(c(this._events[a],b),1)},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;bc;c++)if(a=b[c]+"ransform",a in f)return b[c].substr(0,b[c].length-1);return!1}(),h=g?"-"+g.toLowerCase()+"-":"",i=d("transform"),j=d("transitionDuration"),k=d("perspective")in f,l="ontouchstart"in a,m=!!g,n=(d("transition")in f,k?" translateZ(0)":""),o="onorientationchange"in a?"orientationchange":"resize",p=l?"touchstart":"mousedown",q=l?"touchmove":"mousemove",r=l?"touchend":"mouseup",s=l?"touchcancel":"mouseup",t=function(){if(g===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[g]}(),u=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&a.attachEvent("on"+b,c)},v=function(a,b,c){"removeEventListener"in a?a.removeEventListener(b,c):"detachEvent"in a&&a.detachEvent("on"+b,c)},w=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},x=function(a){return"pageX"in a?a.pageX:a.clientX+b.body.scrollLeft+b.documentElement.scrollLeft},y=function(a){return"pageY"in a?a.pageY:a.clientY+b.body.scrollTop+b.documentElement.scrollTop},z=0,A=function(c,d){var f,i,j,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++z,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(f in d)this.options[f]=d[f];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.E=new e,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],i=b.createElement("div"),i.className="swipeview-slider",i.style.cssText="position:relative;top:0;height:100%;width:100%;"+h+"transition-duration:0;"+h+"transform:translateZ(0);"+h+"transition-timing-function:ease-out",this.wrapper.appendChild(i),this.slider=i,this.refreshSize(),f=-1;2>f;f++)i=b.createElement("div"),i.style.cssText=h+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*f+"%",i.dataset||(i.dataset={}),k=-1==f?this.options.numberOfPages-1:f,i.dataset.pageIndex=k,i.dataset.upcomingPageIndex=k,this.slider.appendChild(i),this.masterPages.push(i);j=this.masterPages[1].className,this.masterPages[1].className=j?j+" swipeview-active":"swipeview-active";var m=this;this.handleEventF=function(a){m.handleEvent(a)},u(a,o,this.handleEventF,!1),u(this.wrapper,p,this.handleEventF,!1),u(this.wrapper,q,this.handleEventF,!1),u(this.wrapper,r,this.handleEventF,!1),u(this.slider,t,this.handleEventF,!1),"O"==g&&u(this.slider,t.toLowerCase(),this.handleEventF,!1),l||u(this.wrapper,"mouseout",this.handleEventF,!1)};return A.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.E.bind("flip",a),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.E.bind("moveout",a),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.E.bind("movein",a),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.E.bind("touchstart",a),this.customEvents.push(["touchstart",a])},unbind:function(){for(;this.customEvents.length;)this.E.unbind(this.customEvents[0][0],this.customEvents[0][1]),this.customEvents.shift()},destroy:function(){this.unbind(),v(a,o,this.handleEventF),v(this.wrapper,p,this.handleEventF),v(this.wrapper,q,this.handleEventF),v(this.wrapper,r,this.handleEventF),v(this.slider,t,this.handleEventF),l||v(this.wrapper,"mouseout",this.handleEventF)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[j]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active";var c=function(a){return 0===a?[2,0,1]:1===a?[0,1,2]:[1,2,0]}(this.currentMasterPage);this.masterPages[c[0]].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[c[1]].style[this.cssPosition]=100*this.page+"%",this.masterPages[c[2]].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[c[0]].dataset.upcomingPageIndex=0===this.page?this.options.loop?this.options.numberOfPages-1:void 0:this.page-1,this.masterPages[c[1]].dataset.upcomingPageIndex=this.page,this.masterPages[c[2]].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?this.options.loop?0:void 0:this.page+1,this.__flip(!0)},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case p:this.__start(a);break;case q:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=x(d)-this.pointX,f=y(d)-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(y(d)-this.startY):Math.abs(x(d)-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=x(d),this.pointY=y(d),this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;w(a),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.E.trigger("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(y(b)-this.startY):Math.abs(x(b)-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1,b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,b=b!==this.options.numberOfPages||this.options.loop?b:void 0):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1,b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,b=0!==b||this.options.loop?b:void 0),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[j]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(a){this.E.trigger("flip",{triggeredByGoto:!!a});for(var b=0;3>b;b++)this.masterPages[b].className=this.masterPages[b].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[b].dataset.pageIndex=this.masterPages[b].dataset.upcomingPageIndex}},A}(window,document); \ No newline at end of file +var SwipeView=function(a,b){function c(a,b){var c;for(c=a.length-1;c>-1&&a[c]!==b;--c);return c}function d(a){return""===g?a:(a=a.charAt(0).toUpperCase()+a.substr(1),g+a)}var e=function(){};e.prototype={bind:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},unbind:function(a,b){this._events=this._events||{},a in this._events!=!1&&this._events[a].splice(c(this._events[a],b),1)},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;bc;c++)if(a=b[c]+"ransform",a in f)return b[c].substr(0,b[c].length-1);return!1}(),h=g?"-"+g.toLowerCase()+"-":"",i=d("transform"),j=d("transitionDuration"),k=d("perspective")in f,l="ontouchstart"in a,m=!!g,n=(d("transition")in f,k?" translateZ(0)":""),o="onorientationchange"in a?"orientationchange":"resize",p=l?"touchstart":"mousedown",q=l?"touchmove":"mousemove",r=l?"touchend":"mouseup",s=l?"touchcancel":"mouseup",t=function(){if(g===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[g]}(),u=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&a.attachEvent("on"+b,c)},v=function(a,b,c){"removeEventListener"in a?a.removeEventListener(b,c):"detachEvent"in a&&a.detachEvent("on"+b,c)},w=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},x=function(a){return"pageX"in a?a.pageX:a.clientX+b.body.scrollLeft+b.documentElement.scrollLeft},y=function(a){return"pageY"in a?a.pageY:a.clientY+b.body.scrollTop+b.documentElement.scrollTop},z=0,A=function(c,d){var f,i,j,k;this.wrapper="string"==typeof c?b.querySelector(c):c,this.id=this.wrapper.id||"sw-id"+ ++z,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(f in d)this.options[f]=d[f];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.E=new e,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],i=b.createElement("div"),i.className="swipeview-slider",i.style.cssText="position:relative;top:0;height:100%;width:100%;"+h+"transition-duration:0;"+h+"transform:translateZ(0);"+h+"transition-timing-function:ease-out",this.wrapper.appendChild(i),this.slider=i,this.refreshSize(),f=-1;2>f;f++)i=b.createElement("div"),i.style.cssText=h+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*f+"%",i.dataset||(i.dataset={}),k=-1==f?this.options.numberOfPages-1:f,i.dataset.pageIndex=k,i.dataset.upcomingPageIndex=k,this.options.loop||-1!=f||(i.style.visibility="hidden"),this.slider.appendChild(i),this.masterPages.push(i);j=this.masterPages[1].className,this.masterPages[1].className=j?j+" swipeview-active":"swipeview-active";var m=this;this.handleEventF=function(a){m.handleEvent(a)},u(a,o,this.handleEventF,!1),u(this.wrapper,p,this.handleEventF,!1),u(this.wrapper,q,this.handleEventF,!1),u(this.wrapper,r,this.handleEventF,!1),u(this.slider,t,this.handleEventF,!1),"O"==g&&u(this.slider,t.toLowerCase(),this.handleEventF,!1),l||u(this.wrapper,"mouseout",this.handleEventF,!1)};return A.prototype={reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.E.bind("flip",a),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.E.bind("moveout",a),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.E.bind("movein",a),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.E.bind("touchstart",a),this.customEvents.push(["touchstart",a])},unbind:function(){for(;this.customEvents.length;)this.E.unbind(this.customEvents[0][0],this.customEvents[0][1]),this.customEvents.shift()},destroy:function(){this.unbind(),v(a,o,this.handleEventF),v(this.wrapper,p,this.handleEventF),v(this.wrapper,q,this.handleEventF),v(this.wrapper,r,this.handleEventF),v(this.slider,t,this.handleEventF),l||v(this.wrapper,"mouseout",this.handleEventF)},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[j]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active";var c=function(a){return 0===a?[2,0,1]:1===a?[0,1,2]:[1,2,0]}(this.currentMasterPage);this.masterPages[c[0]].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[c[1]].style[this.cssPosition]=100*this.page+"%",this.masterPages[c[2]].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[c[0]].dataset.upcomingPageIndex=0===this.page?this.options.loop?this.options.numberOfPages-1:void 0:this.page-1,this.masterPages[c[1]].dataset.upcomingPageIndex=this.page,this.masterPages[c[2]].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?this.options.loop?0:void 0:this.page+1,this.options.loop||(this.masterPages[c[0]].style.visibility=0===this.page?"hidden":"",this.masterPages[c[1]].style.visibility="",this.masterPages[c[2]].style.visibility=this.page===this.options.numberOfPages-1?"hidden":""),this.__flip(!0)},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case p:this.__start(a);break;case q:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=x(d)-this.pointX,f=y(d)-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(y(d)-this.startY):Math.abs(x(d)-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=x(d),this.pointY=y(d),this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;w(a),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.E.trigger("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(y(b)-this.startY):Math.abs(x(b)-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1,b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,b=b!==this.options.numberOfPages||this.options.loop?b:void 0):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1,b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,b=0!==b||this.options.loop?b:void 0),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[j]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(a){this.E.trigger("flip",{triggeredByGoto:!!a});for(var b=0;3>b;b++)this.masterPages[b].className=this.masterPages[b].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[b].dataset.pageIndex=this.masterPages[b].dataset.upcomingPageIndex}},A}(window,document); \ No newline at end of file diff --git a/src/swipeview.js b/src/swipeview.js index 28cb43e..661f399 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -219,6 +219,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. div.dataset.pageIndex = pageIndex; div.dataset.upcomingPageIndex = pageIndex; + if (!this.options.loop && i == -1) { + div.style.visibility = 'hidden'; + } + this.slider.appendChild(div); this.masterPages.push(div); } @@ -352,6 +356,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. this.masterPages[ indices[2] ].dataset.upcomingPageIndex = this.page == this.options.numberOfPages-1 ? (this.options.loop ? 0 : undefined ): this.page + 1; + if (!this.options.loop) { + this.masterPages[ indices[0] ].style.visibility = this.page === 0 ? "hidden" : ""; + this.masterPages[ indices[1] ].style.visibility = ""; + this.masterPages[ indices[2] ].style.visibility = this.page === this.options.numberOfPages-1 ? "hidden" : ""; + } + this.__flip( true ); }, From 43c85e8119975cf235ac36adc03bd1c00ab2feee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Thu, 28 Nov 2013 16:37:38 +0100 Subject: [PATCH 60/61] Add bind() and unbind() for DOM events - the SwipeView instanciation does not auto-bind anymore - Add bind() and unbind() - the old unbind() has been renamed to offAll() --- README.md | 7 ++++ demo/ereader/index.html | 3 +- demo/gallery/index.html | 1 + demo/gallery2/index.html | 1 + demo/gallery3/infinitegraphset.js | 1 + demo/gallery4/index.html | 1 + demo/gallery5/index.html | 1 + demo/gallery5/infinitegraphset.js | 1 + demo/gallery6/index.html | 1 + demo/gallery6/infinitegraphset.js | 1 + demo/gallery7/app.js | 1 + demo/gallery7/infinitegraphset.js | 1 + demo/gallery8/app.js | 1 + demo/gallery8/infinitegraphset.js | 1 + demo/gallery9/app.js | 1 + demo/gallery9/infinitegraphset.js | 1 + demo/inline/index.html | 3 +- dist/swipeview-1.3.0.min.js | 2 ++ package.json | 2 +- src/swipeview.js | 54 ++++++++++++++++++------------- 20 files changed, 59 insertions(+), 26 deletions(-) create mode 100644 dist/swipeview-1.3.0.min.js diff --git a/README.md b/README.md index 94deb76..0b0c307 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,10 @@ +SwipeView v1.3.0 - 2013-09-28 +============================= + +- the SwipeView instanciation does not auto-bind anymore +- Add bind() and unbind() +- the old unbind() has been renamed to offAll() + SwipeView v1.0.5 - 2013-07-04 ============================= diff --git a/demo/ereader/index.html b/demo/ereader/index.html index d6dec0d..2351857 100644 --- a/demo/ereader/index.html +++ b/demo/ereader/index.html @@ -21,6 +21,7 @@ req = new XMLHttpRequest(); ereader = new SwipeView('#wrapper', { hastyPageFlip:true }); + ereader.bind(); // Ajax request req.open('GET', 'flowers.txt', true); @@ -154,4 +155,4 @@
- \ No newline at end of file + diff --git a/demo/gallery/index.html b/demo/gallery/index.html index e017211..bac9e0d 100644 --- a/demo/gallery/index.html +++ b/demo/gallery/index.html @@ -71,6 +71,7 @@ ]; gallery = new SwipeView('#wrapper', { numberOfPages: slides.length }); +gallery.bind(); // Load initial data for (i=0; i<3; i++) { diff --git a/demo/gallery2/index.html b/demo/gallery2/index.html index 360199d..7beef62 100644 --- a/demo/gallery2/index.html +++ b/demo/gallery2/index.html @@ -48,6 +48,7 @@ hastyPageFlip:true, numberOfPages: dataO.length }), i, page; + gallery.bind(); function genImgs(container, page, d) { var img, div; diff --git a/demo/gallery3/infinitegraphset.js b/demo/gallery3/infinitegraphset.js index 0785645..7486003 100644 --- a/demo/gallery3/infinitegraphset.js +++ b/demo/gallery3/infinitegraphset.js @@ -8,6 +8,7 @@ hastyPageFlip:true, numberOfPages: dataO.length }), i, page; + gallery.bind(); function genImgs(container, page, d) { var img, div; diff --git a/demo/gallery4/index.html b/demo/gallery4/index.html index 9521d5d..983fa4d 100644 --- a/demo/gallery4/index.html +++ b/demo/gallery4/index.html @@ -53,6 +53,7 @@ ]; gallery = new SwipeView('#wrapper', { numberOfPages: slides.length, hastyPageFlip:true, vertical:true}); +gallery.bind(); // Load initial data for (i=0; i<3; i++) { diff --git a/demo/gallery5/index.html b/demo/gallery5/index.html index 9a1cb2d..7ed3a1e 100644 --- a/demo/gallery5/index.html +++ b/demo/gallery5/index.html @@ -47,6 +47,7 @@ page; gallery = new SwipeView('#wrapper', { numberOfPages: 100, hastyPageFlip:true, vertical:true}); +gallery.bind(); // Load initial data for (i=0; i<3; i++) { diff --git a/demo/gallery5/infinitegraphset.js b/demo/gallery5/infinitegraphset.js index 8b85a07..b40c07f 100644 --- a/demo/gallery5/infinitegraphset.js +++ b/demo/gallery5/infinitegraphset.js @@ -8,6 +8,7 @@ hastyPageFlip:true, numberOfPages: dataO.length }), i, page; + gallery.bind(); function genImgs(container, page, d) { var img, div; diff --git a/demo/gallery6/index.html b/demo/gallery6/index.html index 287c2d1..c701674 100644 --- a/demo/gallery6/index.html +++ b/demo/gallery6/index.html @@ -70,6 +70,7 @@ page; gallery = new SwipeView('#wrapper', { numberOfPages: 100, hastyPageFlip:true, vertical:true}); +gallery.bind(); // Load initial data for (i=0; i<3; i++) { diff --git a/demo/gallery6/infinitegraphset.js b/demo/gallery6/infinitegraphset.js index 42bcebd..4b144e4 100644 --- a/demo/gallery6/infinitegraphset.js +++ b/demo/gallery6/infinitegraphset.js @@ -8,6 +8,7 @@ hastyPageFlip:true, numberOfPages: dataO.length }), i, page, df = dataO; + gallery.bind(); function genImgs(container, page, d) { var img, div; diff --git a/demo/gallery7/app.js b/demo/gallery7/app.js index c97bafc..f9c237e 100644 --- a/demo/gallery7/app.js +++ b/demo/gallery7/app.js @@ -27,6 +27,7 @@ gallery = new SwipeView('#wrapper', { vertical: true, hastyPageFlip:true }); +gallery.bind(); function init(domElt, myGallery, id, idx) { domElt = document.createElement('div'); diff --git a/demo/gallery7/infinitegraphset.js b/demo/gallery7/infinitegraphset.js index 42bcebd..4b144e4 100644 --- a/demo/gallery7/infinitegraphset.js +++ b/demo/gallery7/infinitegraphset.js @@ -8,6 +8,7 @@ hastyPageFlip:true, numberOfPages: dataO.length }), i, page, df = dataO; + gallery.bind(); function genImgs(container, page, d) { var img, div; diff --git a/demo/gallery8/app.js b/demo/gallery8/app.js index c97bafc..f9c237e 100644 --- a/demo/gallery8/app.js +++ b/demo/gallery8/app.js @@ -27,6 +27,7 @@ gallery = new SwipeView('#wrapper', { vertical: true, hastyPageFlip:true }); +gallery.bind(); function init(domElt, myGallery, id, idx) { domElt = document.createElement('div'); diff --git a/demo/gallery8/infinitegraphset.js b/demo/gallery8/infinitegraphset.js index fcb2108..a630586 100644 --- a/demo/gallery8/infinitegraphset.js +++ b/demo/gallery8/infinitegraphset.js @@ -13,6 +13,7 @@ }, locked = false, x = 0, y = 0, id; + gallery.bind(); function onTouchStart(evt) { console.log('touchstart'); diff --git a/demo/gallery9/app.js b/demo/gallery9/app.js index eb85be5..b7f0a38 100644 --- a/demo/gallery9/app.js +++ b/demo/gallery9/app.js @@ -27,6 +27,7 @@ gallery = new SwipeView('#wrapper', { vertical: true, hastyPageFlip:true }); +gallery.bind(); function init(domElt, myGallery, id, idx) { domElt = document.createElement('div'); diff --git a/demo/gallery9/infinitegraphset.js b/demo/gallery9/infinitegraphset.js index 31071c2..1501372 100644 --- a/demo/gallery9/infinitegraphset.js +++ b/demo/gallery9/infinitegraphset.js @@ -17,6 +17,7 @@ locked = false, x = 0, y = 0, id; + gallery.bind(); // FIXME /*function onTouchStart(evt) { console.log('touchstart'); diff --git a/demo/inline/index.html b/demo/inline/index.html index 4b6f0e6..3caae11 100644 --- a/demo/inline/index.html +++ b/demo/inline/index.html @@ -45,6 +45,7 @@

Three Laws of Robotics

numberOfPages: slides.length, hastyPageFlip: true }); +carousel.bind(); // Load initial data for (i=0; i<3; i++) { @@ -73,4 +74,4 @@

Three Laws of Robotics

- \ No newline at end of file + diff --git a/dist/swipeview-1.3.0.min.js b/dist/swipeview-1.3.0.min.js new file mode 100644 index 0000000..bac9752 --- /dev/null +++ b/dist/swipeview-1.3.0.min.js @@ -0,0 +1,2 @@ +/*! swipeview 1.3.0 - Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli */ +var SwipeView=function(a,b){function c(a,b){var c;for(c=a.length-1;c>-1&&a[c]!==b;--c);return c}function d(a){return""===g?a:(a=a.charAt(0).toUpperCase()+a.substr(1),g+a)}var e=function(){};e.prototype={bind:function(a,b){this._events=this._events||{},this._events[a]=this._events[a]||[],this._events[a].push(b)},unbind:function(a,b){this._events=this._events||{},a in this._events!=!1&&this._events[a].splice(c(this._events[a],b),1)},trigger:function(a){if(this._events=this._events||{},a in this._events!=!1)for(var b=0;bc;c++)if(a=b[c]+"ransform",a in f)return b[c].substr(0,b[c].length-1);return!1}(),h=g?"-"+g.toLowerCase()+"-":"",i=d("transform"),j=d("transitionDuration"),k=d("perspective")in f,l="ontouchstart"in a,m=!!g,n=(d("transition")in f,k?" translateZ(0)":""),o="onorientationchange"in a?"orientationchange":"resize",p=l?"touchstart":"mousedown",q=l?"touchmove":"mousemove",r=l?"touchend":"mouseup",s=l?"touchcancel":"mouseup",t=function(){if(g===!1)return!1;var a={"":"transitionend",webkit:"webkitTransitionEnd",Moz:"transitionend",O:"oTransitionEnd",ms:"MSTransitionEnd"};return a[g]}(),u=function(a,b,c,d){"addEventListener"in a?a.addEventListener(b,c,d):"attachEvent"in a&&a.attachEvent("on"+b,c)},v=function(a,b,c){"removeEventListener"in a?a.removeEventListener(b,c):"detachEvent"in a&&a.detachEvent("on"+b,c)},w=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},x=function(a){return"pageX"in a?a.pageX:a.clientX+b.body.scrollLeft+b.documentElement.scrollLeft},y=function(a){return"pageY"in a?a.pageY:a.clientY+b.body.scrollTop+b.documentElement.scrollTop},z=0,A=function(a,c){var d,f,g,i;this.wrapper="string"==typeof a?b.querySelector(a):a,this.id=this.wrapper.id||"sw-id"+ ++z,this.options={text:null,numberOfPages:3,snapThreshold:null,hastyPageFlip:!1,vertical:!1,loop:!0,clientWidth:1024,clientHeight:145};for(d in c)this.options[d]=c[d];for(this.currentMasterPage=1,this.k=0,this.maxK=0,this.page=0,this.pageIndex=0,this.E=new e,this.customEvents=[],this.wrapperWidth=0,this.wrapperHeight=0,this.pageSize=0,this.initiated=!1,this.identifier=null,this.moved=!1,this.thresholdExceeded=!1,this.startX=0,this.startX=0,this.pointX=0,this.pointY=0,this.stepsX=0,this.stepsY=0,this.direction=0,this.directionLocked=!1,this.cssPosition=this.options.vertical?"top":"left",this.wrapper.style.overflow="hidden",this.wrapper.style.position="relative",this.masterPages=[],f=b.createElement("div"),f.className="swipeview-slider",f.style.cssText="position:relative;top:0;height:100%;width:100%;"+h+"transition-duration:0;"+h+"transform:translateZ(0);"+h+"transition-timing-function:ease-out",this.wrapper.appendChild(f),this.slider=f,this.refreshSize(),d=-1;2>d;d++)f=b.createElement("div"),f.style.cssText=h+"transform:translateZ(0);position:absolute;top:0;height:100%;width:100%;"+this.cssPosition+":"+100*d+"%",f.dataset||(f.dataset={}),i=-1==d?this.options.numberOfPages-1:d,f.dataset.pageIndex=i,f.dataset.upcomingPageIndex=i,this.options.loop||-1!=d||(f.style.visibility="hidden"),this.slider.appendChild(f),this.masterPages.push(f);g=this.masterPages[1].className,this.masterPages[1].className=g?g+" swipeview-active":"swipeview-active";var j=this;this.handleEventF=function(a){j.handleEvent(a)}};return A.prototype={bind:function(){return u(a,o,this.handleEventF,!1),u(this.wrapper,p,this.handleEventF,!1),u(this.wrapper,q,this.handleEventF,!1),u(this.wrapper,r,this.handleEventF,!1),u(this.slider,t,this.handleEventF,!1),"O"==g&&u(this.slider,t.toLowerCase(),this.handleEventF,!1),l||u(this.wrapper,"mouseout",this.handleEventF,!1),this},unbind:function(){return v(a,o,this.handleEventF),v(this.wrapper,p,this.handleEventF),v(this.wrapper,q,this.handleEventF),v(this.wrapper,r,this.handleEventF),v(this.slider,t,this.handleEventF),l||v(this.wrapper,"mouseout",this.handleEventF),this},offAll:function(){for(;this.customEvents.length;)this.E.unbind(this.customEvents[0][0],this.customEvents[0][1]),this.customEvents.shift()},reset:function(a){this.goToPage(0),this.updatePageCount(a),this.refreshSize()},onFlip:function(a){this.E.bind("flip",a),this.customEvents.push(["flip",a])},onMoveOut:function(a){this.E.bind("moveout",a),this.customEvents.push(["moveout",a])},onMoveIn:function(a){this.E.bind("movein",a),this.customEvents.push(["movein",a])},onTouchStart:function(a){this.E.bind("touchstart",a),this.customEvents.push(["touchstart",a])},destroy:function(){this.unbind(),this.offAll()},refreshSize:function(){this.wrapperWidth=0===this.wrapper.clientWidth?this.options.clientWidth:this.wrapper.clientWidth,this.wrapperHeight=0===this.wrapper.clientHeight?this.options.clientHeight:this.wrapper.clientHeight,this.wrapperSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.pageSize=this.options.vertical?this.wrapperHeight:this.wrapperWidth,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize,this.snapThreshold=null===this.options.snapThreshold?Math.round(.15*this.pageSize):/%/.test(this.options.snapThreshold)?Math.round(this.pageSize*this.options.snapThreshold.replace("%","")/100):this.options.snapThreshold},updatePageCount:function(a){this.options.numberOfPages=a,this.maxK=-this.options.numberOfPages*this.pageSize+this.wrapperSize},goToPage:function(a){var b;for(this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className.replace(/(^|\s)swipeview-active(\s|$)/,""),b=0;3>b;b++)className=this.masterPages[b].className,/(^|\s)swipeview-loading(\s|$)/.test(className)||(this.masterPages[b].className=className?className+" swipeview-loading":"swipeview-loading");a=0>a?0:a>this.options.numberOfPages-1?this.options.numberOfPages-1:a,this.page=a,this.pageIndex=a,this.slider.style[j]="0s",this.__pos(-a*this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.masterPages[this.currentMasterPage].className=this.masterPages[this.currentMasterPage].className+" swipeview-active";var c=function(a){return 0===a?[2,0,1]:1===a?[0,1,2]:[1,2,0]}(this.currentMasterPage);this.masterPages[c[0]].style[this.cssPosition]=100*this.page-100+"%",this.masterPages[c[1]].style[this.cssPosition]=100*this.page+"%",this.masterPages[c[2]].style[this.cssPosition]=100*this.page+100+"%",this.masterPages[c[0]].dataset.upcomingPageIndex=0===this.page?this.options.loop?this.options.numberOfPages-1:void 0:this.page-1,this.masterPages[c[1]].dataset.upcomingPageIndex=this.page,this.masterPages[c[2]].dataset.upcomingPageIndex=this.page==this.options.numberOfPages-1?this.options.loop?0:void 0:this.page+1,this.options.loop||(this.masterPages[c[0]].style.visibility=0===this.page?"hidden":"",this.masterPages[c[1]].style.visibility="",this.masterPages[c[2]].style.visibility=this.page===this.options.numberOfPages-1?"hidden":""),this.__flip(!0)},next:function(){(this.options.loop||this.k!=this.maxK)&&(this.direction=-1,this.k-=1,this.__checkPosition())},prev:function(){(this.options.loop||0!==this.k)&&(this.direction=1,this.k+=1,this.__checkPosition())},handleEvent:function(a){switch(a.type){case p:this.__start(a);break;case q:this.__move(a);break;case"mouseout":if(this.initiated){for(var b=this.wrapper.getElementsByTagName("*"),c=0;cb;b++)a.changedTouches.item(b).identifier===this.identifier&&(d=a.changedTouches.item(b));if(!d)return}else d=a;var e=x(d)-this.pointX,f=y(d)-this.pointY,g=this.options.vertical?this.k+f:this.k+e,h=this.options.vertical?Math.abs(y(d)-this.startY):Math.abs(x(d)-this.startX);if(!(Math.abs(h)>=this.pageSize||(this.moved=!0,this.pointX=x(d),this.pointY=y(d),this.direction=this.options.vertical?f>0?1:0>f?-1:0:e>0?1:0>e?-1:0,this.stepsX+=Math.abs(e),this.stepsY+=Math.abs(f),this.stepsX<10&&this.stepsY<10))){if(!this.directionLocked&&(this.options.vertical?this.stepsX>this.stepsY:this.stepsY>this.stepsX))return this.initiated=!1,void 0;w(a),this.directionLocked=!0,!this.options.loop&&(g>0||g=this.snapThreshold?(this.thresholdExceeded=!0,this.E.trigger("moveout")):this.thresholdExceeded&&hc;c++)if(a.touches.item(c).identifier===this.identifier)return;for(c=0,d=a.changedTouches.length;d>c;c++)a.changedTouches.item(c).identifier===this.identifier&&(b=a.changedTouches.item(c));if(!b)return this.__pos(-this.page*this.pageSize),this.initiated=!1,void 0}else b=a;var e=this.options.vertical?Math.abs(y(b)-this.startY):Math.abs(x(b)-this.startX);if(this.initiated=!1,this.moved)return!this.options.loop&&(this.k>0||this.k0?(this.page=-Math.ceil(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=0===this.pageIndex?this.options.numberOfPages-1:this.pageIndex-1,a=this.currentMasterPage-1,a=0>a?2:a,this.masterPages[a].style[this.cssPosition]=100*this.page-100+"%",b=this.page-1,b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,b=b!==this.options.numberOfPages||this.options.loop?b:void 0):(this.page=-Math.floor(this.k/this.pageSize),this.currentMasterPage=this.page+1-3*Math.floor((this.page+1)/3),this.pageIndex=this.pageIndex==this.options.numberOfPages-1?0:this.pageIndex+1,a=this.currentMasterPage+1,a=a>2?0:a,this.masterPages[a].style[this.cssPosition]=100*this.page+100+"%",b=this.page+1,b-=Math.floor(b/this.options.numberOfPages)*this.options.numberOfPages,b=0!==b||this.options.loop?b:void 0),c=this.masterPages[this.currentMasterPage].className,/(^|\s)swipeview-active(\s|$)/.test(c)||(this.masterPages[this.currentMasterPage].className=c?c+" swipeview-active":"swipeview-active"),c=this.masterPages[a].className,/(^|\s)swipeview-loading(\s|$)/.test(c)||(this.masterPages[a].className=c?c+" swipeview-loading":"swipeview-loading"),this.masterPages[a].dataset.upcomingPageIndex=b,newC=-this.page*this.pageSize,this.slider.style[j]=Math.floor(500*Math.abs(this.k-newC)/this.pageSize)+"ms",this.options.loop||(this.masterPages[a].style.visibility=0===newC||newC==this.maxK?"hidden":""),this.k==newC?this.__flip():(this.__pos(newC),this.options.hastyPageFlip&&this.__flip())},__flip:function(a){this.E.trigger("flip",{triggeredByGoto:!!a});for(var b=0;3>b;b++)this.masterPages[b].className=this.masterPages[b].className.replace(/(^|\s)swipeview-loading(\s|$)/,""),this.masterPages[b].dataset.pageIndex=this.masterPages[b].dataset.upcomingPageIndex}},A}(window,document); \ No newline at end of file diff --git a/package.json b/package.json index c4a963c..b3f09d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "swipeview", - "version": "1.2.3", + "version": "1.3.0", "description": "Virtually infinite loop-able horizontal carousel - a fork of the original SwipeView from Matteo Spinelli", "keywords": [ "swipe", diff --git a/src/swipeview.js b/src/swipeview.js index 661f399..f9c9c02 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -236,6 +236,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. self.handleEvent(e); }; + }; + + SwipeView.prototype = { + bind: function () { on(window, resizeEvent, this.handleEventF, false); on(this.wrapper, startEvent, this.handleEventF, false); on(this.wrapper, moveEvent, this.handleEventF, false); @@ -247,9 +251,33 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. if (!hasTouch) { on(this.wrapper, 'mouseout', this.handleEventF, false); } - }; + return this; + }, + + unbind : function(){ + // Remove the event listeners + off(window, resizeEvent, this.handleEventF); + off(this.wrapper, startEvent, this.handleEventF); + off(this.wrapper, moveEvent, this.handleEventF); + off(this.wrapper, endEvent, this.handleEventF); + off(this.slider, transitionEndEvent, this.handleEventF); + + if (!hasTouch) { + off(this.wrapper, 'mouseout', this.handleEventF); + } + return this; + }, + + /** + * Removes all external events callbacks + */ + offAll: function () { + while ( this.customEvents.length ) { + this.E.unbind(this.customEvents[0][0], this.customEvents[0][1]); + this.customEvents.shift(); + } + }, - SwipeView.prototype = { reset : function (pageCount) { this.goToPage(0); this.updatePageCount(pageCount); @@ -276,29 +304,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. this.customEvents.push(['touchstart', fn]); }, - /** - * Removes all external events callbacks - */ - unbind : function(){ - while ( this.customEvents.length ) { - this.E.unbind(this.customEvents[0][0], this.customEvents[0][1]); - this.customEvents.shift(); - } - }, - destroy: function () { this.unbind(); - - // Remove the event listeners - off(window, resizeEvent, this.handleEventF); - off(this.wrapper, startEvent, this.handleEventF); - off(this.wrapper, moveEvent, this.handleEventF); - off(this.wrapper, endEvent, this.handleEventF); - off(this.slider, transitionEndEvent, this.handleEventF); - - if (!hasTouch) { - off(this.wrapper, 'mouseout', this.handleEventF); - } + this.offAll(); }, refreshSize: function () { From 76a8c9bd454ba236977d62d5e3a715354eace83b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Renaudeau?= Date: Thu, 28 Nov 2013 17:30:10 +0100 Subject: [PATCH 61/61] throw error if bind / unbind is called when already bound/unbound --- src/swipeview.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/swipeview.js b/src/swipeview.js index f9c9c02..65fb605 100644 --- a/src/swipeview.js +++ b/src/swipeview.js @@ -240,6 +240,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. SwipeView.prototype = { bind: function () { + if (this._bound) throw new Error("SwipeView was already bounded"); + this._bound = true; on(window, resizeEvent, this.handleEventF, false); on(this.wrapper, startEvent, this.handleEventF, false); on(this.wrapper, moveEvent, this.handleEventF, false); @@ -255,6 +257,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. }, unbind : function(){ + if (!this._bound) throw new Error("SwipeView was not bounded"); + this._bound = false; // Remove the event listeners off(window, resizeEvent, this.handleEventF); off(this.wrapper, startEvent, this.handleEventF);

``}TJb`q-mXGh3oX$A{RN=Waelj8JwdT%s`W|bff4+|7;Q_Qfb z@%_RRc=O5)*7FdGwmav|F&*aw-bCXaqy%$|IUl zkz8}B>SPWr5@k5_y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L4WX5^QmAE6 z-2i97&)m_l^Q?N_3kRA(BS($^c60-$&4o&`tt?~GZRL;4k`y_}K4J{xzglyzX}r2; zhCD~0K?ccn8+178WLmDel&2NXXSKL8pTm}udveMIfC5h>El$iAkWP_2VYjSu7C9x= zm#^K0BGNKi{^BQ-AE+>mvZUu72m4U3CI0|~WAZLhHx|R>=jZmT;JRG=OtbT@^qYny zQ}D8*IN)VmFzNoPj_0%H`e>I{u+0%85-td0Kb=O^#-DkmnC@{FNY5(V9)48xc)ACJ zVycJ~BvTl01?@9nO9W3p)cP;Lf%yUTc`9@~QXY=7ve>(yUBPIhvwx9&Us zhKy9W?|%z#E+FxU)sxBeVec^p}3 z78B}lA1Seg%SJ#f#YRTbPrtoCvg@HCNwsZGe=<`yn-bf!&Nj1@P$OsS$SNtyRntBO z>MFNaR*cw^;xf${{y5wHvsdxoZ2m`KW#@Hmtimcu=}cnQalWF%8b&d zA~Jr{{wr_JF}g-SZnUuQhNWp~I%hj({n+D^9lDX4H`;oa@k06y;}fx*q3OB*0QINl zCW1Uaf4zZ>u+B0Ve{)smqT0F9Etb;C>N}f%SLRScl1D>>nx3eF4PL;hR@)#_SFa+UaB;3#bekj?818e@iB*oF@UHv*?Fxg; zPEh?i_xT#m-)igpC-JLKTW=LddYIX%+ebJ(yu|&J{{Z9$uY~Eph8L=j127B}>|orE zKD2e{Rh`C_7N6ov*f0{^rD-B!LV%Kb)B56^_MVS?KauSIAwsd7+dHrY1{C?oMt|{D z^MCy(ul`-@a3EI9&~hn&9zYL0Dae~x6OPnj1tfriDZ?NN4s*-~^rVu1#&`1}@wF#*2`O-aq|Jk~4l$QVi literal 0 HcmV?d00001 diff --git a/demo/gallery4/index.html b/demo/gallery4/index.html new file mode 100644 index 0000000..77526be --- /dev/null +++ b/demo/gallery4/index.html @@ -0,0 +1,126 @@ + + + + + + + + SwipeView + + + + + +