@oicl/openbridge-webcomponents 2.0.0-next.69 → 2.0.0-next.70
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle/openbridge-webcomponents.bundle.js +17 -9
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/custom-elements.json +4 -4
- package/dist/navigation-instruments/indicator-graph/indicator-graph.d.ts +1 -0
- package/dist/navigation-instruments/indicator-graph/indicator-graph.d.ts.map +1 -1
- package/dist/navigation-instruments/indicator-graph/indicator-graph.js +17 -9
- package/dist/navigation-instruments/indicator-graph/indicator-graph.js.map +1 -1
- package/package.json +1 -1
|
@@ -218870,8 +218870,8 @@ let ObcIndicatorGraph = class extends i$4 {
|
|
|
218870
218870
|
super(...arguments);
|
|
218871
218871
|
this.data = [[], []];
|
|
218872
218872
|
this.layout = {};
|
|
218873
|
-
this.y =
|
|
218874
|
-
this.zeroLineY = 0;
|
|
218873
|
+
this.y = void 0;
|
|
218874
|
+
this.zeroLineY = void 0;
|
|
218875
218875
|
this.uplot = null;
|
|
218876
218876
|
this.resizeObserver = null;
|
|
218877
218877
|
}
|
|
@@ -218932,7 +218932,7 @@ let ObcIndicatorGraph = class extends i$4 {
|
|
|
218932
218932
|
const { min: minY, max: maxY } = this.layout.y ?? {};
|
|
218933
218933
|
const range = maxY ?? initMax - (minY ?? initMin);
|
|
218934
218934
|
let min2 = minY ?? initMin - range * 0.1;
|
|
218935
|
-
if (minY === void 0) {
|
|
218935
|
+
if (minY === void 0 && this.layout.y?.showZeroLine !== false) {
|
|
218936
218936
|
min2 = Math.min(0, min2);
|
|
218937
218937
|
}
|
|
218938
218938
|
return [min2, maxY ?? initMax + range * 0.1];
|
|
@@ -218979,7 +218979,11 @@ let ObcIndicatorGraph = class extends i$4 {
|
|
|
218979
218979
|
}
|
|
218980
218980
|
const lastY = this.data[1][this.data[1].length - 1];
|
|
218981
218981
|
const yRatio = this.uplot.scales.y.valToPct(lastY);
|
|
218982
|
-
|
|
218982
|
+
if (yRatio < 0 || yRatio > 1) {
|
|
218983
|
+
this.y = void 0;
|
|
218984
|
+
} else {
|
|
218985
|
+
this.y = yRatio * this.chart.clientHeight;
|
|
218986
|
+
}
|
|
218983
218987
|
this.updateZeroLine();
|
|
218984
218988
|
}
|
|
218985
218989
|
updateZeroLine() {
|
|
@@ -218987,6 +218991,10 @@ let ObcIndicatorGraph = class extends i$4 {
|
|
|
218987
218991
|
return;
|
|
218988
218992
|
}
|
|
218989
218993
|
const yRatio = this.uplot.scales.y.valToPct(0);
|
|
218994
|
+
if (yRatio < 0 || yRatio > 1) {
|
|
218995
|
+
this.zeroLineY = void 0;
|
|
218996
|
+
return;
|
|
218997
|
+
}
|
|
218990
218998
|
this.zeroLineY = yRatio * this.chart.clientHeight;
|
|
218991
218999
|
}
|
|
218992
219000
|
updated(changedProperties) {
|
|
@@ -219003,15 +219011,15 @@ let ObcIndicatorGraph = class extends i$4 {
|
|
|
219003
219011
|
>
|
|
219004
219012
|
<div
|
|
219005
219013
|
id="zero-line"
|
|
219006
|
-
style="transform: translateY(${-this.zeroLineY}px);
|
|
219007
|
-
display: ${this.zeroLineY
|
|
219014
|
+
style="transform: translateY(${-(this.zeroLineY ?? 0)}px);
|
|
219015
|
+
display: ${this.zeroLineY !== void 0 ? "block" : "none"};
|
|
219008
219016
|
"
|
|
219009
219017
|
></div>
|
|
219010
219018
|
<div
|
|
219011
219019
|
id="dot"
|
|
219012
|
-
style="transform: translateY(${-this.y}px);
|
|
219013
|
-
|
|
219014
|
-
|
|
219020
|
+
style="transform: translateY(${-(this.y ?? 0)}px);
|
|
219021
|
+
display: ${this.y !== void 0 ? "block" : "none"};
|
|
219022
|
+
"
|
|
219015
219023
|
></div>
|
|
219016
219024
|
</div>
|
|
219017
219025
|
`;
|