Fixed bug where we cannot move the nodes, removed unused console.logs
This commit is contained in:
parent
e34587703b
commit
1ecc1247e7
3 changed files with 3 additions and 4 deletions
|
|
@ -346,7 +346,6 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
*/
|
*/
|
||||||
function removeFlow(id: string) {
|
function removeFlow(id: string) {
|
||||||
const index = flows.findIndex((flow) => flow.id === id);
|
const index = flows.findIndex((flow) => flow.id === id);
|
||||||
console.log(index);
|
|
||||||
if (index >= 0) {
|
if (index >= 0) {
|
||||||
deleteFlowFromDatabase(id).then(() => {
|
deleteFlowFromDatabase(id).then(() => {
|
||||||
setFlows(flows.filter((flow) => flow.id !== id));
|
setFlows(flows.filter((flow) => flow.id !== id));
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,6 @@ export function UndoRedoProvider({ children }) {
|
||||||
|
|
||||||
const takeSnapshot = useCallback(() => {
|
const takeSnapshot = useCallback(() => {
|
||||||
// push the current graph to the past state
|
// push the current graph to the past state
|
||||||
console.log(past);
|
|
||||||
console.log(tabIndex);
|
|
||||||
setPast((old) => {
|
setPast((old) => {
|
||||||
let newPast = cloneDeep(old);
|
let newPast = cloneDeep(old);
|
||||||
newPast[tabIndex] = old[tabIndex].slice(
|
newPast[tabIndex] = old[tabIndex].slice(
|
||||||
|
|
|
||||||
|
|
@ -69,7 +69,6 @@ export default function Page({ flow }: { flow: FlowType }) {
|
||||||
!disableCopyPaste
|
!disableCopyPaste
|
||||||
) {
|
) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
console.log(_.cloneDeep(lastSelection));
|
|
||||||
setLastCopiedSelection(_.cloneDeep(lastSelection));
|
setLastCopiedSelection(_.cloneDeep(lastSelection));
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
|
|
@ -371,6 +370,9 @@ export default function Page({ flow }: { flow: FlowType }) {
|
||||||
onPaneMouseLeave={() => {
|
onPaneMouseLeave={() => {
|
||||||
setDisableCopyPaste(true);
|
setDisableCopyPaste(true);
|
||||||
}}
|
}}
|
||||||
|
onPaneMouseEnter={()=>{
|
||||||
|
setDisableCopyPaste(false);
|
||||||
|
}}
|
||||||
onNodesChange={onNodesChangeMod}
|
onNodesChange={onNodesChangeMod}
|
||||||
onEdgesChange={onEdgesChangeMod}
|
onEdgesChange={onEdgesChangeMod}
|
||||||
onConnect={onConnect}
|
onConnect={onConnect}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue