Commit 2cbd6a62 authored by Patrick Barroca's avatar Patrick Barroca 🎮

end-of-line normalization

parent 17b2544e
/* @Booklet
----------------------------------------*/
.booklet {width:800px; height:600px; position:relative; /*background:#fff;*/ margin:0 auto 10px; overflow:visible !important;}
.booklet .b-page {left:0; top:0; position:absolute; overflow:hidden; padding:0;}
.booklet .b-pN {}
.booklet .b-p0 {}
.booklet .b-p1 {}
.booklet .b-p2 {}
.booklet .b-p3 {}
.booklet .b-p4 {}
.booklet .b-load {}
/* Page Wrappers */
.booklet .b-wrap {top:0; position:absolute;}
.booklet .b-wrap-left {background:#fff;}
.booklet .b-wrap-right {background:#efefef;}
.booklet .b-pN .b-wrap,
.booklet .b-p1 .b-wrap,
.booklet .b-p2 .b-wrap,
.booklet .b-p3 .b-wrap,
.booklet .b-p4 .b-wrap {left:0;}
.booklet .b-p0 .b-wrap {right:0;}
/* Custom Page Types */
.booklet .b-page-blank {padding:0; width:100%; height:100%;}
.booklet .b-page-cover {padding:0; width:100%; height:100%; background:#925C0E;}
.booklet .b-page-cover h3 {color:#fff; text-shadow:0px 1px 3px #222;}
/* Page Numbers */
.booklet .b-counter {bottom:10px; position:absolute; display:block; width:25px; height:20px; background:#ccc; color:#444; text-align:center; font-family:Georgia, "Times New Roman", Times, serif; font-size:10px; padding:5px 0 0;}
.booklet .b-wrap-left .b-counter {left:10px;}
.booklet .b-wrap-right .b-counter {right:10px;}
/* Page Shadows */
.booklet .b-shadow-f {right:0; top:0; position:absolute; opacity:0; background-image:url("images/shadow-top-forward.png"); background-repeat:repeat-y; background-position:100% 0;}
.booklet .b-shadow-b {left:0; top:0; position:absolute; opacity:0; background-image:url("images/shadow-top-back.png"); background-repeat:repeat-y; background-position:0 0;}
.booklet .b-p0 {background-image:url("images/shadow.png"); background-repeat:repeat-y; background-position:100% 10px;}
.booklet .b-p3 {background-image:url("images/shadow.png"); background-repeat:repeat-y; background-position:0 10px;}
/* Overlay Controls */
.booklet .b-grab {cursor: url(images/openhand.cur), default;}
.booklet .b-grabbing {cursor: url(images/closedhand.cur), default;}
/* Overlay Controls */
.booklet .b-overlay {top:0; position:absolute; height:100%; width:50%;}
.booklet .b-overlay-prev {left:0;}
.booklet .b-overlay-next {right:0;}
/* Tab Controls */
.booklet .b-tab {background:#000; height:40px; width:100%; padding:10px 0 0; text-align:center; color:#ccc; position:absolute; font-size:11px;}
.booklet .b-tab-prev {left:0;}
.booklet .b-tab-next {right:0;}
.booklet .b-tab:hover {background:#aaa; color:#000;}
/* Arrow Controls */
.booklet .b-arrow {display:block; position:absolute; text-indent:-9999px; top:0; height:100%; width:74px;}
.booklet .b-arrow div {display:none; text-indent:-9999px; height:170px; width:74px; position:absolute; left:0; top:25%;}
.booklet .b-arrow-next {right:-80px;}
.booklet .b-arrow-prev {left:-80px;}
.booklet .b-arrow-next div {background:url("images/arrow-next.png") no-repeat left top;}
.booklet .b-arrow-prev div {background:url("images/arrow-prev.png") no-repeat left top;}
/* @z-index fix (needed for older IE browsers)
----------------------------------------*/
body {z-index:0;}
.b-menu {z-index:100;}
.b-selector {z-index:100;}
.booklet {z-index:10;}
.b-pN {z-index:10;}
.b-p0 {z-index:10;}
.b-p1 {z-index:10;}
.b-p2 {z-index:10;}
.b-p3 {z-index:10;}
.b-p4 {z-index:10;}
.b-prev {z-index:40;}
.b-next {z-index:40;}
.b-counter {z-index:40;}
/* @Menu Items
----------------------------------------*/
.b-menu {height:40px; padding:0 0 10px;}
.b-selector {height:40px; position:relative; float:right; border:none; color:#cecece; cursor:pointer;}
.b-selector .b-current {padding:8px 15px 12px; line-height:20px; min-width:18px; height:20px; display:block; background:#000; text-align:center;}
.b-selector-page {width:auto; margin-left:15px;}
.b-selector-chapter {width:auto;}
.b-selector:hover {color:#fff; background-position:left 0px;}
.b-selector:hover .b-current {background-position:right 0px;}
.b-selector ul {overflow:hidden; margin:0; list-style:none !important; position:absolute; top:40px; right:0; padding:0 0 10px; background:#000; width:240px; font:normal 12px "Myriad Pro", Myriad, "DejaVu Sans Condensed","Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif;}
.b-selector li {border:none;}
.b-selector a {height:14px; text-decoration:none; display:block; padding:5px 10px;}
.b-selector a .b-text {float:left; clear:none;}
.b-selector a .b-num {float:right; clear:none;}
.b-selector a:hover {color:#fff;}
/* @Booklet
----------------------------------------*/
.booklet {width:800px; height:600px; position:relative; /*background:#fff;*/ margin:0 auto 10px; overflow:visible !important;}
.booklet .b-page {left:0; top:0; position:absolute; overflow:hidden; padding:0;}
.booklet .b-pN {}
.booklet .b-p0 {}
.booklet .b-p1 {}
.booklet .b-p2 {}
.booklet .b-p3 {}
.booklet .b-p4 {}
.booklet .b-load {}
/* Page Wrappers */
.booklet .b-wrap {top:0; position:absolute;}
.booklet .b-wrap-left {background:#fff;}
.booklet .b-wrap-right {background:#efefef;}
.booklet .b-pN .b-wrap,
.booklet .b-p1 .b-wrap,
.booklet .b-p2 .b-wrap,
.booklet .b-p3 .b-wrap,
.booklet .b-p4 .b-wrap {left:0;}
.booklet .b-p0 .b-wrap {right:0;}
/* Custom Page Types */
.booklet .b-page-blank {padding:0; width:100%; height:100%;}
.booklet .b-page-cover {padding:0; width:100%; height:100%; background:#925C0E;}
.booklet .b-page-cover h3 {color:#fff; text-shadow:0px 1px 3px #222;}
/* Page Numbers */
.booklet .b-counter {bottom:10px; position:absolute; display:block; width:25px; height:20px; background:#ccc; color:#444; text-align:center; font-family:Georgia, "Times New Roman", Times, serif; font-size:10px; padding:5px 0 0;}
.booklet .b-wrap-left .b-counter {left:10px;}
.booklet .b-wrap-right .b-counter {right:10px;}
/* Page Shadows */
.booklet .b-shadow-f {right:0; top:0; position:absolute; opacity:0; background-image:url("images/shadow-top-forward.png"); background-repeat:repeat-y; background-position:100% 0;}
.booklet .b-shadow-b {left:0; top:0; position:absolute; opacity:0; background-image:url("images/shadow-top-back.png"); background-repeat:repeat-y; background-position:0 0;}
.booklet .b-p0 {background-image:url("images/shadow.png"); background-repeat:repeat-y; background-position:100% 10px;}
.booklet .b-p3 {background-image:url("images/shadow.png"); background-repeat:repeat-y; background-position:0 10px;}
/* Overlay Controls */
.booklet .b-grab {cursor: url(images/openhand.cur), default;}
.booklet .b-grabbing {cursor: url(images/closedhand.cur), default;}
/* Overlay Controls */
.booklet .b-overlay {top:0; position:absolute; height:100%; width:50%;}
.booklet .b-overlay-prev {left:0;}
.booklet .b-overlay-next {right:0;}
/* Tab Controls */
.booklet .b-tab {background:#000; height:40px; width:100%; padding:10px 0 0; text-align:center; color:#ccc; position:absolute; font-size:11px;}
.booklet .b-tab-prev {left:0;}
.booklet .b-tab-next {right:0;}
.booklet .b-tab:hover {background:#aaa; color:#000;}
/* Arrow Controls */
.booklet .b-arrow {display:block; position:absolute; text-indent:-9999px; top:0; height:100%; width:74px;}
.booklet .b-arrow div {display:none; text-indent:-9999px; height:170px; width:74px; position:absolute; left:0; top:25%;}
.booklet .b-arrow-next {right:-80px;}
.booklet .b-arrow-prev {left:-80px;}
.booklet .b-arrow-next div {background:url("images/arrow-next.png") no-repeat left top;}
.booklet .b-arrow-prev div {background:url("images/arrow-prev.png") no-repeat left top;}
/* @z-index fix (needed for older IE browsers)
----------------------------------------*/
body {z-index:0;}
.b-menu {z-index:100;}
.b-selector {z-index:100;}
.booklet {z-index:10;}
.b-pN {z-index:10;}
.b-p0 {z-index:10;}
.b-p1 {z-index:10;}
.b-p2 {z-index:10;}
.b-p3 {z-index:10;}
.b-p4 {z-index:10;}
.b-prev {z-index:40;}
.b-next {z-index:40;}
.b-counter {z-index:40;}
/* @Menu Items
----------------------------------------*/
.b-menu {height:40px; padding:0 0 10px;}
.b-selector {height:40px; position:relative; float:right; border:none; color:#cecece; cursor:pointer;}
.b-selector .b-current {padding:8px 15px 12px; line-height:20px; min-width:18px; height:20px; display:block; background:#000; text-align:center;}
.b-selector-page {width:auto; margin-left:15px;}
.b-selector-chapter {width:auto;}
.b-selector:hover {color:#fff; background-position:left 0px;}
.b-selector:hover .b-current {background-position:right 0px;}
.b-selector ul {overflow:hidden; margin:0; list-style:none !important; position:absolute; top:40px; right:0; padding:0 0 10px; background:#000; width:240px; font:normal 12px "Myriad Pro", Myriad, "DejaVu Sans Condensed","Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif;}
.b-selector li {border:none;}
.b-selector a {height:14px; text-decoration:none; display:block; padding:5px 10px;}
.b-selector a .b-text {float:left; clear:none;}
.b-selector a .b-num {float:right; clear:none;}
.b-selector a:hover {color:#fff;}
\ No newline at end of file
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*
* Copyright © 2008 George McGinley Smith
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
* GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
jQuery.easing['jswing']=jQuery.easing['swing'];jQuery.extend(jQuery.easing,{def:'easeOutQuad',swing:function(x,t,b,c,d){return jQuery.easing[jQuery.easing.def](x,t,b,c,d)},easeInQuad:function(x,t,b,c,d){return c*(t/=d)*t+b},easeOutQuad:function(x,t,b,c,d){return-c*(t/=d)*(t-2)+b},easeInOutQuad:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t+b;return-c/2*((--t)*(t-2)-1)+b},easeInCubic:function(x,t,b,c,d){return c*(t/=d)*t*t+b},easeOutCubic:function(x,t,b,c,d){return c*((t=t/d-1)*t*t+1)+b},easeInOutCubic:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t+b;return c/2*((t-=2)*t*t+2)+b},easeInQuart:function(x,t,b,c,d){return c*(t/=d)*t*t*t+b},easeOutQuart:function(x,t,b,c,d){return-c*((t=t/d-1)*t*t*t-1)+b},easeInOutQuart:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t+b;return-c/2*((t-=2)*t*t*t-2)+b},easeInQuint:function(x,t,b,c,d){return c*(t/=d)*t*t*t*t+b},easeOutQuint:function(x,t,b,c,d){return c*((t=t/d-1)*t*t*t*t+1)+b},easeInOutQuint:function(x,t,b,c,d){if((t/=d/2)<1)return c/2*t*t*t*t*t+b;return c/2*((t-=2)*t*t*t*t+2)+b},easeInSine:function(x,t,b,c,d){return-c*Math.cos(t/d*(Math.PI/2))+c+b},easeOutSine:function(x,t,b,c,d){return c*Math.sin(t/d*(Math.PI/2))+b},easeInOutSine:function(x,t,b,c,d){return-c/2*(Math.cos(Math.PI*t/d)-1)+b},easeInExpo:function(x,t,b,c,d){return(t==0)?b:c*Math.pow(2,10*(t/d-1))+b},easeOutExpo:function(x,t,b,c,d){return(t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b},easeInOutExpo:function(x,t,b,c,d){if(t==0)return b;if(t==d)return b+c;if((t/=d/2)<1)return c/2*Math.pow(2,10*(t-1))+b;return c/2*(-Math.pow(2,-10*--t)+2)+b},easeInCirc:function(x,t,b,c,d){return-c*(Math.sqrt(1-(t/=d)*t)-1)+b},easeOutCirc:function(x,t,b,c,d){return c*Math.sqrt(1-(t=t/d-1)*t)+b},easeInOutCirc:function(x,t,b,c,d){if((t/=d/2)<1)return-c/2*(Math.sqrt(1-t*t)-1)+b;return c/2*(Math.sqrt(1-(t-=2)*t)+1)+b},easeInElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return-(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b},easeOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d)==1)return b+c;if(!p)p=d*.3;if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);return a*Math.pow(2,-10*t)*Math.sin((t*d-s)*(2*Math.PI)/p)+c+b},easeInOutElastic:function(x,t,b,c,d){var s=1.70158;var p=0;var a=c;if(t==0)return b;if((t/=d/2)==2)return b+c;if(!p)p=d*(.3*1.5);if(a<Math.abs(c)){a=c;var s=p/4}else var s=p/(2*Math.PI)*Math.asin(c/a);if(t<1)return-.5*(a*Math.pow(2,10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p))+b;return a*Math.pow(2,-10*(t-=1))*Math.sin((t*d-s)*(2*Math.PI)/p)*.5+c+b},easeInBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*(t/=d)*t*((s+1)*t-s)+b},easeOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;return c*((t=t/d-1)*t*((s+1)*t+s)+1)+b},easeInOutBack:function(x,t,b,c,d,s){if(s==undefined)s=1.70158;if((t/=d/2)<1)return c/2*(t*t*(((s*=(1.525))+1)*t-s))+b;return c/2*((t-=2)*t*(((s*=(1.525))+1)*t+s)+2)+b},easeInBounce:function(x,t,b,c,d){return c-jQuery.easing.easeOutBounce(x,d-t,0,c,d)+b},easeOutBounce:function(x,t,b,c,d){if((t/=d)<(1/2.75)){return c*(7.5625*t*t)+b}else if(t<(2/2.75)){return c*(7.5625*(t-=(1.5/2.75))*t+.75)+b}else if(t<(2.5/2.75)){return c*(7.5625*(t-=(2.25/2.75))*t+.9375)+b}else{return c*(7.5625*(t-=(2.625/2.75))*t+.984375)+b}},easeInOutBounce:function(x,t,b,c,d){if(t<d/2)return jQuery.easing.easeInBounce(x,t*2,0,c,d)*.5+b;return jQuery.easing.easeOutBounce(x,t*2-d,0,c,d)*.5+c*.5+b}});
googlecharts
============
Google Charts API for Amber
Author
------
Thomas W Rake
Availability
------------
Fork it at https://github.com/tomrake/googlecharts
How to use
----------
This project is a subproject of https://github.com/tomrake/amber
If you clone that project you should have this subproject.
Version 0.2
-----------
This API is likely to change in future versions.
A overview of the recipe to create a Pie Chart is have a place in your html dom to place the chart. Create a subclass of ChartApp to control loading of google packages, creation of your charts and bind them to the dom. Ensure your charts have the correct data by subclassing PieChart and add the the makeData and makeOption methods.
Here is the detailed Pie Chart recipe:
1) Create an insertion point div in your html document in my case a my_chart_id div:
<div id="my_chart_div" style="width: 900px;height: 500px;">Loading Google Chart..</div>
2) Create a package for your code MyCode
3) In MyCode package create a subclass of PieChart, as an example MyPieChart, with two instance methods makeData and makeOptions which contain the chart data and options:
MyPieChart>>makeData
"DataTable of example Pie chart slices"
^ self arrayToDataTable: { {'Task'.'Hours per Day'}.
{'Work' . 11}.
{'Eat'.2}.
{'Commute'.2}.
{'Watch TV'.2}.
{'Snooze'.7}}
MyPieChart>>makeOptions
"Return a Dictionary of the options in this case only a title"
^#{'title' -> 'My Daily Activities'}
4) Determine which Google visualization packages are needed in the PieChart case only 'corechart' is needed.
5) In package MyCode create a subclass of ChartApp, as an example MyPieApp. In MyPieApp create a class method neededVisualizationPackages to return an Array for the packages needed for the App:
MyPieApp class>>neededVisualizationPackages
"This App only needs a corechart package."
^{'corechart'}
6) In MyPieApp create an instance method overiding begin, and use it to create, bind and draw MyPieChart. Besure to call super begin:
begin
"Start the executiong of the MyPieChart by connecting each button/graphic pair"
MyPieChart new chartId:'my_chart_div';drawChart.
^super begin
7) Call Amber
<script src="../../js/amber.js" type="text/javascript"></script>
<script type="text/javascript">
loadAmber({
files: ['GoogleCharts.js','MyCode.js'],
prefix: 'examples/googlecharts/js', // path for js files i think
ready: function() {
$(function() {
smalltalk.MyPieApp._new(); // Start the smalltalk App
});
}});
</script>
The purpose of version 0.2 is to show how smalltalk flexibility can drive google charts.
To Be Done
----------
Coordinate information between the Chart API and App API .Each chart has a fixed and known package to be loaded by the JSAPI it would be best if this info was recorded in a fixed place.
Remove the subclasses of GoogleChart in favor of an Abstract Factory.
Be prepaired to split the JSAPI.js ("the loading API") for use with other Google products.
googlecharts
============
Google Charts API for Amber
Author
------
Thomas W Rake
Availability
------------
Fork it at https://github.com/tomrake/googlecharts
How to use
----------
This project is a subproject of https://github.com/tomrake/amber
If you clone that project you should have this subproject.
Version 0.2
-----------
This API is likely to change in future versions.
A overview of the recipe to create a Pie Chart is have a place in your html dom to place the chart. Create a subclass of ChartApp to control loading of google packages, creation of your charts and bind them to the dom. Ensure your charts have the correct data by subclassing PieChart and add the the makeData and makeOption methods.
Here is the detailed Pie Chart recipe:
1) Create an insertion point div in your html document in my case a my_chart_id div:
<div id="my_chart_div" style="width: 900px;height: 500px;">Loading Google Chart..</div>
2) Create a package for your code MyCode
3) In MyCode package create a subclass of PieChart, as an example MyPieChart, with two instance methods makeData and makeOptions which contain the chart data and options:
MyPieChart>>makeData
"DataTable of example Pie chart slices"
^ self arrayToDataTable: { {'Task'.'Hours per Day'}.
{'Work' . 11}.
{'Eat'.2}.
{'Commute'.2}.
{'Watch TV'.2}.
{'Snooze'.7}}
MyPieChart>>makeOptions
"Return a Dictionary of the options in this case only a title"
^#{'title' -> 'My Daily Activities'}
4) Determine which Google visualization packages are needed in the PieChart case only 'corechart' is needed.
5) In package MyCode create a subclass of ChartApp, as an example MyPieApp. In MyPieApp create a class method neededVisualizationPackages to return an Array for the packages needed for the App:
MyPieApp class>>neededVisualizationPackages
"This App only needs a corechart package."
^{'corechart'}
6) In MyPieApp create an instance method overiding begin, and use it to create, bind and draw MyPieChart. Besure to call super begin:
begin
"Start the executiong of the MyPieChart by connecting each button/graphic pair"
MyPieChart new chartId:'my_chart_div';drawChart.
^super begin
7) Call Amber
<script src="../../js/amber.js" type="text/javascript"></script>
<script type="text/javascript">
loadAmber({
files: ['GoogleCharts.js','MyCode.js'],
prefix: 'examples/googlecharts/js', // path for js files i think
ready: function() {
$(function() {
smalltalk.MyPieApp._new(); // Start the smalltalk App
});
}});
</script>
The purpose of version 0.2 is to show how smalltalk flexibility can drive google charts.
To Be Done
----------
Coordinate information between the Chart API and App API .Each chart has a fixed and known package to be loaded by the JSAPI it would be best if this info was recorded in a fixed place.
Remove the subclasses of GoogleChart in favor of an Abstract Factory.
Be prepaired to split the JSAPI.js ("the loading API") for use with other Google products.
Design smalltalk friendly api for generic charts.
\ No newline at end of file
......@@ -4,9 +4,9 @@ smalltalk.addMethod(
"_begin",
smalltalk.method({
selector: "begin",
fn: function (){
var self=this;
return self;
fn: function (){
var self=this;
return self;
}
}),
smalltalk.ChartApp);
......@@ -15,13 +15,13 @@ smalltalk.addMethod(
"_initialize",
smalltalk.method({
selector: "initialize",
fn: function (){
var self=this;
smalltalk.send(smalltalk.send(self,"_class",[]),"_loadGoogleLoader_",[(function(){
return smalltalk.send(smalltalk.send(self,"_class",[]),"_loadVisualization_",[(function(){
return smalltalk.send(self,"_begin",[]);
})]);
})]);