jerosoler / Drawflow

Simple flow library 🖥️🖱️
https://jerosoler.github.io/Drawflow/
MIT License
4.43k stars 713 forks source link

i found bug ? or disable function? ( i wann to func :: layer resize ) #695

Open Real-Dongjun-Shin opened 1 year ago

Real-Dongjun-Shin commented 1 year ago

also. i edit your code. thus. i saw you my editing code below

`case "drawflow-node": // 이전 선택된 노드가 있을 경우 선택 해제 처리 if (null != this.node_selected) { this.node_selected.classList.remove("selected"); // 현재 선택된 요소가 이전에 선택된 요소와 다른 경우, 노드 선택 해제 이벤트 발송 if (this.node_selected != this.ele_selected) { this.dispatch("nodeUnselected", true); } }

                    // 이전 선택된 커넥션이 있을 경우 선택 해제 처리
                    if (null != this.connection_selected) {
                        this.connection_selected.classList.remove("selected");
                        this.removeReouteConnectionSelected();
                        this.connection_selected = null;
                    }

                    // 현재 선택된 요소가 이전에 선택된 노드와 다른 경우, 노드 선택 이벤트 발송
                    if (this.node_selected != this.ele_selected) {
                        this.dispatch("nodeSelected", this.ele_selected.id.slice(5));
                    }

                    this.node_selected = this.ele_selected;
                    this.node_selected.classList.add("selected");

                    // 드래그 가능한 입력 요소가 활성화된 경우
                    if (this.draggable_inputs) {
                        // 선택된 요소의 태그 이름이 "SELECT"이 아닌 경우 드래그 가능 상태로 설정
                        if (e.target.tagName !== "SELECT") {
                            this.drag = true;
                        }
                    } else {
                        // 선택된 요소의 태그 이름이 "INPUT", "DIV", "TEXTAREA", "SELECT"이 아니거나 "contenteditable" 속성이 없는 경우 드래그 가능 상태로 설정
                        if (
                            e.target.tagName !== "INPUT" &&
                            e.target.tagName !== "TEXTAREA" &&
                            e.target.tagName !== "SELECT" &&
                            !e.target.hasAttribute("contenteditable")
                        ) {
                            this.drag = true;
                        }
                    }
                    if (e.target.classList.contains("selected") && e.target.classList.contains("drawflow-node")) {
                        this.drag = false;
                    }

                    break;`
jerosoler commented 1 year ago

I don't understand anything.

Can you document your problem?