mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-20 15:18:08 +02:00
Remove the moveToEndOfArray
helper function, since it's unused
With the previous patch, this helper function is no longer used and keeping it around will simply increase the size of the builds. This removal is purposely done *separately*, to make it easy to revert the patch in the future if this helper function would become useful again.
This commit is contained in:
parent
f55bf42398
commit
a774707e31
2 changed files with 0 additions and 63 deletions
|
@ -906,27 +906,6 @@ class ProgressBar {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Moves all elements of an array that satisfy condition to the end of the
|
||||
* array, preserving the order of the rest.
|
||||
*/
|
||||
function moveToEndOfArray(arr, condition) {
|
||||
const moved = [],
|
||||
len = arr.length;
|
||||
let write = 0;
|
||||
for (let read = 0; read < len; ++read) {
|
||||
if (condition(arr[read])) {
|
||||
moved.push(arr[read]);
|
||||
} else {
|
||||
arr[write] = arr[read];
|
||||
++write;
|
||||
}
|
||||
}
|
||||
for (let read = 0; write < len; ++read, ++write) {
|
||||
arr[write] = moved[read];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the active or focused element in current DOM.
|
||||
*
|
||||
|
@ -1031,7 +1010,6 @@ export {
|
|||
MAX_AUTO_SCALE,
|
||||
MAX_SCALE,
|
||||
MIN_SCALE,
|
||||
moveToEndOfArray,
|
||||
noContextMenuHandler,
|
||||
normalizeWheelEventDelta,
|
||||
normalizeWheelEventDirection,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue