This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modules | |
var express = require('express') | |
, everyauth = require('everyauth') | |
, connect = require('connect'); | |
var app = module.exports = express.createServer(); | |
everyauth.debug = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var context = cubism.context() | |
.step(1e4) | |
.size(1440) | |
.shiftDiff(200); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var context = cubism.context() | |
.step(1e4) | |
.size(1440); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case 37: // left | |
if (d3.event.shiftKey && focus > shiftDiff) context.focus(focus -= shiftDiff); | |
else { | |
if (focus == null) focus = size - 1; | |
if (focus > 0) context.focus(--focus); | |
} | |
break; | |
case 39: // right | |
if (d3.event.shiftKey && size - focus > shiftDiff) context.focus(focus += shiftDiff); | |
else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var context = cubism.context() | |
.step(1e4) | |
.size(1440) | |
.shiftDiff(100); // shiftDiff is now 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
context.shiftDiff = function(diff) { | |
if (!arguments.length) shiftDiff = 20 // default | |
else shiftDiff = diff; | |
return update(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// previous js vars, like step, size, clientDelay, etc... | |
shiftDiff = 20, | |
// other js vars, like event, scale, timeout, etc... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case 39: // right | |
if (d3.event.shiftKey && size - focus > 20) context.focus(focus += 20); | |
else { | |
if (focus == null) focus = size - 2; | |
if (focus < size - 1) context.focus(focus++); | |
} | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case 37: // left | |
if (d3.event.shiftKey && focus > 20) context.focus(focus -= 20); | |
else { | |
if (focus == null) focus = size - 1; | |
if (focus > 0) context.focus(--focus); | |
} | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case 37: // left | |
if (focus == null) focus = size - 1; | |
if (focus > 0) context.focus(--focus); | |
break; |