Skip to content

Commit

Permalink
[7.x] [Canvas][tech-debt] Fix SVG not shrinking vertically properly (#…
Browse files Browse the repository at this point in the history
…73867) (#73904)

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
  • Loading branch information
clintandrewhall and elasticmachine committed Jul 31, 2020
1 parent b74b8c1 commit f8d54d7
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 f8d54d7

Please sign in to comment.