From fb24d32c887622ecb16c61006e07c7fad31fefdf Mon Sep 17 00:00:00 2001 From: blcook223 Date: Sun, 8 Mar 2015 23:46:03 -0500 Subject: [PATCH] changed names of new range selector options: FG > Foreground, BG > Background --- auto_tests/tests/range_selector.js | 8 ++++---- dygraph-options-reference.js | 8 ++++---- dygraph-utils.js | 8 ++++---- dygraph.js | 8 ++++---- plugins/range-selector.js | 8 ++++---- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/auto_tests/tests/range_selector.js b/auto_tests/tests/range_selector.js index 575cced..3349ab5 100644 --- a/auto_tests/tests/range_selector.js +++ b/auto_tests/tests/range_selector.js @@ -140,11 +140,11 @@ RangeSelectorTestCase.prototype.testAdditionalRangeSelectorOptions = function() height: 320, showRangeSelector: true, rangeSelectorHeight: 30, - rangeSelectorBGStrokeColor: 'blue', - rangeSelectorBGLineWidth: 3, + rangeSelectorBackgroundStrokeColor: 'blue', + rangeSelectorBackgroundLineWidth: 3, rangeSelectorPlotLineWidth: 0.5, - rangeSelectorFGStrokeColor: 'red', - rangeSelectorFGLineWidth: 2, + rangeSelectorForegroundStrokeColor: 'red', + rangeSelectorForegroundLineWidth: 2, rangeSelectorAlpha: 0.8, labels: ['X', 'Y'] }; diff --git a/dygraph-options-reference.js b/dygraph-options-reference.js index 57fbb97..d37251b 100644 --- a/dygraph-options-reference.js +++ b/dygraph-options-reference.js @@ -745,13 +745,13 @@ Dygraph.OPTIONS_REFERENCE = // "type": "string", "description": "The top color for the range selector mini plot fill color gradient. This can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"rgba(255,100,200,42)\" or \"yellow\". You can also specify null or \"\" to disable the gradient and fill with one single color." }, - "rangeSelectorBGStrokeColor": { + "rangeSelectorBackgroundStrokeColor": { "default": "gray", "labels": ["Interactive Elements"], "type": "string", "description": "The color of the lines below and on both sides of the range selector mini plot. This can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\"." }, - "rangeSelectorBGLineWidth": { + "rangeSelectorBackgroundLineWidth": { "default": "1", "labels": ["Interactive Elements"], "type": "float", @@ -763,13 +763,13 @@ Dygraph.OPTIONS_REFERENCE = // "type": "float", "description": "The width of the range selector mini plot line." }, - "rangeSelectorFGStrokeColor": { + "rangeSelectorForegroundStrokeColor": { "default": "black", "labels": ["Interactive Elements"], "type": "string", "description": "The color of the lines in the interactive layer of the range selector. This can be of the form \"#AABBCC\" or \"rgb(255,100,200)\" or \"yellow\"." }, - "rangeSelectorFGLineWidth": { + "rangeSelectorForegroundLineWidth": { "default": "1", "labels": ["Interactive Elements"], "type": "float", diff --git a/dygraph-utils.js b/dygraph-utils.js index f712650..eb08fef 100644 --- a/dygraph-utils.js +++ b/dygraph-utils.js @@ -904,11 +904,11 @@ var pixelSafeOptions = { 'rangeSelectorPlotFillColor': true, 'rangeSelectorPlotFillGradientColor': true, 'rangeSelectorPlotStrokeColor': true, - 'rangeSelectorBGStrokeColor': true, - 'rangeSelectorBGLineWidth': true, + 'rangeSelectorBackgroundStrokeColor': true, + 'rangeSelectorBackgroundLineWidth': true, 'rangeSelectorPlotLineWidth': true, - 'rangeSelectorFGStrokeColor': true, - 'rangeSelectorFGLineWidth': true, + 'rangeSelectorForegroundStrokeColor': true, + 'rangeSelectorForegroundLineWidth': true, 'rangeSelectorAlpha': true, 'showLabelsOnHighlight': true, 'showRoller': true, diff --git a/dygraph.js b/dygraph.js index 1e1a270..49ae2e5 100644 --- a/dygraph.js +++ b/dygraph.js @@ -338,11 +338,11 @@ Dygraph.DEFAULT_ATTRS = { rangeSelectorPlotStrokeColor: "#808FAB", rangeSelectorPlotFillGradientColor: "white", rangeSelectorPlotFillColor: "#A7B1C4", - rangeSelectorBGStrokeColor: "gray", - rangeSelectorBGLineWidth: 1, + rangeSelectorBackgroundStrokeColor: "gray", + rangeSelectorBackgroundLineWidth: 1, rangeSelectorPlotLineWidth:1.5, - rangeSelectorFGStrokeColor: "black", - rangeSelectorFGLineWidth: 1, + rangeSelectorForegroundStrokeColor: "black", + rangeSelectorForegroundLineWidth: 1, rangeSelectorAlpha: 0.6, showInRangeSelector: null, diff --git a/plugins/range-selector.js b/plugins/range-selector.js index 2f5cdb7..4c1e938 100644 --- a/plugins/range-selector.js +++ b/plugins/range-selector.js @@ -526,8 +526,8 @@ rangeSelector.prototype.drawStaticLayer_ = function() { } var margin = 0.5; - this.bgcanvas_ctx_.lineWidth = this.getOption_('rangeSelectorBGLineWidth'); - ctx.strokeStyle = this.getOption_('rangeSelectorBGStrokeColor'); + this.bgcanvas_ctx_.lineWidth = this.getOption_('rangeSelectorBackgroundLineWidth'); + ctx.strokeStyle = this.getOption_('rangeSelectorBackgroundStrokeColor'); ctx.beginPath(); ctx.moveTo(margin, margin); ctx.lineTo(margin, this.canvasRect_.h-margin); @@ -749,8 +749,8 @@ rangeSelector.prototype.drawInteractiveLayer_ = function() { var height = this.canvasRect_.h - margin; var zoomHandleStatus = this.getZoomHandleStatus_(); - ctx.strokeStyle = this.getOption_('rangeSelectorFGStrokeColor'); - ctx.lineWidth = this.getOption_('rangeSelectorFGLineWidth'); + ctx.strokeStyle = this.getOption_('rangeSelectorForegroundStrokeColor'); + ctx.lineWidth = this.getOption_('rangeSelectorForegroundLineWidth'); if (!zoomHandleStatus.isZoomed) { ctx.beginPath(); ctx.moveTo(margin, margin); -- 2.7.4