收藏
回答

kbone 画canvas时,ios上Y轴发生偏移?

"cid"
      class="cid"
      canvas-id="cid"
      type="2d"
      width="335"
      height="375"
    >canvas>
document
        .querySelector("#cid")
        .$$prepare()
        .then(domNode => {
          console.log(domNode);
          const ctx = domNode.getContext("2d");
          let bgImg = domNode.$_node.createImage();
          bgImg.src =
            "https://img1.qdingnet.com/zs_1560313665797.jpg?imageView2/1/w/630/h/370/q/100";
          bgImg.onload = () => {
            ctx.drawImage(bgImg, 0, 0, 335, 375);
          };
        });


开发者工具表现:正常

真机标签(ios: 13.5.1 IphoneX):Y轴发生偏移


回答关注问题邀请回答
收藏
登录 后发表内容
问题标签