this.layerTreeQuadStackView_ = new cc.LayerTreeQuadStackView();
this.dragBar_ = new tvcm.ui.DragHandle();
this.analysisEl_ = document.createElement('layer-view-analysis');
+ this.analysisEl_.addEventListener('requestSelectionChange',
+ this.onRequestSelectionChangeFromAnalysisEl_.bind(this));
this.dragBar_.target = this.analysisEl_;
this.appendChild(this.dragBar_);
this.appendChild(this.analysisEl_);
- this.layerTreeQuadStackView_.addEventListener('selectionChange',
+ this.layerTreeQuadStackView_.addEventListener('selection-change',
function() {
this.layerTreeQuadStackViewSelectionChanged_();
}.bind(this));
this.layerTreeQuadStackView_.style.height =
window.getComputedStyle(this).height;
}
+ tvcm.dispatchSimpleEvent(this, 'selection-change');
},
createPictureBtn_: function(pictures) {
return selection;
};
return link;
+ },
+
+ onRequestSelectionChangeFromAnalysisEl_: function(e) {
+ if (!(e.selection instanceof cc.Selection))
+ return;
+
+ e.stopPropagation();
+ this.selection = e.selection;
+ },
+
+ get extraHighlightsByLayerId() {
+ return this.layerTreeQuadStackView_.extraHighlightsByLayerId;
+ },
+
+ set extraHighlightsByLayerId(extraHighlightsByLayerId) {
+ this.layerTreeQuadStackView_.extraHighlightsByLayerId =
+ extraHighlightsByLayerId;
}
};