Bug 1478397 - Part 14: Selecting a flex item in the flex item selector should select that element in the markup view. r=rcaliman

This commit is contained in:
Gabriel Luong 2018-09-18 09:46:02 -04:00
Родитель f22fa6beef
Коммит 0a0c1deadd
1 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -272,16 +272,21 @@ class FlexboxInspector {
}
/**
* Handler for a change in the input checkbox in the FlexItem component.
* Toggles on/off the flex item highlighter for the provided flex item element.
* Handler for a change in the input checkbox in the FlexItem and Header component.
* Toggles on/off the flex item highlighter for the provided flex item element and
* changes the selection to the given node.
*
* @param {NodeFront} node
* @param {NodeFront|null} node
* The NodeFront of the flex item element for which the flex item is toggled
* on/off for.
*/
onToggleFlexItemShown(node) {
this.highlighters.toggleFlexItemHighlighter(node);
this.store.dispatch(toggleFlexItemShown(node));
if (node) {
this.selection.setNodeFront(node);
}
}
/**