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) {
|
||||
const index = flows.findIndex((flow) => flow.id === id);
|
||||
console.log(index);
|
||||
if (index >= 0) {
|
||||
deleteFlowFromDatabase(id).then(() => {
|
||||
setFlows(flows.filter((flow) => flow.id !== id));
|
||||
|
|
|
|||
|
|
@ -66,8 +66,6 @@ export function UndoRedoProvider({ children }) {
|
|||
|
||||
const takeSnapshot = useCallback(() => {
|
||||
// push the current graph to the past state
|
||||
console.log(past);
|
||||
console.log(tabIndex);
|
||||
setPast((old) => {
|
||||
let newPast = cloneDeep(old);
|
||||
newPast[tabIndex] = old[tabIndex].slice(
|
||||
|
|
|
|||
|
|
@ -69,7 +69,6 @@ export default function Page({ flow }: { flow: FlowType }) {
|
|||
!disableCopyPaste
|
||||
) {
|
||||
event.preventDefault();
|
||||
console.log(_.cloneDeep(lastSelection));
|
||||
setLastCopiedSelection(_.cloneDeep(lastSelection));
|
||||
}
|
||||
if (
|
||||
|
|
@ -371,6 +370,9 @@ export default function Page({ flow }: { flow: FlowType }) {
|
|||
onPaneMouseLeave={() => {
|
||||
setDisableCopyPaste(true);
|
||||
}}
|
||||
onPaneMouseEnter={()=>{
|
||||
setDisableCopyPaste(false);
|
||||
}}
|
||||
onNodesChange={onNodesChangeMod}
|
||||
onEdgesChange={onEdgesChangeMod}
|
||||
onConnect={onConnect}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue