From f5f0c67ca561da46fe5430df75c4beffc8b1ce8d Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Thu, 15 Aug 2024 10:04:12 +0100 Subject: [PATCH] Add private isZoomOutMode selector (#64503) --- packages/block-editor/src/store/private-selectors.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/block-editor/src/store/private-selectors.js b/packages/block-editor/src/store/private-selectors.js index 7f0a4c58ab674..58479d69cbfbe 100644 --- a/packages/block-editor/src/store/private-selectors.js +++ b/packages/block-editor/src/store/private-selectors.js @@ -536,3 +536,14 @@ export const getBlockStyles = createSelector( ), ] ); + +/** + * Returns whether zoom out mode is enabled. + * + * @param {Object} state Editor state. + * + * @return {boolean} Is zoom out mode enabled. + */ +export function isZoomOutMode( state ) { + return state.editorMode === 'zoom-out'; +}