maptalks / maptalks/maptalks.js

ImageLayer的半透明被设置了两次

Open
#2,404 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
4.5k
Forks
511
Avg merge
3d 58m
Merged PRs (30d)
1

Description

maptalks's version and what browser you use?

maptalks@1.0.0-rc.37

Issue description

ImageLayer设置opacity时,会出现叠加,比如设置 opacity: 0.5,实际生效的是 0.5*0.5=0.25

Please provide a reproduction URL (on any jsfiddle like site)

https://codepen.io/ydfzgyj/pen/QWPywOW

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked CodePen reproduction and trace how ImageLayer handles opacity in maptalks@1.0.0-rc.37. Compare the layer opacity with the image or renderer opacity, then verify that setting opacity to 0.5 produces an effective opacity of 0.5 rather than 0.25.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.