From 5f31a87b67b9eb4248af43a85e79c6994c2242a8 Mon Sep 17 00:00:00 2001 From: rozetko Date: Fri, 27 Jul 2018 12:38:13 +0300 Subject: [PATCH] Patch jquery.flot.selection: add strokeAlpha and fillAlpha options --- src/vendor/flot/jquery.flot.selection.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/vendor/flot/jquery.flot.selection.js b/src/vendor/flot/jquery.flot.selection.js index dca5964..84febc8 100644 --- a/src/vendor/flot/jquery.flot.selection.js +++ b/src/vendor/flot/jquery.flot.selection.js @@ -336,10 +336,10 @@ function ($) { 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.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, 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" color: "#e8cfac", 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',