Add wireframe mode control
Summary: This allows you to control how the wire frames are drawn, useful when there are lots of overalpping wireframes Changelog: UIDebugger - Added wireframe mode control, useful when lots of overlapping wireframes Reviewed By: aigoncharov Differential Revision: D47949841 fbshipit-source-id: 72de7d085ca433557107ab0cc6e4399220836d9f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
fb469faa1d
commit
fb503a0a2f
@@ -30,7 +30,7 @@ export function checkFocusedNodeStillActive(
|
||||
nodes: Map<Id, ClientNode>,
|
||||
) {
|
||||
const focusedNodeId = uiState.focusedNode.get();
|
||||
const focusedNode = focusedNodeId && nodes.get(focusedNodeId);
|
||||
const focusedNode = focusedNodeId != null && nodes.get(focusedNodeId);
|
||||
if (!focusedNode || !isFocusedNodeAncestryAllActive(focusedNode, nodes)) {
|
||||
uiState.focusedNode.set(undefined);
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
UIActions,
|
||||
UIState,
|
||||
ViewMode,
|
||||
WireFrameMode,
|
||||
} from '../DesktopTypes';
|
||||
import {tracker} from '../utils/tracker';
|
||||
import {
|
||||
@@ -108,6 +109,10 @@ export function uiActions(
|
||||
uiState.viewMode.set(viewMode);
|
||||
};
|
||||
|
||||
const onSetWireFrameMode = (wireFrameMode: WireFrameMode) => {
|
||||
uiState.wireFrameMode.set(wireFrameMode);
|
||||
};
|
||||
|
||||
const onSetFrameworkEventMonitored = (
|
||||
eventType: FrameworkEventType,
|
||||
monitored: boolean,
|
||||
@@ -158,5 +163,6 @@ export function uiActions(
|
||||
onSetFrameworkEventMonitored,
|
||||
onPlayPauseToggled,
|
||||
onSearchTermUpdated,
|
||||
onSetWireFrameMode,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user