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

fixed square black and white square bug with raphael 2.1.4 #21

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions colorwheel.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,10 +284,15 @@ Raphael.colorwheel = function(target, color_wheel_size, no_segments){
bs_square.h = canvas.rect.apply(canvas, box).attr({
stroke:"#EEE", gradient: "0-#FFF-#000", opacity:1});
bs_square.s = canvas.rect.apply(canvas, box).attr({
stroke:null, gradient: "0-#FFF-#FFF", opacity:0});
stroke:null, gradient: "0-#FFF-rgba(255,255,255,0)", opacity:0});
bs_square.b = canvas.rect.apply(canvas, box).attr({
stroke:null, gradient: "90-#000-#FFF", opacity:0});
stroke:null, gradient: "90-#000-rgba(255,255,255,0)", opacity:0});
bs_square.b.node.style.cursor = "crosshair";
// Raphael 2.1.4 does not set stop-opacity when gradient is specified with rgba
// PR https://github.com/DmitryBaranovskiy/raphael/pull/978 fixed this issue
// The following lines are a temporary fix which can be removed if the PR lands in Raphael.
$('#10-_FFF-rgba_255_255_255_0_ stop:last-child').attr('stop-opacity', 0);
$('#290-_000-rgba_255_255_255_0_ stop:last-child').attr('stop-opacity', 0);
}
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


function hue_segement_shape(){
Expand Down