antvis/G6

background插件background和backgroundImage同时设置的问题 #5915

zhangsai521314 posted onGitHub

Describe the bug / 问题描述

1:当把背景图的插件设置:background和backgroundImage同时存在时会出现问题,内部是否需要backgroundImage优先于background { type: 'background', background: 'red', backgroundImage: 'url(https://mdn.alipayobjects.com/huamei_qa8qxu/afts/img/A*0Qq0ToQm1rEAAAAAAAAAAAAADmJ7AQ/original)', backgrounfRepeat: 'no-repeat', backgroundSize: 'cover', opacity: 1, } 无标题: 2:当设置背景图的opacity为1时,网格线被覆盖,网格线层级应该高于背景图吧 图片

https://stackblitz.com/edit/react-nsra7v?file=index.js

Steps to Reproduce the Bug or Issue / 重现步骤

No response

G6 Version / G6 版本

🆕 5.x

Operating System / 操作系统

Windows

Browser / 浏览器

Firefox

Additional context / 补充说明

No response


后设置的属性优先级高于先设置的属性,如果你需要 background 比 backgroundImage 优先生效,把它配置的位置放在靠后的位置

posted by Aarebecca 10 months ago

可以先通过以下方式设置: image

posted by Aarebecca 10 months ago

背景插件设置 zIndex:-1,图片被网管盖着了

posted by zhangsai521314 10 months ago

背景插件设置 zIndex:-1,图片被网格盖着了

posted by zhangsai521314 10 months ago

Fund this Issue

$0.00
Funded

Pull requests