From 751ca9ca0716a98cf1554224c291eb6f23caed98 Mon Sep 17 00:00:00 2001 From: tengge1 <930372551@qq.com> Date: Sun, 12 May 2019 14:31:22 +0800 Subject: [PATCH] GeometryMenu --- ShadowEditor.UI/aa.html | 44 +++++++-------- ShadowEditor.UI/src/editor/MenuBar.jsx | 3 +- .../src/editor/menu/GeometryMenu.jsx | 56 +++++++++++++++++++ 3 files changed, 78 insertions(+), 25 deletions(-) create mode 100644 ShadowEditor.UI/src/editor/menu/GeometryMenu.jsx diff --git a/ShadowEditor.UI/aa.html b/ShadowEditor.UI/aa.html index fab6b881..630a3b68 100644 --- a/ShadowEditor.UI/aa.html +++ b/ShadowEditor.UI/aa.html @@ -1,26 +1,22 @@
-
Button
-
Label
-
Panel
-
Horizontal Line
-
Bar Chart
-
Time
-
Vertical Line
-
Date
-
Time Disk
-
Key Value Label
-
Form Panel
-
Gauge
-
Histogram
-
Line Chart
-
Sidebar
-
Histogram2
-
Scatter Plot
-
Pie Chart
-
Chord Graph
-
Force Directed Graph
-
Tree Diagram
-
Cluster Diagram
-
Pack Diagram
-
Partition Diagram
+
Group
+
+
Plane
+
Box
+
Circle
+
Cylinder
+
Sphere
+
Icosahedron
+
Torus
+
Torus Knot
+
Teapot
+
Lathe
+
Sprite
+
Text
+
+
Line Curve
+
CatmullRom Curve
+
QuadraticBezier Curve
+
CubicBezier Curve
+
Ellipse Curve
\ No newline at end of file diff --git a/ShadowEditor.UI/src/editor/MenuBar.jsx b/ShadowEditor.UI/src/editor/MenuBar.jsx index c20c09d9..5604cf61 100644 --- a/ShadowEditor.UI/src/editor/MenuBar.jsx +++ b/ShadowEditor.UI/src/editor/MenuBar.jsx @@ -5,6 +5,7 @@ import MenuItem from '../menu/MenuItem.jsx'; import SceneMenu from './menu/SceneMenu.jsx'; import EditMenu from './menu/EditMenu.jsx'; import TwoDMenu from './menu/TwoDMenu.jsx'; +import GeometryMenu from './menu/GeometryMenu.jsx'; /** * 菜单栏 @@ -20,7 +21,7 @@ class MenuBar extends React.Component { - + diff --git a/ShadowEditor.UI/src/editor/menu/GeometryMenu.jsx b/ShadowEditor.UI/src/editor/menu/GeometryMenu.jsx new file mode 100644 index 00000000..eaf9474f --- /dev/null +++ b/ShadowEditor.UI/src/editor/menu/GeometryMenu.jsx @@ -0,0 +1,56 @@ +import PropTypes from 'prop-types'; +import MenuItem from '../../menu/MenuItem.jsx'; +import MenuItemSeparator from '../../menu/MenuItemSeparator.jsx'; + +/** + * 几何体菜单 + * @author tengge / https://github.com/tengge1 + * @property {String} className 样式类 + * @property {Object} style 样式 + */ +class GeometryMenu extends React.Component { + constructor(props) { + super(props); + + this.handleClick = this.handleClick.bind(this); + } + + handleClick(event) { + event.stopPropagation(); + alert('Hello, world!'); + } + + render() { + const { className, style } = this.props; + + return + + + + + + + + + + + + + + + + + + + + + ; + } +} + +GeometryMenu.propTypes = { + className: PropTypes.string, + style: PropTypes.object, +}; + +export default GeometryMenu; \ No newline at end of file