blob: 9ae9fee5421297f7505f880411e7292374d03aae [file] [log] [blame]
<!DOCTYPE html>
<!--
Copyright (c) 2015 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="/model/selectable_item.html">
<link rel="import" href="/model/selection_state.html">
<script>
'use strict';
tr.exportTo('tr.model', function() {
var SelectableItem = tr.model.SelectableItem;
var SelectionState = tr.model.SelectionState;
/**
* A ProxySelectableItem is a selectable item which is not a model item itself
* but instead acts as a proxy for a model item.
*
* @constructor
* @extends {SelectableItem}
*/
function ProxySelectableItem(modelItem) {
SelectableItem.call(this, modelItem);
};
ProxySelectableItem.prototype = {
__proto__: SelectableItem.prototype,
get selectionState() {
var modelItem = this.modelItem_;
if (modelItem === undefined)
return SelectionState.NONE;
return modelItem.selectionState;
}
};
return {
ProxySelectableItem: ProxySelectableItem
};
});
</script>