From 30cddd45f545e4645fcf9182feaad3550ab9624f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 12 May 2015 08:07:33 -0400 Subject: [PATCH] feature(client) loadDir: image position on top, when no history --- lib/client.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/client.js b/lib/client.js index 65fab88d..3bc55ccf 100644 --- a/lib/client.js +++ b/lib/client.js @@ -50,6 +50,7 @@ var Util, DOM, CloudFunc, join; */ this.loadDir = function(params, callback) { var link, imgPosition, panelChanged, pathParams, + noCurrent, isRefresh, panel, history, p = params; @@ -58,18 +59,19 @@ var Util, DOM, CloudFunc, join; isRefresh = p.isRefresh; panel = p.panel; history = p.history; + noCurrent = p.noCurrent; } if (pathParams) link = pathParams; - if (!params.noCurrent) + if (!noCurrent) if (panel && panel !== Info.panel) { DOM.changePanel(); panelChanged = true; } - if (panelChanged || isRefresh) + if (panelChanged || isRefresh || !history) imgPosition = 'top'; Images.show.load(imgPosition);