Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 14 additions & 18 deletions togetherjs/jqueryPlugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,18 @@
define(["jquery"], function ($) {
// This isn't really a "module" since it just patches jQuery itself

function step(now, fx, transform) {
if (fx.prop == "borderSpacing") {
$(this).css('-webkit-transform', transform+now+'deg)')
.css('-moz-transform', transform+now+'deg)')
.css('-ms-transform', transform+now+'deg)')
.css('-o-transform', transform+now+'deg)')
.css('transform', transform+now+'deg)');
} else {
$(this).css(fx.prop, now);
}
}

// FIX ME Animations TO DO
// walkthrough animations go here
// animate participant cursor and box popping in when they enter the session
Expand Down Expand Up @@ -38,15 +50,7 @@ define(["jquery"], function ($) {
$.fn.rotateCursorDown = function () {
$('.togetherjs-cursor svg').animate({borderSpacing: 0, opacity: 1}, {
step: function(now, fx) {
if (fx.prop == "borderSpacing") {
$(this).css('-webkit-transform', 'rotate('+now+'deg)')
.css('-moz-transform', 'rotate('+now+'deg)')
.css('-ms-transform', 'rotate('+now+'deg)')
.css('-o-transform', 'rotate('+now+'deg)')
.css('transform', 'rotate('+now+'deg)');
} else {
$(this).css(fx.prop, now);
}
step(now, fx, 'rotate(');
},
duration: 500
}, 'linear').promise().then(function () {
Expand Down Expand Up @@ -186,15 +190,7 @@ define(["jquery"], function ($) {
$.fn.fadeOut = function () {
this.animate({borderSpacing: -90, opacity: 0.5}, {
step: function(now, fx) {
if (fx.prop == "borderSpacing") {
$(this).css('-webkit-transform', 'perspective( 600px ) rotateX('+now+'deg)')
.css('-moz-transform', 'perspective( 600px ) rotateX('+now+'deg)')
.css('-ms-transform', 'perspective( 600px ) rotateX('+now+'deg)')
.css('-o-transform', 'perspective( 600px ) rotateX('+now+'deg)')
.css('transform', 'perspective( 600px ) rotateX('+now+'deg)');
} else {
$(this).css(fx.prop, now);
}
step(now, fx, 'perspective( 600px ) rotateX(');
},
duration: 500
}, 'linear').promise().then(function () {
Expand Down