pre-gh pages creation

This commit is contained in:
John Bintz 2012-03-23 17:33:58 -04:00
parent a64763cab1
commit 775bc5c77e
2 changed files with 23 additions and 7 deletions

View File

@ -23,7 +23,8 @@ Attentive.Presentation = (function() {
this.advanceTo = __bind(this.advanceTo, this);
this.advance = __bind(this.advance, this);
this.handleKeyDown = __bind(this.handleKeyDown, this);
this.handleClick = __bind(this.handleClick, this);
this.handleMouseUp = __bind(this.handleMouseUp, this);
this.handleMouseDown = __bind(this.handleMouseDown, this);
this.handlePopState = __bind(this.handlePopState, this);
this.length = this.allSlides().length;
this.priorSlide = null;
@ -50,8 +51,9 @@ Attentive.Presentation = (function() {
var imageWait,
_this = this;
this.timer.render();
document.addEventListener('click', this.handleClick, false);
document.addEventListener('keydown', this.handleKeyDown, false);
document.addEventListener('mousedown', this.handleMouseDown, false);
document.addEventListener('mouseup', this.handleMouseUp, false);
window.addEventListener('resize', _.throttle(this.calculate, 500), false);
imageWait = null;
imageWait = function() {
@ -83,8 +85,22 @@ Attentive.Presentation = (function() {
return this.advanceTo(this.slideFromLocation());
};
Presentation.prototype.handleClick = function(e) {
if (e.target.tagName !== 'A') return this.advance();
Presentation.prototype.handleMouseDown = function(e) {
return this.startSwipeX = e.x;
};
Presentation.prototype.handleMouseUp = function(e) {
var distance;
distance = this.startSwipeX - e.x;
if (Math.abs(distance) > 10) {
if (distance < 0) {
return this.advance(-1);
} else {
return this.advance(1);
}
} else {
if (e.target.tagName !== 'A') return this.advance();
}
};
Presentation.prototype.handleKeyDown = function(e) {

View File

@ -5142,17 +5142,17 @@
<tr>
<td>rack.errors</td>
<td class="code"><div>#&lt;Object:0x00000101971920&gt;</div></td>
<td class="code"><div>#&lt;Object:0x000001009d7f78&gt;</div></td>
</tr>
<tr>
<td>rack.input</td>
<td class="code"><div>#&lt;StringIO:0x00000100b3b568&gt;</div></td>
<td class="code"><div>#&lt;StringIO:0x00000100bb2028&gt;</div></td>
</tr>
<tr>
<td>rack.logger</td>
<td class="code"><div>#&lt;Logger:0x0000010099a100 @progname=nil, @level=1, @default_formatter=#&lt;Logger::Formatter:0x0000010099a0d8 @datetime_format=nil&gt;, @formatter=nil, @logdev=#&lt;Logger::LogDevice:0x00000100999f20 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#&lt;StringIO:0x00000100b3b658&gt;, @mutex=#&lt;Logger::LogDevice::LogDeviceMutex:0x00000100999e30 @mon_owner=nil, @mon_count=0, @mon_mutex=#&lt;Mutex:0x00000100999c28&gt;&gt;&gt;&gt;</div></td>
<td class="code"><div>#&lt;Logger:0x0000010116e7f0 @progname=nil, @level=1, @default_formatter=#&lt;Logger::Formatter:0x0000010116e7c8 @datetime_format=nil&gt;, @formatter=nil, @logdev=#&lt;Logger::LogDevice:0x0000010116e688 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#&lt;StringIO:0x00000100bb20f0&gt;, @mutex=#&lt;Logger::LogDevice::LogDeviceMutex:0x0000010116e520 @mon_owner=nil, @mon_count=0, @mon_mutex=#&lt;Mutex:0x0000010116e368&gt;&gt;&gt;&gt;</div></td>
</tr>
<tr>