Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Canvas source not respecting alpha values set on canvas element #7302

Closed
ryanhamley opened this issue Sep 20, 2018 · 0 comments
Closed

Canvas source not respecting alpha values set on canvas element #7302

ryanhamley opened this issue Sep 20, 2018 · 0 comments
Assignees
Labels

Comments

@ryanhamley
Copy link
Contributor

mapbox-gl-js version:
post-v0.49.0 (this bug has not hit a release yet but is reproducible on master)

browser:
any

Steps to Trigger Behavior

  1. Draw/render image on a canvas element with some alpha transparency
  2. Add canvas element to a canvas source

Link to Demonstration

https://codepen.io/rsh412/pen/ZMVNJq?editors=1010#0

Note that this is an example of the canvas source working as expected. I can't get a buggy example to work in JSBin or Codepen because the bug isn't in a release. But at least this shows a testable setup.

Expected Behavior

Canvas source should render alpha transparency set by canvas element

Actual Behavior

Canvas source renders alpha channel with opacity of 1

v0.49.0 (correct alpha opacity)
screen shot 2018-09-19 at 5 20 13 pm

master (incorrect alpha opacity)
screen shot 2018-09-19 at 5 20 43 pm

git bisect points to something in #7039 as the culprit. cc @ansis

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants