-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Checking in dist/ until we publish a package.
- Loading branch information
Showing
10 changed files
with
691 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
dist/ | ||
node_modules/ | ||
|
||
yarn.lock | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { Rectangle } from "terriajs-cesium"; | ||
import { MapNavigationItemController, Terria, UserDrawing, ViewerMode } from "terriajs-plugin-api"; | ||
import BoxDrawingCatalogItem from "./BoxDrawingCatalogItem"; | ||
/** | ||
* A map navigation item that triggers a workflow for creating a 3d box by | ||
* letting the user draw a rectangle on the map. | ||
*/ | ||
export default class DrawBoxController extends MapNavigationItemController { | ||
readonly terria: Terria; | ||
/** | ||
* The icon to use for this map nav button | ||
*/ | ||
glyph: any; | ||
/** | ||
* Show the button only in 3d mode. | ||
*/ | ||
viewerMode: ViewerMode; | ||
/** | ||
* A map interaction mode that allows the user to draw shapes on the map. | ||
*/ | ||
readonly userDrawing: UserDrawing; | ||
constructor(terria: Terria); | ||
/** | ||
* Start draw mode when the map nav button is clicked. | ||
*/ | ||
activate(): void; | ||
/** | ||
* End draw mode when the map nav button is clicked. | ||
*/ | ||
deactivate(): void; | ||
/** | ||
* Create a transformable 3d box catalog item. | ||
*/ | ||
create3dBox(rectangle: Rectangle): BoxDrawingCatalogItem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { MapNavigationItemController, ViewerMode, UserDrawing, Terria } from "terriajs-plugin-api"; | ||
import { Rectangle } from "terriajs-cesium"; | ||
export default class DrawBoxController extends MapNavigationItemController { | ||
readonly terria: Terria; | ||
glyph: any; | ||
viewerMode: ViewerMode; | ||
readonly userDrawing: UserDrawing; | ||
constructor(terria: Terria); | ||
create3dBox(rectangle: Rectangle): void; | ||
activate(): void; | ||
deactivate(): void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import { Terria } from "terriajs-plugin-api"; | ||
export declare function addMapButton(terria: Terria): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { ModelTraits } from "terriajs-plugin-api"; | ||
export default class BoxDimensionsTraits extends ModelTraits { | ||
length?: number; | ||
width?: number; | ||
height?: number; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { CatalogMemberTraits, MappableTraits } from "terriajs-plugin-api"; | ||
declare const BoxDrawingCatalogItemTraits_base: import("terriajs/lib/Traits/TraitsConstructor").default<MappableTraits & CatalogMemberTraits & import("terriajs/lib/Traits/ModelTraits").default>; | ||
export default class BoxDrawingCatalogItemTraits extends BoxDrawingCatalogItemTraits_base { | ||
transformationMatrix?: number[]; | ||
} | ||
export {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Terria } from "terriajs-plugin-api"; | ||
/** | ||
* Add a map nav button for activating/deactivating the plugin workflow. | ||
*/ | ||
export declare function addMapButton(terria: Terria): void; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { TerriaPlugin } from "terriajs-plugin-api"; | ||
declare const plugin: TerriaPlugin; | ||
export default plugin; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.