You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by GitBox <gi...@apache.org> on 2020/05/15 17:28:28 UTC

[GitHub] [incubator-echarts] plainheart commented on issue #12645: [Bug]cusor deviate when scale modefied by `document.body.style.zoom`

plainheart commented on issue #12645:
URL: https://github.com/apache/incubator-echarts/issues/12645#issuecomment-629384858


   It seems to be a bug, but css zoom is a non-standard method and [many browsers have a very poor compatibility for css zoom](https://caniuse.com/#feat=css-zoom) (especially in Firefox). Is it necessary to fix?
   Instead, we can use `document.body.style.transform = 'scale(1.25)'` to resolve this requirement, which is working well.([Can I Use: CSS Transform](https://caniuse.com/#search=transform))
   For IE or other browsers compatibilities, we can add browser prefix for it.
   ```js
   document.body.style.webkitTransform = 'scale(1.25)';
   document.body.style.MozTransform = 'scale(1.25)';
   document.body.style.OTransform = 'scale(1.25)';
   document.body.style.msTransform = 'scale(1.25)';
   document.body.style.transform = 'scale(1.25)';
   ```
   or just add a class for `body`
   ```css
   body {
     -ms-transform: scale(1.25);          /* IE 9 */
     -moz-transform: scale(1.25);         /* Firefox */
     -webkit-transform: scale(1.25);      /* Safari & Chrome */
     -o-transform: scale(1.25);           /* Opera */
     transform: scale(1.25);
   }
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org