File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
packages/jaeger-ui/src/utils Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2,15 +2,22 @@ const MIN_ZOOM_LEVEL = 0.7;
22const MAX_ZOOM_LEVEL = 1.5 ;
33const ZOOM_FACTOR = 0.1 ;
44
5+ interface IChromeCSSStyleDeclaration extends CSSStyleDeclaration {
6+ zoom : number | string ;
7+ }
8+
59export default class ZoomManager {
610 zoomLevel : number ;
711
812 constructor ( ) {
9- this . zoomLevel = document . body . style . zoom || 1 ;
13+ this . zoomLevel =
14+ typeof ( document . body . style as IChromeCSSStyleDeclaration ) . zoom === 'number'
15+ ? ( ( document . body . style as IChromeCSSStyleDeclaration ) . zoom as number )
16+ : 1 ;
1017 }
1118
1219 updateStyles = ( ) => {
13- document . body . style . zoom = this . zoomLevel ;
20+ ( document . body . style as IChromeCSSStyleDeclaration ) . zoom = this . zoomLevel ;
1421 } ;
1522
1623 zoomIn = ( ) => {
You can’t perform that action at this time.
0 commit comments