Chore: spelling - theme (#24434)

* Chore: spelling - theme

* Chore: drop phantomjs comments

* Chore: remove old phantomjs hack

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
This commit is contained in:
Josh Soref
2020-06-05 04:53:57 -04:00
committed by GitHub
parent 4cf146a29d
commit 05a5a66e2f
9 changed files with 11 additions and 15 deletions

View File

@@ -482,7 +482,7 @@
drawText(
cellLayout.cx,
cellLayout.y + cellLayout.cellMargin + layout.labelMargin + cellLayout.offsetY,
"flotGagueLabel" + i,
"flotGaugeLabel" + i,
gaugeOptionsi.label.formatter ? gaugeOptionsi.label.formatter(item.label, item.data[0][1]) : text,
gaugeOptionsi.label);
}
@@ -502,7 +502,7 @@
drawText(
cellLayout.cx,
cellLayout.cy - (gaugeOptionsi.value.font.size / 2),
"flotGagueValue" + i,
"flotGaugeValue" + i,
gaugeOptionsi.value.formatter ? gaugeOptionsi.value.formatter(item.label, item.data[0][1]) : text,
gaugeOptionsi.value);
}
@@ -550,7 +550,7 @@
cellLayout.cy
+ ((layout.thresholdLabelMargin + (layout.thresholdLabelFontSize / 2) + layout.radius)
* Math.sin(toRad(a))),
"flotGagueThresholdValue" + i,
"flotGaugeThresholdValue" + i,
gaugeOptionsi.threshold.label.formatter ? gaugeOptionsi.threshold.label.formatter(value) : value,
gaugeOptionsi.threshold.label,
a);

View File

@@ -360,10 +360,10 @@ The plugin allso adds the following methods to the plot object:
// grafana addition
// In L114 this plugin is overrinding document.onselectstart handler to prevent default or custom behaviour
// Then this patch is being restored during mouseup event. But, mouseup handler is unbound when this plugin is destroyed
// and the overriden onselectstart handler is not restored. The problematic behaviour surfaces when flot is re-rendered
// and the overridden onselectstart handler is not restored. The problematic behaviour surfaces when flot is re-rendered
// as a consequence of panel's model update. When i.e. options are applied via onBlur
// event on some input which results in flot re-render. The mouseup handler should be called to resture the original handlers
// but by the time the document mouseup event occurs, the event handler is no longer there, so onselectstart is permanently overriden.
// but by the time the document mouseup event occurs, the event handler is no longer there, so onselectstart is permanently overridden.
// To fix that we are making sure that the overrides are reverted when this plugin is destroyed, the same way as they would
// via mouseup event handler (L138)