@oicl/openbridge-webcomponents 2.0.0-next.105 → 2.0.0-next.106

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.
@@ -86094,6 +86094,15 @@
86094
86094
  "description": "",
86095
86095
  "name": "ObcPitchRoll",
86096
86096
  "members": [
86097
+ {
86098
+ "kind": "field",
86099
+ "name": "type",
86100
+ "type": {
86101
+ "text": "PitchRollType"
86102
+ },
86103
+ "description": "`dual-scale` (default) shows pitch and roll arcs on both opposing sides;\n`single-scale` shows one pitch arc on the right and one roll arc at the\nbottom, completed by a thin ring.",
86104
+ "attribute": "type"
86105
+ },
86097
86106
  {
86098
86107
  "kind": "field",
86099
86108
  "name": "pitch",
@@ -86394,6 +86403,35 @@
86394
86403
  "privacy": "private",
86395
86404
  "readonly": true
86396
86405
  },
86406
+ {
86407
+ "kind": "field",
86408
+ "name": "isSingleScale",
86409
+ "type": {
86410
+ "text": "boolean"
86411
+ },
86412
+ "privacy": "private",
86413
+ "readonly": true
86414
+ },
86415
+ {
86416
+ "kind": "method",
86417
+ "name": "renderRingComplement",
86418
+ "privacy": "private",
86419
+ "parameters": [
86420
+ {
86421
+ "name": "pitchArc",
86422
+ "type": {
86423
+ "text": "number"
86424
+ }
86425
+ },
86426
+ {
86427
+ "name": "rollArc",
86428
+ "type": {
86429
+ "text": "number"
86430
+ }
86431
+ }
86432
+ ],
86433
+ "description": "Thin ring segments completing the circle between the single-scale arcs:\none short segment between the pitch (right) and roll (bottom) arcs, and\none long segment the other way around (left and top)."
86434
+ },
86397
86435
  {
86398
86436
  "kind": "method",
86399
86437
  "name": "renderZoomedArcs",
@@ -86464,6 +86502,14 @@
86464
86502
  }
86465
86503
  ],
86466
86504
  "attributes": [
86505
+ {
86506
+ "name": "type",
86507
+ "type": {
86508
+ "text": "PitchRollType"
86509
+ },
86510
+ "description": "`dual-scale` (default) shows pitch and roll arcs on both opposing sides;\n`single-scale` shows one pitch arc on the right and one roll arc at the\nbottom, completed by a thin ring.",
86511
+ "fieldName": "type"
86512
+ },
86467
86513
  {
86468
86514
  "name": "pitch",
86469
86515
  "type": {
@@ -6,10 +6,29 @@ export declare enum PitchRollPriorityElement {
6
6
  pitch = "pitch",
7
7
  roll = "roll"
8
8
  }
9
+ export declare enum PitchRollType {
10
+ /**
11
+ * Pitch and roll arcs on both opposing sides (default). Unlike
12
+ * `obc-pitch`/`obc-roll` this is the default, because it is the historical
13
+ * behaviour of `obc-pitch-roll`.
14
+ */
15
+ dualScale = "dual-scale",
16
+ /**
17
+ * One pitch arc on the right and one roll arc at the bottom, with a thin
18
+ * ring completing the circle and rotating indicator lines in the centre.
19
+ */
20
+ singleScale = "single-scale"
21
+ }
9
22
  /**
10
23
  * @stable
11
24
  */
12
25
  export declare class ObcPitchRoll extends LitElement {
26
+ /**
27
+ * `dual-scale` (default) shows pitch and roll arcs on both opposing sides;
28
+ * `single-scale` shows one pitch arc on the right and one roll arc at the
29
+ * bottom, completed by a thin ring.
30
+ */
31
+ type: PitchRollType;
13
32
  pitch: number;
14
33
  roll: number;
15
34
  minAvgPitch: number;
@@ -79,7 +98,14 @@ export declare class ObcPitchRoll extends LitElement {
79
98
  /** Requested (clamped to a minimum) half-extent for each axis. */
80
99
  private get requestedPitchArcAngle();
81
100
  private get requestedRollArcAngle();
101
+ private get isSingleScale();
82
102
  render(): import('lit-html').TemplateResult<1>;
103
+ /**
104
+ * Thin ring segments completing the circle between the single-scale arcs:
105
+ * one short segment between the pitch (right) and roll (bottom) arcs, and
106
+ * one long segment the other way around (left and top).
107
+ */
108
+ private renderRingComplement;
83
109
  /**
84
110
  * Zoomed-arc layer: four CSS-rotated `<obc-watch>` instances, each
85
111
  * containing a single arc rendered at the watch's natural top
@@ -1 +1 @@
1
- {"version":3,"file":"pitch-roll.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/pitch-roll/pitch-roll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA0B,MAAM,KAAK,CAAC;AAExD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EACL,WAAW,EAOZ,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAYrC,oBAAY,wBAAwB;IAClC,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAqBD;;GAEG;AACH,qBACa,YAAa,SAAQ,UAAU;IAChB,KAAK,SAAK;IACV,IAAI,SAAK;IACT,WAAW,SAAK;IAChB,WAAW,SAAK;IAChB,UAAU,SAAK;IACf,UAAU,SAAK;IACf,eAAe,EAAE,WAAW,CAAuB;IACnD,eAAe,EAAE,WAAW,CAAuB;IACnD,cAAc,SAAK;IACnB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAa;IAC/C,aAAa,EAAE,MAAM,GAAG,SAAS,CAAa;IACxE,+CAA+C;IACpB,kBAAkB,UAAS;IACtD,8CAA8C;IACnB,iBAAiB,UAAS;IAC3B,QAAQ,EAAE,QAAQ,CAAoB;IAEhE,gBAAgB,EAAE,wBAAwB,EAAE,CAG1C;IACF;;;OAGG;IACwB,UAAU,EAAE,OAAO,CAAS;IACvD;;;OAGG;IACuB,UAAU,SAAW;IAC/C;;;OAGG;IACuB,SAAS,SAAU;IAC7C;;;OAGG;IACuB,IAAI,SAAS;IACvC;;;OAGG;IACuB,cAAc,SAAK;IAClB,YAAY,EAAE,OAAO,CAAS;IACzD;;;;;;OAMG;IACuB,QAAQ,EAAE,MAAM,CAAM;IAChD;;;;OAIG;IACuB,aAAa,CAAC,EAAE,MAAM,CAAC;IACjD;;;OAGG;IACuB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEhD,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,QAAQ;IAMhB,OAAO,KAAK,wBAAwB,GAKnC;IAED,kEAAkE;IAClE,OAAO,KAAK,sBAAsB,GAEjC;IACD,OAAO,KAAK,qBAAqB,GAEhC;IAEQ,MAAM;IAuFf;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,CAAC,gBAAgB;IA2SxB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IA8BlB,6DAA6D;IAC7D,OAAO,CAAC,eAAe;IA+EvB,OAAO,KAAK,OAAO,GA2ElB;IAED,OAAgB,MAAM,4BA2BpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
1
+ {"version":3,"file":"pitch-roll.d.ts","sourceRoot":"","sources":["../../../src/navigation-instruments/pitch-roll/pitch-roll.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAA0B,MAAM,KAAK,CAAC;AAExD,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EACL,WAAW,EAOZ,MAAM,mBAAmB,CAAC;AAI3B,OAAO,EAAC,QAAQ,EAAC,MAAM,aAAa,CAAC;AAYrC,oBAAY,wBAAwB;IAClC,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,oBAAY,aAAa;IACvB;;;;OAIG;IACH,SAAS,eAAe;IACxB;;;OAGG;IACH,WAAW,iBAAiB;CAC7B;AAqBD;;GAEG;AACH,qBACa,YAAa,SAAQ,UAAU;IAC1C;;;;OAIG;IACuB,IAAI,EAAE,aAAa,CAA2B;IAC9C,KAAK,SAAK;IACV,IAAI,SAAK;IACT,WAAW,SAAK;IAChB,WAAW,SAAK;IAChB,UAAU,SAAK;IACf,UAAU,SAAK;IACf,eAAe,EAAE,WAAW,CAAuB;IACnD,eAAe,EAAE,WAAW,CAAuB;IACnD,cAAc,SAAK;IACnB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAa;IAC/C,aAAa,EAAE,MAAM,GAAG,SAAS,CAAa;IACxE,+CAA+C;IACpB,kBAAkB,UAAS;IACtD,8CAA8C;IACnB,iBAAiB,UAAS;IAC3B,QAAQ,EAAE,QAAQ,CAAoB;IAEhE,gBAAgB,EAAE,wBAAwB,EAAE,CAG1C;IACF;;;OAGG;IACwB,UAAU,EAAE,OAAO,CAAS;IACvD;;;OAGG;IACuB,UAAU,SAAW;IAC/C;;;OAGG;IACuB,SAAS,SAAU;IAC7C;;;OAGG;IACuB,IAAI,SAAS;IACvC;;;OAGG;IACuB,cAAc,SAAK;IAClB,YAAY,EAAE,OAAO,CAAS;IACzD;;;;;;OAMG;IACuB,QAAQ,EAAE,MAAM,CAAM;IAChD;;;;OAIG;IACuB,aAAa,CAAC,EAAE,MAAM,CAAC;IACjD;;;OAGG;IACuB,YAAY,CAAC,EAAE,MAAM,CAAC;IAEhD,OAAO,CAAC,WAAW;IAOnB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,QAAQ;IAMhB,OAAO,KAAK,wBAAwB,GAKnC;IAED,kEAAkE;IAClE,OAAO,KAAK,sBAAsB,GAEjC;IACD,OAAO,KAAK,qBAAqB,GAEhC;IAED,OAAO,KAAK,aAAa,GAExB;IAEQ,MAAM;IAmIf;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IA2B5B;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,OAAO,CAAC,gBAAgB;IA+SxB;;;;;;OAMG;IACH,OAAO,CAAC,UAAU;IA8BlB,6DAA6D;IAC7D,OAAO,CAAC,eAAe;IA2FvB,OAAO,KAAK,OAAO,GA+ElB;IAED,OAAgB,MAAM,4BA2BpB;CACH;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,gBAAgB,EAAE,YAAY,CAAC;KAChC;CACF"}
@@ -1,6 +1,6 @@
1
1
  import { css, LitElement, nothing, svg, html } from "lit";
2
2
  import { property } from "lit/decorators.js";
3
- import { innerRingRadiusFor, WatchCircleType, OUTER_RING_RADIUS } from "../watch/watch.js";
3
+ import { OUTER_RING_RADIUS, innerRingRadiusFor, WatchCircleType } from "../watch/watch.js";
4
4
  import { TickmarkType, arcTickmarks } from "../watch/tickmark.js";
5
5
  import { AdviceState, AdviceType } from "../watch/advice.js";
6
6
  import { customElement } from "../../decorator.js";
@@ -24,12 +24,18 @@ var PitchRollPriorityElement = /* @__PURE__ */ ((PitchRollPriorityElement2) => {
24
24
  PitchRollPriorityElement2["roll"] = "roll";
25
25
  return PitchRollPriorityElement2;
26
26
  })(PitchRollPriorityElement || {});
27
+ var PitchRollType = /* @__PURE__ */ ((PitchRollType2) => {
28
+ PitchRollType2["dualScale"] = "dual-scale";
29
+ PitchRollType2["singleScale"] = "single-scale";
30
+ return PitchRollType2;
31
+ })(PitchRollType || {});
27
32
  const CENTRE_HALF = 200;
28
33
  const CORNER_GAP_PX = 32;
29
34
  const MIN_ARC_HALF_DEG = 2;
30
35
  let ObcPitchRoll = class extends LitElement {
31
36
  constructor() {
32
37
  super(...arguments);
38
+ this.type = "dual-scale";
33
39
  this.pitch = 0;
34
40
  this.roll = 0;
35
41
  this.minAvgPitch = 0;
@@ -80,6 +86,9 @@ let ObcPitchRoll = class extends LitElement {
80
86
  get requestedRollArcAngle() {
81
87
  return normalizeArcAngle(this.rollArcAngle ?? this.arcAngle, 30);
82
88
  }
89
+ get isSingleScale() {
90
+ return this.type === "single-scale";
91
+ }
83
92
  render() {
84
93
  const pitchReq = this.requestedPitchArcAngle;
85
94
  const rollReq = this.requestedRollArcAngle;
@@ -90,18 +99,6 @@ let ObcPitchRoll = class extends LitElement {
90
99
  roundOutsideCut: true,
91
100
  roundInsideCut: true
92
101
  },
93
- {
94
- startAngle: 270 - pitchReq,
95
- endAngle: 270 + pitchReq,
96
- roundOutsideCut: true,
97
- roundInsideCut: true
98
- },
99
- {
100
- startAngle: 360 - rollReq,
101
- endAngle: rollReq,
102
- roundOutsideCut: true,
103
- roundInsideCut: true
104
- },
105
102
  {
106
103
  startAngle: 180 - rollReq,
107
104
  endAngle: 180 + rollReq,
@@ -109,19 +106,75 @@ let ObcPitchRoll = class extends LitElement {
109
106
  roundInsideCut: true
110
107
  }
111
108
  ];
109
+ if (!this.isSingleScale) {
110
+ areas.push(
111
+ {
112
+ startAngle: 270 - pitchReq,
113
+ endAngle: 270 + pitchReq,
114
+ roundOutsideCut: true,
115
+ roundInsideCut: true
116
+ },
117
+ {
118
+ startAngle: 360 - rollReq,
119
+ endAngle: rollReq,
120
+ roundOutsideCut: true,
121
+ roundInsideCut: true
122
+ }
123
+ );
124
+ }
112
125
  const overlayViewBox = `-${CENTRE_HALF} -${CENTRE_HALF} ${CENTRE_HALF * 2} ${CENTRE_HALF * 2}`;
113
126
  const vesselScale = 224 / 160;
114
127
  return html`
115
128
  <div class="container">
116
129
  <svg viewBox="${overlayViewBox}">
130
+ ${this.isSingleScale && !this.zoomToFitArc ? this.renderRingComplement(pitchReq, rollReq) : nothing}
117
131
  ${this.hasReadout ? nothing : svg`
118
- <line
119
- x1="-150"
120
- y1="0"
121
- x2="150"
122
- y2="0"
123
- stroke="var(--instrument-frame-tertiary-color)"
124
- />
132
+ ${this.isSingleScale ? svg`
133
+ <line
134
+ x1=${-OUTER_RING_RADIUS}
135
+ y1="0"
136
+ x2=${OUTER_RING_RADIUS}
137
+ y2="0"
138
+ stroke="var(--instrument-frame-tertiary-color)"
139
+ />
140
+ <line
141
+ x1="0"
142
+ y1=${-OUTER_RING_RADIUS}
143
+ x2="0"
144
+ y2=${OUTER_RING_RADIUS}
145
+ stroke="var(--instrument-frame-tertiary-color)"
146
+ />
147
+ <line
148
+ x1="0"
149
+ y1="0"
150
+ x2=${OUTER_RING_RADIUS - 10}
151
+ y2="0"
152
+ stroke="${this.needleColor(
153
+ "pitch"
154
+ /* pitch */
155
+ )}"
156
+ transform="rotate(${this.pitch} 0 0)"
157
+ />
158
+ <line
159
+ x1="0"
160
+ y1="0"
161
+ x2="0"
162
+ y2=${OUTER_RING_RADIUS - 10}
163
+ stroke="${this.needleColor(
164
+ "roll"
165
+ /* roll */
166
+ )}"
167
+ transform="rotate(${this.roll} 0 0)"
168
+ />
169
+ ` : svg`
170
+ <line
171
+ x1="-150"
172
+ y1="0"
173
+ x2="150"
174
+ y2="0"
175
+ stroke="var(--instrument-frame-tertiary-color)"
176
+ />
177
+ `}
125
178
  <g
126
179
  style="transform: rotate(${this.pitch}deg) scale(${vesselScale}) translate(-80px, -80px);"
127
180
  >
@@ -164,6 +217,37 @@ let ObcPitchRoll = class extends LitElement {
164
217
  </div>
165
218
  `;
166
219
  }
220
+ /**
221
+ * Thin ring segments completing the circle between the single-scale arcs:
222
+ * one short segment between the pitch (right) and roll (bottom) arcs, and
223
+ * one long segment the other way around (left and top).
224
+ */
225
+ renderRingComplement(pitchArc, rollArc) {
226
+ const r = OUTER_RING_RADIUS;
227
+ const pt = (deg) => {
228
+ const rad = (deg - 90) * Math.PI / 180;
229
+ return [r * Math.cos(rad), r * Math.sin(rad)];
230
+ };
231
+ const segment = (from, to) => {
232
+ if (to - from <= 0) {
233
+ return nothing;
234
+ }
235
+ const [x1, y1] = pt(from);
236
+ const [x2, y2] = pt(to);
237
+ const large = to - from > 180 ? 1 : 0;
238
+ return svg`
239
+ <path
240
+ d="M ${x1} ${y1} A ${r} ${r} 0 ${large} 1 ${x2} ${y2}"
241
+ fill="none"
242
+ stroke="var(--instrument-frame-tertiary-color)"
243
+ />
244
+ `;
245
+ };
246
+ return svg`
247
+ ${segment(90 + pitchArc, 180 - rollArc)}
248
+ ${segment(180 + rollArc, 450 - pitchArc)}
249
+ `;
250
+ }
167
251
  /**
168
252
  * Zoomed-arc layer: four CSS-rotated `<obc-watch>` instances, each
169
253
  * containing a single arc rendered at the watch's natural top
@@ -355,7 +439,7 @@ let ObcPitchRoll = class extends LitElement {
355
439
  ></obc-watch>
356
440
  `;
357
441
  return html`
358
- ${subWatch(
442
+ ${this.isSingleScale ? nothing : subWatch(
359
443
  0,
360
444
  rollFrame.subArcFrame,
361
445
  rollAreas,
@@ -385,7 +469,7 @@ let ObcPitchRoll = class extends LitElement {
385
469
  rollClip,
386
470
  rollTickmarks
387
471
  )}
388
- ${subWatch(
472
+ ${this.isSingleScale ? nothing : subWatch(
389
473
  270,
390
474
  pitchFrame.subArcFrame,
391
475
  pitchAreas,
@@ -431,20 +515,7 @@ let ObcPitchRoll = class extends LitElement {
431
515
  }
432
516
  /** Full unzoomed watch — original single-instance render. */
433
517
  renderFullWatch(areas) {
434
- return html`
435
- <obc-watch
436
- .watchCircleType=${WatchCircleType.double}
437
- .zoomToFitArc=${false}
438
- .areas=${areas}
439
- .barAreas=${[
440
- {
441
- startAngle: this.minAvgRoll,
442
- endAngle: this.maxAvgRoll,
443
- fillColor: this.barColor(
444
- "roll"
445
- /* roll */
446
- )
447
- },
518
+ const barAreas = [
448
519
  {
449
520
  startAngle: 180 + this.minAvgRoll,
450
521
  endAngle: 180 + this.maxAvgRoll,
@@ -460,25 +531,9 @@ let ObcPitchRoll = class extends LitElement {
460
531
  "pitch"
461
532
  /* pitch */
462
533
  )
463
- },
464
- {
465
- startAngle: 270 + this.minAvgPitch,
466
- endAngle: 270 + this.maxAvgPitch,
467
- fillColor: this.barColor(
468
- "pitch"
469
- /* pitch */
470
- )
471
534
  }
472
- ]}
473
- .needles=${[
474
- {
475
- angle: this.roll,
476
- fillColor: this.needleColor(
477
- "roll"
478
- /* roll */
479
- ),
480
- strokeColor: "var(--border-silhouette-color)"
481
- },
535
+ ];
536
+ const needles = [
482
537
  {
483
538
  angle: 180 + this.roll,
484
539
  fillColor: this.needleColor(
@@ -494,16 +549,65 @@ let ObcPitchRoll = class extends LitElement {
494
549
  /* pitch */
495
550
  ),
496
551
  strokeColor: "var(--border-silhouette-color)"
497
- },
498
- {
499
- angle: 270 + this.pitch,
500
- fillColor: this.needleColor(
501
- "pitch"
502
- /* pitch */
503
- ),
504
- strokeColor: "var(--border-silhouette-color)"
505
552
  }
506
- ]}
553
+ ];
554
+ const tickmarks = [
555
+ { angle: 90, type: TickmarkType.main },
556
+ { angle: 180, type: TickmarkType.main },
557
+ ...arcTickmarks(90, this.requestedPitchArcAngle),
558
+ ...arcTickmarks(180, this.requestedRollArcAngle)
559
+ ];
560
+ if (!this.isSingleScale) {
561
+ barAreas.push(
562
+ {
563
+ startAngle: this.minAvgRoll,
564
+ endAngle: this.maxAvgRoll,
565
+ fillColor: this.barColor(
566
+ "roll"
567
+ /* roll */
568
+ )
569
+ },
570
+ {
571
+ startAngle: 270 + this.minAvgPitch,
572
+ endAngle: 270 + this.maxAvgPitch,
573
+ fillColor: this.barColor(
574
+ "pitch"
575
+ /* pitch */
576
+ )
577
+ }
578
+ );
579
+ needles.push(
580
+ {
581
+ angle: this.roll,
582
+ fillColor: this.needleColor(
583
+ "roll"
584
+ /* roll */
585
+ ),
586
+ strokeColor: "var(--border-silhouette-color)"
587
+ },
588
+ {
589
+ angle: 270 + this.pitch,
590
+ fillColor: this.needleColor(
591
+ "pitch"
592
+ /* pitch */
593
+ ),
594
+ strokeColor: "var(--border-silhouette-color)"
595
+ }
596
+ );
597
+ tickmarks.push(
598
+ { angle: 0, type: TickmarkType.main },
599
+ { angle: 270, type: TickmarkType.main },
600
+ ...arcTickmarks(0, this.requestedRollArcAngle),
601
+ ...arcTickmarks(270, this.requestedPitchArcAngle)
602
+ );
603
+ }
604
+ return html`
605
+ <obc-watch
606
+ .watchCircleType=${WatchCircleType.double}
607
+ .zoomToFitArc=${false}
608
+ .areas=${areas}
609
+ .barAreas=${barAreas}
610
+ .needles=${needles}
507
611
  .vessels=${this.hasReadout ? [] : [
508
612
  {
509
613
  size: VesselImageSize.large,
@@ -516,16 +620,7 @@ let ObcPitchRoll = class extends LitElement {
516
620
  transform: `rotate(${this.roll}deg) scale(${this.normalizedScaleForeImage})`
517
621
  }
518
622
  ]}
519
- .tickmarks=${[
520
- { angle: 0, type: TickmarkType.main },
521
- { angle: 90, type: TickmarkType.main },
522
- { angle: 180, type: TickmarkType.main },
523
- { angle: 270, type: TickmarkType.main },
524
- ...arcTickmarks(0, this.requestedRollArcAngle),
525
- ...arcTickmarks(180, this.requestedRollArcAngle),
526
- ...arcTickmarks(90, this.requestedPitchArcAngle),
527
- ...arcTickmarks(270, this.requestedPitchArcAngle)
528
- ]}
623
+ .tickmarks=${tickmarks}
529
624
  .advices=${this.advices}
530
625
  ></obc-watch>
531
626
  `;
@@ -552,39 +647,27 @@ let ObcPitchRoll = class extends LitElement {
552
647
  state,
553
648
  hideMaxTickmark: true
554
649
  });
555
- advices.push({
556
- minAngle: 270 - outer,
557
- maxAngle: 270 - inner,
558
- type: AdviceType.caution,
559
- state,
560
- hideMinTickmark: true
561
- });
562
- advices.push({
563
- minAngle: 270 + inner,
564
- maxAngle: 270 + outer,
565
- type: AdviceType.caution,
566
- state,
567
- hideMaxTickmark: true
568
- });
650
+ if (!this.isSingleScale) {
651
+ advices.push({
652
+ minAngle: 270 - outer,
653
+ maxAngle: 270 - inner,
654
+ type: AdviceType.caution,
655
+ state,
656
+ hideMinTickmark: true
657
+ });
658
+ advices.push({
659
+ minAngle: 270 + inner,
660
+ maxAngle: 270 + outer,
661
+ type: AdviceType.caution,
662
+ state,
663
+ hideMaxTickmark: true
664
+ });
665
+ }
569
666
  }
570
667
  if (this.maxRollAdvice !== void 0) {
571
668
  const outer = Math.min(rollReq, 45);
572
669
  const inner = Math.min(this.maxRollAdvice, outer);
573
670
  const state = this.triggerRollAdvice ? AdviceState.triggered : AdviceState.regular;
574
- advices.push({
575
- minAngle: -outer,
576
- maxAngle: -inner,
577
- type: AdviceType.caution,
578
- state,
579
- hideMinTickmark: true
580
- });
581
- advices.push({
582
- minAngle: inner,
583
- maxAngle: outer,
584
- type: AdviceType.caution,
585
- state,
586
- hideMaxTickmark: true
587
- });
588
671
  advices.push({
589
672
  minAngle: 180 - outer,
590
673
  maxAngle: 180 - inner,
@@ -599,6 +682,22 @@ let ObcPitchRoll = class extends LitElement {
599
682
  state,
600
683
  hideMaxTickmark: true
601
684
  });
685
+ if (!this.isSingleScale) {
686
+ advices.push({
687
+ minAngle: -outer,
688
+ maxAngle: -inner,
689
+ type: AdviceType.caution,
690
+ state,
691
+ hideMinTickmark: true
692
+ });
693
+ advices.push({
694
+ minAngle: inner,
695
+ maxAngle: outer,
696
+ type: AdviceType.caution,
697
+ state,
698
+ hideMaxTickmark: true
699
+ });
700
+ }
602
701
  }
603
702
  return advices;
604
703
  }
@@ -631,6 +730,9 @@ ObcPitchRoll.styles = [
631
730
  }
632
731
  `
633
732
  ];
733
+ __decorateClass([
734
+ property({ type: String })
735
+ ], ObcPitchRoll.prototype, "type", 2);
634
736
  __decorateClass([
635
737
  property({ type: Number })
636
738
  ], ObcPitchRoll.prototype, "pitch", 2);
@@ -708,6 +810,7 @@ ObcPitchRoll = __decorateClass([
708
810
  ], ObcPitchRoll);
709
811
  export {
710
812
  ObcPitchRoll,
711
- PitchRollPriorityElement
813
+ PitchRollPriorityElement,
814
+ PitchRollType
712
815
  };
713
816
  //# sourceMappingURL=pitch-roll.js.map