Skip to content

Commit

Permalink
Merge pull request #13 from PieterT2000/patch-1
Browse files Browse the repository at this point in the history
Fix faulty table layout in drawer/README.md
  • Loading branch information
hongfaqiu authored Apr 19, 2024
2 parents 5bf33e9 + 52ec4ca commit 10afbbe
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions packages/drawer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,32 @@ drawer.start({

Here are the configurable options of `options`:

| Property | Type | Default | Description |
| ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| `terrain` | `boolean` | `false` | Whether to enable terrain mode, which requires the browser to support terrain selection. |
| `model` | `boolean` | `false` | Whether to enable draw point on model. |
| `operateType` | `{START?: EventType, MOVING?: EventType, CANCEL?: EventType, END?: EventType}` | `{ START: LEFT_CLICK, MOVING: MOUSE_MOVE, CANCEL: RIGHT_CLICK, END: LEFT_DOUBLE_CLICK }` | Operation types. |
| `dynamicGraphicsOptions` | `{POINT: PointGraphics.ConstructorOptions; POLYLINE: PolylineGraphics.ConstructorOptions; POLYGON: PolygonGraphics.ConstructorOptions; CIRCLE: EllipseGraphics.ConstructorOptions; RECTANGLE: RectangleGraphics.ConstructorOptions;}` | - | Dynamic graphics configuration when no shape has been confirmed yet. |
| `action` | `(action: EventType, move: EventArgs) => void` | - | Mouse event callback. |
| `sameStyle` | `boolean` | `true` | Whether to use the same style when drawing multiple shapes. |
| `tips` | `{init?: string or Element, start?: string or Element, end?: string or Element}` | `{ init: 'Click to draw', start: 'LeftClick to add a point, rightClick remove point, doubleClick end drawing', end: '' }` | Custom mouse movement tips during editing. |
| Property | Type | Default | Description |
|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------|
| `terrain` | `boolean` | `false` | Whether to enable terrain mode, which requires the browser to support terrain selection. |
| `model` | `boolean` | `false` | Whether to enable draw point on model. |
| `operateType` | `{START?: EventType, MOVING?: EventType, CANCEL?: EventType, END?: EventType}` | `{START: LEFT_CLICK, MOVING: MOUSE_MOVE, CANCEL: RIGHT_CLICK, END: LEFT_DOUBLE_CLICK}` | Operation types. |
| `dynamicGraphicsOptions` | `{POINT: PointGraphics.ConstructorOptions; POLYLINE: PolylineGraphics.ConstructorOptions; POLYGON: PolygonGraphics.ConstructorOptions; CIRCLE: EllipseGraphics.ConstructorOptions; RECTANGLE: RectangleGraphics.ConstructorOptions;}` | - | Dynamic graphics configuration when no shape has been confirmed yet. |
| `action` | `(action: EventType, move: EventArgs) => void` | - | Mouse event callback. |
| `sameStyle` | `boolean` | `true` | Whether to use the same style when drawing multiple shapes. |
| `tips` | `{init?: string or Element, start?: string or Element, end?: string or Element}` | `{init: 'Click to draw', start: 'LeftClick to add a point, rightClick remove point, doubleClick end drawing', end: ''}` | Custom mouse movement tips during editing. |


### StartOption

Here are the configurable options of `config`:

| Property | Type | Default | Description |
| ---------------- | --------------------------------------------------- | ----------- | -------------------------------------------------------------------- | -------- | ------------ | --- | -------------------------- |
| `type` | `'POLYGON' | 'POLYLINE' | 'POINT' | 'CIRCLE' | 'RECTANGLE'` | - | The type of shape to draw. |
| ---------------- | --------------------------------------------------- | ----------- | -------------------------------------------------------------------- |
| `type` | `'POLYGON' \| 'POLYLINE' \| 'POINT' \| 'CIRCLE' \| 'RECTANGLE'` | - | The type of shape to draw. |
| `once` | `boolean` | `undefined` | Whether to draw only once. |
| `oneInstance` | `boolean` | `false` | Whether to use singleton mode. |
| `finalOptions` | `object` | `{}` | Entity options for drawing. |
| `dynamicOptions` | `object` | `{}` | Dynamic graphics configuration when no shape has been confirmed yet. |
| `onPointsChange` | `(points: Cartesian3[]) => void` | - | Callback function for changes in points. |
| `onEnd` | `(entity: Entity, positions: Cartesian3[]) => void` | - | Callback function when drawing is completed. |


## Instance Methods

| Method | Description |
Expand Down

0 comments on commit 10afbbe

Please sign in to comment.