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
module.exports = leftpad; | |
function leftpad( s, len, c ) { | |
s = s == null ? "" : String( s ); | |
return Array( len - s.length + 1 ).join( c || c === 0 ? c : " " ) + s; | |
} |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> | |
<html> | |
<head> | |
<meta http-equiv="X-UA-Compatible" content="chrome=1"/> | |
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> | |
<title>Raphael Yanug</title> | |
<style type="text/css"> | |
body { | |
media: "screen"; |
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
// Show and Fix Raphael.js vertical text alignment issues | |
// Paste the code bellow in Raphael Playground at http://raphaeljs.com/playground.html | |
// Set font size, anchor and font parameters here: | |
size=48, anchor='end', font='Verdana' | |
// Set target size, set it to 0 to disable font-size animation | |
target_size = 12 | |
duration = 8 // animation duration in seconds |