|
|
@ -4,9 +4,9 @@
|
|
|
|
/* globals app, define, config, utils*/
|
|
|
|
/* globals app, define, config, utils*/
|
|
|
|
|
|
|
|
|
|
|
|
define('composer/resize', function() {
|
|
|
|
define('composer/resize', function() {
|
|
|
|
var resize = {};
|
|
|
|
var resize = {},
|
|
|
|
var env = utils.findBootstrapEnvironment();
|
|
|
|
oldPercentage = 0,
|
|
|
|
var oldPercentage = 0;
|
|
|
|
env;
|
|
|
|
|
|
|
|
|
|
|
|
resize.reposition = function(postContainer) {
|
|
|
|
resize.reposition = function(postContainer) {
|
|
|
|
var percentage = localStorage.getItem('composer:resizePercentage');
|
|
|
|
var percentage = localStorage.getItem('composer:resizePercentage');
|
|
|
@ -15,6 +15,10 @@ define('composer/resize', function() {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
function doResize(postContainer, percentage) {
|
|
|
|
function doResize(postContainer, percentage) {
|
|
|
|
|
|
|
|
if (!env) {
|
|
|
|
|
|
|
|
env = utils.findBootstrapEnvironment();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (percentage) {
|
|
|
|
if (percentage) {
|
|
|
|
if (env === 'md' || env === 'lg') {
|
|
|
|
if (env === 'md' || env === 'lg') {
|
|
|
|
postContainer.css('height', Math.floor($(window).height() * percentage) + 'px');
|
|
|
|
postContainer.css('height', Math.floor($(window).height() * percentage) + 'px');
|
|
|
|