Skip to content

Instantly share code, notes, and snippets.

View derek's full-sized avatar

Derek Gathright derek

View GitHub Profile
@derek
derek / gist:3709043
Created September 12, 2012 18:51
3.7.0pr2 ScrollView Release Notes

3.7.0pr2 ScrollView Release Notes

In addition to the new features detailed in the 3.7.0PR1 blog post (support for dual-axis, forced-axis, and RTL), the PR2 release of ScrollView also introduces a refactored _flickFrame method (ca118aa). This is notable because that method is the internal JS timer scrollview-base uses for flick animations. Previously it did up to 4 get() attribute lookups per frame, but in PR2 that has been reduced to no lookups. Because less lookups = more speed, on faster browsers (iOS5, modern desktop browsers) where those ATTR lookups were a bottleneck, you should see an even smoother animation. If you want to help test it out, compare the flick behavior in PR2 to previous versions, and let us know if you notice any quirks.

Also updated in PR2, for anyone using multiple ScrollView instances on a page, you now have the ability to a

@derek
derek / gist:3522590
Created August 30, 2012 05:09
3.7.0pr1 ScrollView Release Notes

3.7.0pr1 ScrollView Release Notes

Y.ScrollView overview

  • Added: axis configuration property to force the axis. If unspecified, ScrollView will attempt to detect which direction to scroll (based off overflow content). ScrollView also now supports scrolling on both axes (not at the same time). axis accepts 'x', 'y', or 'xy', and maps to the scrollview.axis property (an object) after initialization. For example:

     var scrollview = new Y.ScrollView({
     	srcNode: '#myScrollview',
    

width: 400,

@derek
derek / README.md
Created August 17, 2012 02:06
Loading YUI from the CDN into a Web Worker

Scenario

I want to use YUI inside of a WebWorker thread. Flickr recently wrote a post on this very topic, Web workers and YUI.

Problem

But I want to use YUI's CDN, which WebWorkers prevent because it enforces a same-origin policy with importScripts()

Solution

@derek
derek / index.html
Created July 19, 2012 08:00
App example - Github Contributors
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Example: GitHub Contributors - YUI Library</title>
<meta name="viewport" content="width=960" id="meta-viewport">
<script>
if (screen.width < 768) {
document.getElementById('meta-viewport').setAttribute('content', 'width=768');
@derek
derek / .gitignore
Created July 19, 2012 00:22
Milo utilities
assets/serverRoutes.json
config.json
@derek
derek / index.html
Created July 17, 2012 18:33
YUI starter - simple
<!DOCTYPE html>
<html>
<meta charset='utf-8'>
<head>
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.5.1/build/cssreset/cssreset-min.css">
<style>
/* Styles can go here, in the 'my-css' module, or both! */
</style>
@derek
derek / dabblet.css
Created July 9, 2012 05:21 — forked from anonymous/dabblet.html
CSS goes here
/* CSS goes here */
@derek
derek / dabblet.html
Created March 28, 2012 21:53
Untitled
<link rel="stylesheet" href="http://yui.yahooapis.com/combo?3.5.0pr4/build/cssbutton/cssbutton.css">
<button class='yui3-button'>Remove All Items</button>
@derek
derek / index.html
Created March 7, 2012 02:52 — forked from ggoodman/app.js
Plunker YUI template
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<!-- The YUI CSS Reset. Optional -->
<!-- <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/3.4.1/build/cssreset/cssreset-min.css"> -->
<link rel="stylesheet" href="style.css">
<!-- Load the YUI seed file. http://yuim.in/ always loads the latest version -->
@derek
derek / dabblet.css
Created March 2, 2012 22:30
cssbutton.css
/* cssbutton.css */
.yui3-button {
-moz-transition: -moz-box-shadow 0.1s linear 0s;
-moz-user-select: none;
background-color: #E6E6E6;
background-image: -moz-linear-gradient(center top , rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.15) 40%, transparent);
border: medium none;
border-radius: 4px 4px 4px 4px;
box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) inset, 0 2px 0 rgba(255, 255, 255, 0.3) inset, 0 1px 2px rgba(0, 0, 0, 0.15);
color: rgba(0, 0, 0, 0.8);