Created
January 27, 2014 04:31
-
-
Save veev/8643315 to your computer and use it in GitHub Desktop.
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
function buildRippleNode(index){ | |
var ripple, title, bottomLetter, topLetter; | |
var offset = 180; | |
var pos = (offset * index) + offset; //radius of Home Button | |
var titleOffset = config.titleOffset; | |
var titleHeight = config.titleHeight; | |
ripple = paper.path("M0,0 L"+pos+",0 A"+pos+","+pos+" 0 0,1 0,"+pos+"z") | |
ripple.attr({'fill': COLORS[index], 'fill': URL[index], 'stroke': COLORS[index]}) | |
.data('id', RIPPLE_ID[index]); | |
title = paper.text(pos - titleOffset, titleHeight, LABELS[index]).attr({'font-size': '24px', 'font-style': 'italic', 'opacity': 1}); | |
topLetter = paper.text(pos - titleOffset, titleHeight, LETTERS[index]).attr({'font-size': '28px', 'font-style': 'italic', 'opacity': 0}); | |
bottomLetter = paper.text((w-155), (h - titleHeight), LETTERS[index]).attr({'font-size': '28px', 'font-style': 'italic', 'opacity': 0}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
function buildRippleNode(index){
var button = new Object();
var ripple, title, bottomLetter, topLetter;
var offset = 180;
var pos = (offset * index) + offset; //radius of Home Button
var titleOffset = config.titleOffset;
var titleHeight = config.titleHeight;
ripple = paper.path("M0,0 L"+pos+",0 A"+pos+","+pos+" 0 0,1 0,"+pos+"z")
ripple.attr({'fill': COLORS[index], 'fill': URL[index], 'stroke': COLORS[index]})
.data('id', RIPPLE_ID[index]);
title = paper.text(pos - titleOffset, titleHeight, LABELS[index]).attr({'font-size': '24px', 'font-style': 'italic', 'opacity': 1});
topLetter = paper.text(pos - titleOffset, titleHeight, LETTERS[index]).attr({'font-size': '28px', 'font-style': 'italic', 'opacity': 0});
bottomLetter = paper.text((w-155), (h - titleHeight), LETTERS[index]).attr({'font-size': '28px', 'font-style': 'italic', 'opacity': 0});
var button = new Object(ripple, title, topLetter, bottomLetter);
}