Browse Source

Patch jquery.flot.selection: add strokeAlpha and fillAlpha options

master
rozetko 6 years ago
parent
commit
5f31a87b67
  1. 8
      src/vendor/flot/jquery.flot.selection.js

8
src/vendor/flot/jquery.flot.selection.js vendored

@ -336,10 +336,10 @@ function ($) {
var c = $.color.parse(o.selection.color); var c = $.color.parse(o.selection.color);
ctx.strokeStyle = c.scale('a', 0.8).toString(); ctx.strokeStyle = c.scale('a', o.selection.strokeAlpha).toString();
ctx.lineWidth = 1; ctx.lineWidth = 1;
ctx.lineJoin = o.selection.shape; ctx.lineJoin = o.selection.shape;
ctx.fillStyle = c.scale('a', 0.4).toString(); ctx.fillStyle = c.scale('a', o.selection.fillAlpha).toString();
var x = Math.min(selection.first.x, selection.second.x) + 0.5, var x = Math.min(selection.first.x, selection.second.x) + 0.5,
y = Math.min(selection.first.y, selection.second.y) + 0.5, y = Math.min(selection.first.y, selection.second.y) + 0.5,
@ -370,7 +370,9 @@ function ($) {
mode: null, // one of null, "x", "y" or "xy" mode: null, // one of null, "x", "y" or "xy"
color: "#e8cfac", color: "#e8cfac",
shape: "round", // one of "round", "miter", or "bevel" shape: "round", // one of "round", "miter", or "bevel"
minSize: 5 // minimum number of pixels minSize: 5, // minimum number of pixels
strokeAlpha: 0.8,
fillAlpha: 0.4,
} }
}, },
name: 'selection', name: 'selection',

Loading…
Cancel
Save