mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-31 10:22:36 +01:00
Change default WindowPosition from center to top_left
This commit is contained in:
parent
568e7bc002
commit
1ac157637c
@ -23,7 +23,7 @@ export interface DraggableWindowProps
|
|||||||
|
|
||||||
export const DraggableWindow: FC<DraggableWindowProps> = props =>
|
export const DraggableWindow: FC<DraggableWindowProps> = props =>
|
||||||
{
|
{
|
||||||
const { uniqueKey = null, handleSelector = '.drag-handler', windowPosition = DraggableWindowPosition.CENTER, disableDrag = false, dragStyle = {}, children = null, offsetLeft = 0, offsetTop = 0 } = props;
|
const { uniqueKey = null, handleSelector = '.drag-handler', windowPosition = DraggableWindowPosition.TOP_LEFT, disableDrag = false, dragStyle = {}, children = null, offsetLeft = 0, offsetTop = 0 } = props;
|
||||||
const [ delta, setDelta ] = useState<{ x: number, y: number }>(null);
|
const [ delta, setDelta ] = useState<{ x: number, y: number }>(null);
|
||||||
const [ offset, setOffset ] = useState<{ x: number, y: number }>(null);
|
const [ offset, setOffset ] = useState<{ x: number, y: number }>(null);
|
||||||
const [ start, setStart ] = useState<{ x: number, y: number }>({ x: 0, y: 0 });
|
const [ start, setStart ] = useState<{ x: number, y: number }>({ x: 0, y: 0 });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user