|
1 | 1 | import { Multilink, Property, type TReadOnlyProperty } from "scenerystack/axon"; |
2 | 2 | import { Vector2 } from "scenerystack/dot"; |
3 | 3 | import { Shape } from "scenerystack/kite"; |
| 4 | +import { type EmptySelfOptions, optionize } from "scenerystack/phet-core"; |
4 | 5 | import { ModelViewTransform2 } from "scenerystack/phetcommon"; |
5 | 6 | import { Circle, DragListener, Node, Path, Rectangle, Text } from "scenerystack/scenery"; |
6 | 7 | import { ArrowNode, PhetFont, ResetAllButton } from "scenerystack/scenery-phet"; |
7 | | -import type { ScreenViewOptions } from "scenerystack/sim"; |
8 | | -import { ScreenView } from "scenerystack/sim"; |
| 8 | +import { ScreenView, type ScreenViewOptions } from "scenerystack/sim"; |
9 | 9 | import { Tandem } from "scenerystack/tandem"; |
10 | 10 | import { CelestialBodyNode } from "../../common/CelestialBodyNode.js"; |
11 | 11 | import { FLAT_RESET_ALL_BUTTON_OPTIONS } from "../../common/SolarSystemModelsButtonOptions.js"; |
@@ -35,16 +35,21 @@ import { PtolemaicZodiacStrip } from "./PtolemaicZodiacStrip.js"; |
35 | 35 | // Zodiac glyphs (Unicode), Aries→Pisces — matches the Flash symbol-font ring. |
36 | 36 | const ZODIAC_SIGNS = ["♈", "♉", "♊", "♋", "♌", "♍", "♎", "♏", "♐", "♑", "♒", "♓"]; |
37 | 37 |
|
| 38 | +export type PtolemaicScreenViewOptions = ScreenViewOptions; |
| 39 | + |
38 | 40 | export class PtolemaicScreenView extends ScreenView { |
39 | 41 | private readonly pathTrail: PtolemaicPathTrail; |
40 | 42 | private readonly model: PtolemaicModel; |
41 | 43 | private readonly mvtProperty: TReadOnlyProperty<ModelViewTransform2>; |
42 | 44 |
|
43 | | - public constructor(model: PtolemaicModel, options?: ScreenViewOptions) { |
44 | | - super({ |
45 | | - screenSummaryContent: new PtolemaicScreenSummaryContent(model), |
46 | | - ...options, |
47 | | - }); |
| 45 | + public constructor(model: PtolemaicModel, providedOptions?: PtolemaicScreenViewOptions) { |
| 46 | + const options = optionize<PtolemaicScreenViewOptions, EmptySelfOptions, ScreenViewOptions>()( |
| 47 | + { |
| 48 | + screenSummaryContent: new PtolemaicScreenSummaryContent(model), |
| 49 | + }, |
| 50 | + providedOptions, |
| 51 | + ); |
| 52 | + super(options); |
48 | 53 |
|
49 | 54 | this.model = model; |
50 | 55 |
|
|
0 commit comments