Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
description="RectangleGraphics!!"
position={Cartesian3.fromDegrees(-74.0707383, 40.7117244, 100)}>
onMiddleDown={action("onMiddleDown")}
onMiddleUp={action("onMiddleUp")}
// onMouseMove={action("onMouseMove")}
onPinchEnd={action("onPinchEnd")}
onPinchMove={action("onPinchMove")}
onPinchStart={action("onPinchStart")}
onRightClick={action("onRightClick")}
onRightDown={action("onRightDown")}
onRightUp={action("onRightUp")}
onWheel={action("onWheel")}
onMouseEnter={action("onMouseEnter")}
onMouseLeave={action("onMouseLeave")}>
));
import React from "react";
import { Cartesian3, Color, Transforms } from "cesium";
import { storiesOf } from "@storybook/react";
import { action } from "@storybook/addon-actions";
import Viewer from "../Viewer";
import Billboard from "./Billboard";
import BillboardCollection from "../BillboardCollection";
const center = Cartesian3.fromDegrees(-75.59777, 40.03883);
import exampleImg from "assets/example.png";
storiesOf("Billboard", module)
.add("Basic", () => (
.add("Graphics", () => (
getChinaPostion() {
return Cartesian3.fromDegrees(116.435314, 40.960521, 10000000.0);
},
/**
.add("Description", () => {
const [count, setCount] = useState(0);
return (
<h1>Hello!</h1>
<p>This is description. It can be described with static JSX!</p>
<h1>Hello!</h1>
<p>This is description. It can be described with React!</p>
<button> setCount(i => i + 1)}>counter: {count}</button>
.add("Basic", () => (
))
.add("Events", () => (
import React from "react";
import { Cartesian3 } from "cesium";
import { Viewer, Entity } from "cesium-react";
const positions = [
Cartesian3.fromDegrees(-74.0707383, 40.7117244, 100),
Cartesian3.fromDegrees(139.767052, 35.681167, 100),
];
export default class SimpleEntity extends React.PureComponent {
state = {
pos: 0,
};
changePosition(pos) {
this.setState({ pos });
}
render() {
const { pos } = this.state;
return (
.add("Basic", () => (
.add("Basic", () => (
))
.add("Once", () => {