Commit 0eaee5ca authored by Zeynep Cankara's avatar Zeynep Cankara Committed by Commit Bot

[tools][system-analyzer] Change naming of global functions

Change names of global functions from
globalXYZEvent to handleXYZ format to increase
readability.

Bug: v8:10667

Change-Id: Ie5e7b6b7ab1c535f5c6beb65361d0a78cac96e46
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2299362
Commit-Queue: Zeynep Cankara <zcankara@google.com>
Reviewed-by: 's avatarCamillo Bruni <cbruni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68872}
parent ca1e6573
......@@ -11,6 +11,7 @@ found in the LICENSE file. -->
<link href='https://fonts.googleapis.com/css?family=Roboto' rel='stylesheet'>
<!-- <link rel="icon" type="image/png" href="/images/favicon.png"/> -->
<script type="module" src="index.mjs"></script>
<script type="module" src="index.mjs"></script>
<link rel="stylesheet" type="text/css" href="./index.css">
<script src="helper.js"></script>
......@@ -62,13 +63,13 @@ globalThis.app = new App();
<div id="content">
<section id="file-reader">
<br></br>
<log-file-reader id="log-file-reader" onchange="app.globalDataUpload(event)"></log-file-reader>
<log-file-reader id="log-file-reader" onchange="app.handleDataUpload(event)"></log-file-reader>
<br></br>
</section>
<div id="container" style="display: none;">
<timeline-panel id="timeline-panel"></timeline-panel>
<map-panel id="map-panel" onclick="app.globalSearchBarEvent(event)" onchange="showMaps(event)"></map-panel>
<ic-panel id="ic-panel" onchange="app.handleSelectIcEvents(event)"></ic-panel>
<map-panel id="map-panel" onclick="app.handleMapAddressSearch(event)" showMaps="app.showMaps(event)"></map-panel>
<ic-panel id="ic-panel" onchange="app.handleSelectIc(event)"></ic-panel>
</div>
</div>
......
......@@ -84,7 +84,7 @@ function $(id) { return document.querySelector(id); }
let stateGlobal = Object.create(null);
// call when a new file uploaded
function globalDataUpload(e) {
function handleDataUpload(e) {
stateGlobal.timeline = e.detail;
if(!e.detail) return;
$('#container').style.display = 'block';
......@@ -97,7 +97,7 @@ function globalDataUpload(e) {
loadFileIC(stateGlobal.fileData.file);
}
function globalSearchBarEvent(e) {
function handleMapAddressSearch(e) {
if(!e.detail.isValidMap) return;
document.state.map = e.detail.map;
}
......@@ -107,17 +107,17 @@ function showMaps(e) {
document.state.view.transitionView.showMaps(e.detail);
}
function handleSelectIcEvents(e){
function handleSelectIc(e){
if(!e.detail) return;
// Set selected IC events on the View
document.state.filteredEntries = e.detail;
}
class App {
globalDataUpload = globalDataUpload;
globalSearchBarEvent = globalSearchBarEvent;
handleDataUpload = handleDataUpload;
handleMapAddressSearch = handleMapAddressSearch;
showMaps = showMaps;
handleSelectIcEvents = handleSelectIcEvents;
handleSelectIc = handleSelectIc;
}
export {App};
......@@ -135,7 +135,7 @@ found in the LICENSE file. -->
color: black;
}
</style>
<stats-panel id="stats-panel" onchange="showMaps(event)"></stats-panel>
<stats-panel id="stats-panel" onchange="app.showMaps(event)"></stats-panel>
<div class="panel">
<h2>Map Panel</h2>
<h3>Transitions</h3>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment