Skip to content
This repository has been archived by the owner on Aug 27, 2019. It is now read-only.

Commit

Permalink
Merge pull request #44 from astanley/master
Browse files Browse the repository at this point in the history
recommended bug fix for issue #43
  • Loading branch information
pelegri committed Jan 18, 2013
2 parents 04ea37a + c9a76b9 commit 774c6b6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/alice.plugins.cheshire.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ alice.plugins.cheshire = function (params) {
}

// Generate transforms
// Animation @ 0%
// Animation @ 0%
transformStart = "";
transformStart += (flip) ? " rotate" + flip.axis + "(" + flip.start + "deg)" : " translate" + axis + "(" + posStart + "px)";
transformStart += (calc.rotate && parseInt(calc.rotate, 10) !== 0) ? " rotate(" + calc.rotateStart + "deg)" : "";
Expand Down Expand Up @@ -221,7 +221,7 @@ alice.plugins.cheshire = function (params) {

// Apply perspective to parent container
container.style[alice.prefixJS + "Perspective"] = perspective + "px";
container.style[alice.prefixJS + "PerspectiveOrigin"] = alice.format.coords(perspectiveOrigin);
container.style[alice.prefixJS + "PerspectiveOrigin"] = alice.format.coords(perspectiveOrigin);

// Apply properties to elements
elem.style[alice.prefixJS + "BackfaceVisibility"] = backfaceVisibility;
Expand All @@ -234,6 +234,8 @@ alice.plugins.cheshire = function (params) {
elem.style[alice.prefixJS + "AnimationDirection"] = direction;
elem.style[alice.prefixJS + "AnimationPlayState"] = playstate;

elem.style[alice.prefixJS + "AnimationFillMode"] = 'forwards';

// Apply styles from last key frame
elem.style[alice.prefixJS + "Transform"] = transformEnd;
elem.style.opacity = (fade) ? fadeEnd : "";
Expand Down Expand Up @@ -619,7 +621,7 @@ alice.plugins.raceFlag = function (params) {
"use strict";
console.info("raceFlag: ", arguments);

if(!params){ params = ''; }
if(!params){ params = ''; }

var opts = {
flip: "down",
Expand Down Expand Up @@ -658,7 +660,7 @@ alice.plugins.slide = function (params) {
"use strict";
console.info("slide: ", arguments);

if(!params){ params = ''; }
if(!params){ params = ''; }

var opts = {
elems: params.elems || alice.anima,
Expand Down Expand Up @@ -695,7 +697,7 @@ alice.plugins.spin = function (params) {
"use strict";
console.info("spin: ", arguments);

if(!params){ params = ''; }
if(!params){ params = ''; }

var opts = {
perspectiveOrigin: "center",
Expand Down Expand Up @@ -736,7 +738,7 @@ alice.plugins.toss = function (params) {
"use strict";
console.info("toss: ", arguments);

if(!params){ params = ''; }
if(!params){ params = ''; }

var opts = {
rotate: (params.move === "left" || params.move === "down") ? 720 : -720,
Expand Down

0 comments on commit 774c6b6

Please sign in to comment.