From 8f107b180c12fad965c38850aedd7064bbe15cc3 Mon Sep 17 00:00:00 2001 From: "B. Arman Aksoy" Date: Tue, 7 Jan 2014 22:05:53 -0500 Subject: [PATCH] adjust the parameters of the flippant.flip function for better control over the back element. Changed the parameter `content` to the HTML element--that is the back of the card/modal--with the name `back`. The older way was flawed in the sense that, when the `back` element was created, it was being appended to the `body` hence reducing the control over the flippand. To better understand this, imagine a scenario where the developer wants to destroy the flipped card (i.e. the `back` element) when the user requests a new view (the Backbone-way). With the older way, it was incredibly hard to destroy the back element. If the developer specifies the `back` element by himself (as this commit allows), s/he can destroy the container of the card/modals and will simply get rid of the overflowing back element whenever a new view is created. Just a suggestion ;) --- flippant.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/flippant.js b/flippant.js index 31f8c8b..72f03c3 100644 --- a/flippant.js +++ b/flippant.js @@ -2,7 +2,7 @@ return (function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s