remove old window width from data structure. Use variable instead

This commit is contained in:
Squidly271 2017-10-21 09:02:40 -04:00
parent aaa40e6c11
commit 70ac4807b7
2 changed files with 4 additions and 4 deletions

Binary file not shown.

View File

@ -147,9 +147,9 @@ var categoryDesc = {
var checkStaleVar = setInterval(function(){ checkStale(); },60000); var checkStaleVar = setInterval(function(){ checkStale(); },60000);
$(function(){ var data_oldWindowWidth = getWindowWidth();
$("#sortorder").attr("data-oldWindowWidth",getWindowWidth());
$(function(){
<?if ($backTopTopIncluded == "false"):?> <?if ($backTopTopIncluded == "false"):?>
var backtotopoffset = 250; var backtotopoffset = 250;
var backtotopduration = 500; var backtotopduration = 500;
@ -1345,8 +1345,8 @@ function resizeDisplay() {
window.resizeEvt; window.resizeEvt;
$(window).resize(function(){ $(window).resize(function(){
var newWidth = getWindowWidth(); var newWidth = getWindowWidth();
var oldWidth = $("#sortorder").attr("data-oldWindowWidth"); var oldWidth = data_oldWindowWidth;
$("#sortorder").attr("data-oldWindowWidth",newWidth); data_oldWindowWidth = newWidth;
var view = JSON.parse($("#sortorder").attr("data-sortorder")); var view = JSON.parse($("#sortorder").attr("data-sortorder"));
switch ( view.viewMode ) { switch ( view.viewMode ) {
case '#viewDetail': case '#viewDetail':