Skip to content

Commit

Permalink
[Canvas][tech-debt] Fix SVG not shrinking vertically properly (#73867)
Browse files Browse the repository at this point in the history
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
clintandrewhall and elasticmachine authored Jul 30, 2020
1 parent 7e2e78b commit 18795b2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export const shape = () => ({
domNode.removeChild(oldShape);
}

domNode.style.lineHeight = 0;
domNode.appendChild(shapeSvg);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*/

import React, { useState, useEffect, useRef, FC, useCallback } from 'react';
import { useDebounce } from 'react-use';

import { useNotifyService } from '../../services';
import { RenderToDom } from '../render_to_dom';
Expand Down Expand Up @@ -73,7 +72,7 @@ export const RenderWithFn: FC<Props> = ({
firstRender.current = true;
}, [domNode]);

useDebounce(() => handlers.current.resize({ height, width }), 150, [height, width]);
useEffect(() => handlers.current.resize({ height, width }), [height, width]);

useEffect(
() => () => {
Expand Down

0 comments on commit 18795b2

Please sign in to comment.