forked from ngageoint/opensphere
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ngageoint#713 in WV/opensphere from ~JENKINS/opens…
…phere:upscanMerge to master * commit '69473feb724a1db6e5186ff98ec7ac02b87454a6': fix(csv): Set path to Papa Parse library. fix(LayerDefaults): When slider bars are reset the settings are checked for default values. fix(LayerDefaults): When slider bars are reset the settings are checked for default values. chore(resolver): Update resolver to support Electron preload scripts. fix(scaleline): Fix a jittery scaleline when in 3d mode.
- Loading branch information
Showing
7 changed files
with
62 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,6 +11,12 @@ | |
var Papa = {}; | ||
|
||
|
||
/** | ||
* @type {string} | ||
*/ | ||
Papa.SCRIPT_PATH; | ||
|
||
|
||
/** | ||
* @type {number} | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
goog.provide('os.ui.file.csv'); | ||
|
||
|
||
/** | ||
* Configure Papa Parse for use with OpenSphere. | ||
*/ | ||
os.ui.file.csv.configurePapaParse = function() { | ||
// Papa Parse locates the script path by looking up the last script element on the page. this is generally a fine | ||
// assumption, unless a browser extension injects scripts at the end of the page. this locates the script by a more | ||
// specific selector that should be less prone to false positives. | ||
if (!Papa.SCRIPT_PATH) { | ||
var papaScriptEl = /** @type {HTMLScriptElement} */ (document.querySelector('script[src*="papaparse"]')); | ||
if (papaScriptEl) { | ||
Papa.SCRIPT_PATH = papaScriptEl.src; | ||
} | ||
} | ||
|
||
// if workers aren't available, reduce Papa's default chunk size to prevent the browser from hanging | ||
if (!Modernizr.webworkers) { | ||
Papa.LocalChunkSize = 1024 * 1024 * 1; // 1 MB (default 10MB) | ||
Papa.RemoteChunkSize = 1024 * 1024 * 1; // 1 MB (default 5MB) | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters