blob: 037a2cbf3c4ce4022da67b871b166ad338fff245 [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2013 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
<link rel="import" href="/core/analysis/analysis_sub_view.html">
<link rel="import" href="/core/analysis/multi_event_sub_view.html">
<polymer-element name="tr-c-a-multi-async-slice-sub-view"
extends="tr-c-a-sub-view">
<template>
<style>
:host {
display: flex;
}
</style>
<tr-c-a-multi-event-sub-view id="content"></tr-c-a-multi-event-sub-view>
</template>
<script>
'use strict';
Polymer({
get selection() {
return this.$.content.selection;
},
set selection(selection) {
this.$.content.selection = selection;
},
get relatedEventsToHighlight() {
if (!this.currentSelection_)
return undefined;
var selection = new tr.c.Selection();
this.currentSelection_.forEach(function(asyncEvent) {
if (!asyncEvent.associatedEvents)
return;
asyncEvent.associatedEvents.forEach(function(event) {
selection.push(event);
});
});
if (selection.length)
return selection;
return undefined;
}
});
</script>
</polymer-element>