Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed a forgotten issue with shadows.

  • Loading branch information...
commit 779e2158a7e463c565c18190e5cedd5547c90164 1 parent 8941131
@mlantz mlantz authored
Showing with 11 additions and 17 deletions.
  1. +0 −10 docs/demos/caterpillar.html
  2. +11 −7 src/alice.plugins.caterpillar.js
View
10 docs/demos/caterpillar.html
@@ -295,13 +295,6 @@ <h1 style="color: #fff; text-align: center;">Alice in Wonderland</h1>
});
}
- // document.addEventListener("pageTrigger", function(){
- // if(_caterpillar.pageNumber === 13){
- // _caterpillar.loadMorePages('newgame.html', 'book');
- // }
- // }, false);
-
-
alicejs.book({
elems: "book",
speed: '500ms',
@@ -316,9 +309,6 @@ <h1 style="color: #fff; text-align: center;">Alice in Wonderland</h1>
controlBackground: '#111'
});
- console.log(_caterpillar.realPageCount)
-
-
//Google Analytics
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-28534102-1']);
View
18 src/alice.plugins.caterpillar.js
@@ -237,6 +237,8 @@ alice.plugins.caterpillar = function () {
core.originZero = '0 0'; // The default transform origin think top left
core.pageClass = params.pageClass; // Potential page class the author wants to add
+ core.shadow = params.shadow;
+
core.randomizer = params.randomize;
console.log(core.randomizer);
@@ -322,12 +324,14 @@ alice.plugins.caterpillar = function () {
// Configure the perspective depth [ there was no science used in the formulating of this. ]
var goggles = Math.floor(core.pageWidth*4);
- // Set the shadows
- core.shadowPattern0 = '';//'2px 0px 10px rgba(0, 0, 0, 0.1)';
- core.shadowPattern50 = '';//'2px 0px 10px rgba(0, 0, 0, 0.2)';
- core.shadowPattern100 = '';//'2px 0px 10px rgba(0, 0, 0, 0.1)';
- core.shadowPatternRev50 = '';//'2px 0px 10px rgba(0, 0, 0, 0.2)';
- core.shadowPatternRev100 = '';//'2px 0px 10px rgba(0, 0, 0, 0.1)';
+ if(core.shadow === true){
+ // Set the shadows
+ core.shadowPattern0 = '2px 0px 4px rgba(0, 0, 0, 0.1)';
+ core.shadowPattern50 = '2px 0px 4px rgba(0, 0, 0, 0.2)';
+ core.shadowPattern100 = '2px 0px 4px rgba(0, 0, 0, 0.1)';
+ core.shadowPatternRev50 = '2px 0px 4px rgba(0, 0, 0, 0.2)';
+ core.shadowPatternRev100 = '2px 0px 4px rgba(0, 0, 0, 0.1)';
+ }
// Various book details
core.wrap = params.wrap; // The true/false wrap state
@@ -1570,7 +1574,7 @@ alice.plugins.book = function (params) {
bookWidth: params.bookWidth || document.getElementById(params.elems || alice.anima).style.width,
bookHeight: params.bookHeight || document.getElementById(params.elems || alice.anima).style.height,
- shadow: params.shadow || true,
+ shadow: params.shadow || false,
speed: params.speed || "500ms",
inPageControls: params.inPageControls,
Please sign in to comment.
Something went wrong with that request. Please try again.