Fixed bug where we cannot move the nodes, removed unused console.logs

This commit is contained in:
Lucas Oliveira 2023-06-16 08:37:16 -03:00
commit 1ecc1247e7
3 changed files with 3 additions and 4 deletions

View file

@ -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));

View file

@ -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(

View file

@ -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}