Skip to content

Commit

Permalink
🔨 refactor controls, settings menu, & widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
samizdatco committed Oct 3, 2023
1 parent 55e6b2c commit 0ea43e3
Show file tree
Hide file tree
Showing 18 changed files with 1,527 additions and 1,430 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ import { FacetChart } from "../facetChart/FacetChart"
import { faExternalLinkAlt } from "@fortawesome/free-solid-svg-icons"
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome/index.js"
import {
ControlsManager,
EntitySelectorToggle,
SettingsMenu,
EntitySelectionToggle,
EntitySelectionManager,
} from "../controls/EntitySelectionToggle"
import {
MapProjectionMenu,
} from "../controls/Controls"
MapProjectionMenuManager,
} from "../controls/MapProjectionMenu"
import { SettingsMenu, SettingsMenuManager } from "../controls/SettingsMenu"
import { FooterManager } from "../footer/FooterManager"
import { HeaderManager } from "../header/HeaderManager"
import { SelectionArray } from "../selection/SelectionArray"
Expand All @@ -58,9 +61,11 @@ export interface CaptionedChartManager
MapChartManager,
FooterManager,
HeaderManager,
ControlsManager,
DataTableManager,
ContentSwitchersManager {
ContentSwitchersManager,
EntitySelectionManager,
MapProjectionMenuManager,
SettingsMenuManager {
containerElement?: HTMLDivElement
tabBounds?: Bounds
fontSize?: number
Expand Down Expand Up @@ -196,7 +201,7 @@ export class CaptionedChart extends React.Component<CaptionedChartProps> {
@computed get showControls(): boolean {
return (
SettingsMenu.shouldShow(this.manager) ||
EntitySelectorToggle.shouldShow(this.manager) ||
EntitySelectionToggle.shouldShow(this.manager) ||
MapProjectionMenu.shouldShow(this.manager)
)
}
Expand Down Expand Up @@ -268,7 +273,7 @@ export class CaptionedChart extends React.Component<CaptionedChartProps> {
)}
</div>
<div className="controls">
<EntitySelectorToggle manager={this.manager} />
<EntitySelectionToggle manager={this.manager} />
<SettingsMenu
manager={this.manager}
top={
Expand Down
Loading

0 comments on commit 0ea43e3

Please sign in to comment.