Skip to content

纹理填充图片填充问题 #13440

@Xekin97

Description

@Xekin97

Version

4.8.0

Reproduction link

https://codesandbox.io/s/jolly-bas-tw29m?file=/src/index.js

Steps to reproduce

When using the config option 'geo.itemStyle.image', it expects to get the image dom node, it's size is fixed origin image size but not the dom node size.

在配置 geo.itemStyle.image 时,要求配置的是图片的 Dom 节点,但是引入到 Canvas 却固定是图片的尺寸而不是 Dom 节点的尺寸。

What is expected?

Render the image using the browser's visual size.

我们希望可以使用浏览器的 可视宽高 渲染纹理image。

What is actually happening?

Although 'image' is passed in the corresponding image dom node, it still USES the full size of the image file when it is rendered to Canvas.

image 虽然传入的是对应的图片 Dom 节点,但渲染到 Canvas 时仍旧使用了图片文件的原尺寸。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugenThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.staleInactive for a long time. Will be closed in 7 days.waiting-for: community

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions