Skip to content

Commit

Permalink
Tweaks from review.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Sep 8, 2024
1 parent 62f2ce8 commit 6642cbb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/Core/getDataType.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import i18next from "i18next";
import { action, observable } from "mobx";
import { ReactComponentLike } from "prop-types";
import { type ComponentType } from "react";

interface DataType {
value: string;
name: string;
description?: string;
customComponent?: ReactComponentLike;
customComponent?: ComponentType;
}

export interface RemoteDataType extends DataType {}
Expand Down
6 changes: 6 additions & 0 deletions lib/ModelMixins/CesiumIonMixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@ import IonResource from "terriajs-cesium/Source/Core/IonResource";

type BaseType = Model<CesiumIonTraits & CatalogMemberTraits>;

/**
* A mixin for a model that can be loaded from Cesium ion via an `ionAssetId`. If an asset ID is supplied,
* the `ionResource` will be populated asynchronously after `loadIonResource` is called (usually from
* `forceLoadMetadata`). If defined, the resource in this property should be used as the "URL" given to
* CesiumJS instead of a regular URL.
*/
export default function CesiumIonMixin<T extends AbstractConstructor<BaseType>>(
Base: T
) {
Expand Down
5 changes: 4 additions & 1 deletion lib/ReactViews/ExplorerWindow/Tabs/MyDataTab/AddData.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import createReactClass from "create-react-class";
import { observer } from "mobx-react";
import { runInAction } from "mobx";
import PropTypes from "prop-types";
import React from "react";
import { Trans, withTranslation } from "react-i18next";
Expand Down Expand Up @@ -76,7 +77,9 @@ class AddData extends React.Component {
}

selectRemoteOption(option) {
this.props.viewState.remoteDataType = option;
runInAction(() => {
this.props.viewState.remoteDataType = option;
});
}

handleUploadFile(e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ function CesiumIonConnector() {

function renderAssetRow(asset: CesiumIonAsset) {
return (
<tr>
<tr key={asset.id}>
<td>
<ActionButton
type="button"
Expand Down

0 comments on commit 6642cbb

Please sign in to comment.