Browse Source

Move VIEW_HISTORY_MEMORY constant to `view_history.js`

Currently this constant is present in `viewer.js`, but it is not used there at all. Instead, it is used in `view_history.js` where we have a global for it. We might as well move the constant to `view_history.js` as that is the only place where it is used, thereby removing a global and an unused constant from `viewer.js`.
Tim van der Meij 10 years ago
parent
commit
7681def0de
  1. 4
      web/view_history.js
  2. 1
      web/viewer.js

4
web/view_history.js

@ -14,10 +14,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
/* globals PDFJS, VIEW_HISTORY_MEMORY, Promise */ /* globals PDFJS, Promise */
'use strict'; 'use strict';
var VIEW_HISTORY_MEMORY = 20;
/** /**
* View History - This is a utility for saving various view parameters for * View History - This is a utility for saving various view parameters for
* recently opened files. * recently opened files.

1
web/viewer.js

@ -31,7 +31,6 @@ var DEFAULT_URL = 'compressed.tracemonkey-pldi-09.pdf';
var DEFAULT_SCALE_DELTA = 1.1; var DEFAULT_SCALE_DELTA = 1.1;
var MIN_SCALE = 0.25; var MIN_SCALE = 0.25;
var MAX_SCALE = 10.0; var MAX_SCALE = 10.0;
var VIEW_HISTORY_MEMORY = 20;
var SCALE_SELECT_CONTAINER_PADDING = 8; var SCALE_SELECT_CONTAINER_PADDING = 8;
var SCALE_SELECT_PADDING = 22; var SCALE_SELECT_PADDING = 22;
var PAGE_NUMBER_LOADING_INDICATOR = 'visiblePageIsLoading'; var PAGE_NUMBER_LOADING_INDICATOR = 'visiblePageIsLoading';

Loading…
Cancel
Save