|
@@ -31,7 +31,7 @@ export interface GridItemProps {
|
|
|
|
|
|
isUserMove: Boolean
|
|
isUserMove: Boolean
|
|
|
|
|
|
- UniqueKey?: string
|
|
|
|
|
|
+ UniqueKey?: string
|
|
|
|
|
|
static?: Boolean
|
|
static?: Boolean
|
|
|
|
|
|
@@ -163,12 +163,13 @@ export default class GridItem extends React.Component<GridItemProps, {}> {
|
|
|
|
|
|
onDragStart(x: number, y: number) {
|
|
onDragStart(x: number, y: number) {
|
|
const { w, h, UniqueKey } = this.props;
|
|
const { w, h, UniqueKey } = this.props;
|
|
|
|
+
|
|
if (this.props.static) return;
|
|
if (this.props.static) return;
|
|
|
|
|
|
const { GridX, GridY } = this.calGridXY(x, y)
|
|
const { GridX, GridY } = this.calGridXY(x, y)
|
|
|
|
|
|
this.props.onDragStart && this.props.onDragStart({
|
|
this.props.onDragStart && this.props.onDragStart({
|
|
- event, GridX, GridY, w, h, UniqueKey: UniqueKey + ''
|
|
|
|
|
|
+ event: null, GridX, GridY, w, h, UniqueKey: UniqueKey + ''
|
|
})
|
|
})
|
|
}
|
|
}
|
|
onDrag(event: any, x: number, y: number) {
|
|
onDrag(event: any, x: number, y: number) {
|