Skip to content

Commit

Permalink
Remove comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed Mar 1, 2021
1 parent eb214fb commit 801f614
Showing 1 changed file with 1 addition and 46 deletions.
47 changes: 1 addition & 46 deletions packages/block-library/src/paragraph/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,11 @@ import {
InspectorControls,
RichText,
useBlockProps,
//getFontSize,
__experimentalUseEditorFeature as useEditorFeature,
store as blockEditorStore,
} from '@wordpress/block-editor';
import { createBlock } from '@wordpress/blocks';
/*import { useSelect } from '@wordpress/data';
import { useEffect, useRef, useState } from '@wordpress/element';*/
import { formatLtr } from '@wordpress/icons';

/*function getComputedStyle( node, pseudo ) {
return node.ownerDocument.defaultView.getComputedStyle( node, pseudo );
}*/

const name = 'core/paragraph';

function ParagraphRTLToolbar( { direction, setDirection } ) {
Expand All @@ -50,23 +42,6 @@ function ParagraphRTLToolbar( { direction, setDirection } ) {
);
}

/*function useDropCapMinHeight( ref, isDisabled, dependencies ) {
const [ minHeight, setMinHeight ] = useState();
useEffect( () => {
if ( isDisabled ) {
setMinHeight();
return;
}
setMinHeight(
getComputedStyle( ref.current, 'first-letter' ).lineHeight
);
}, [ isDisabled, ...dependencies ] );
return minHeight;
}*/

function ParagraphBlock( {
attributes,
mergeBlocks,
Expand All @@ -75,29 +50,9 @@ function ParagraphBlock( {
setAttributes,
clientId,
} ) {
const {
align,
content,
direction,
dropCap,
placeholder,
//fontSize,
//style,
} = attributes;
const { align, content, direction, dropCap, placeholder } = attributes;
const isDropCapFeatureEnabled = useEditorFeature( 'typography.dropCap' );
/*const ref = useRef();
const inlineFontSize = style?.fontSize;
const size = useSelect(
( select ) => {
const { fontSizes } = select( blockEditorStore ).getSettings();
return getFontSize( fontSizes, fontSize, inlineFontSize ).size;
},
[ fontSize, inlineFontSize ]
);
const hasDropCap = isDropCapFeatureEnabled && dropCap;
const minHeight = useDropCapMinHeight( ref, ! hasDropCap, [ size ] ); */
const blockProps = useBlockProps( {
//ref,
className: classnames( {
'has-drop-cap': dropCap,
[ `has-text-align-${ align }` ]: align,
Expand Down

0 comments on commit 801f614

Please sign in to comment.