Comments (3)
Hi Dhaval, thanks for reporting this issue. Seem to we have problem with rgba color in src/plugins/option-color/CorlorpickerControl.js
For some reason alpha is ignoring in rgba color. That's the reason why we have black background in shapes, instead of black with full transparency when choose transparent in color picker.
ColorpickerControl.prototype.TRANSPARENT = 'rgba(0, 0, 0, 0)';
It would be nice if someone could help to fix this bug.
from drawerjs.
Hi guys!
In the file "Color.js" , when the event "_onColorSelected" is fired, "alpha" of selected color is replaced (in _hexToRgba function) by opacity value from "opacityControl", which is one when the opacity control is hidden (generally). Then the "transparent" (rgba(0,0,0,0)) turn black (rgba(0,0,0,1)).
Suggestions to fix it:
- Avoid to change alpha when:
- opacity control is hidden
- "selectedColor" is "transparent"
- ...
I fixed it avoiding changing alpha when the opacity control is hidden (definitely not the most elegant solution).
See you!
from drawerjs.
Hi Luis, thanks for contributing!
I've applied your fix and merged to master. Looks good, I didn't find any issues after applying the fix.
If you want to contribute more to the project going forward with fixes or some new features, you are free to work in your branch and create pull requests. Thanks!
Srdjan
from drawerjs.
Related Issues (20)
- Can we perform edit operations on an inserted Image on DrawerJS Canvas Editor
- How we can provide GridLine in Drawer JS library! HOT 2
- How to change mouse pointer as pencil icon for Text Box in DrawerJs Canvas
- Allowing User to Upload Image after setting a default Image
- I want to customize the project for myself. Is there anyone who can help?
- upload Image didn't work on chrome HOT 1
- Fabricjs - Shift + Click selecting more than one object on canvas. not group
- Standalone DrawerJS using API touch pen issue HOT 3
- scaleDownLargeImage of BackgroundImage's option does not work.
- Get Points data
- Integrating with Reactive App (Outsystems) HOT 12
- restore the "add it to your web page" distribution link
- How to add Custom property to objects like object Name or Object ID
- Delete object using keyboard delete key
- Next stable version
- How to use in Angular
- Hangfire database connection issue with DB2 database
- Open DrawerJs inside popup
- Using Standalone Version
- Shapes Border and Fill default Color
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drawerjs.