Skip to content

Commit

Permalink
fix: 删除console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
DymoneLewis authored and boyongjiong committed Feb 20, 2025
1 parent 77282ef commit 1be3304
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 12 deletions.
3 changes: 2 additions & 1 deletion packages/core/src/LogicFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -691,10 +691,11 @@ export class LogicFlow {
* @param edges
* @param distance
*/
// eslint-disable-next-line @typescript-eslint/no-unused-vars
addElements({ nodes, edges }: GraphConfigData, distance = 40): GraphElements {
// TODO: 1. 解决下面方法中 distance 传参缺未使用的问题;该方法在快捷键中有调用
// TODO: 2. review 一下本函数代码逻辑,确认 nodeIdMap 的作用,看是否有优化的空间
console.log('distance', distance)

const nodeIdMap: Record<string, string> = {}
const elements: GraphElements = {
nodes: [],
Expand Down
2 changes: 1 addition & 1 deletion packages/extension/src/bpmn-elements/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ export class BPMNElements {
constructor({ lf }: any) {
lf.definition = {}
lf.useDefinition = useDefinition(lf.definition)
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [_definition, setDefinition] = lf.useDefinition()
console.log('_definition', _definition)
setDefinition(definitionConfig)

registerEventNodes(lf)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ export function EndEventFactory(lf: any): {
const rules = super.getConnectedSourceRules()
const notAsSource = {
message: '结束节点不能作为边的起点',
// eslint-disable-next-line @typescript-eslint/no-unused-vars
validate: (source: any, _target: any) => {
console.log('_target', _target)
return source !== this
},
}
Expand Down
9 changes: 2 additions & 7 deletions packages/extension/src/dynamic-group/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ export class DynamicGroup {
const group = this.getGroupByBounds(bounds, node)
if (group) {
const isAllowAppendIn = group.isAllowAppendIn(node)
console.log('isAllowAppendIn', isAllowAppendIn)
if (isAllowAppendIn) {
group.addChild(node.id)
// 建立节点与 group 的映射关系放在了 group.addChild 触发的事件中,与直接调用 addChild 的行为保持一致
Expand All @@ -247,7 +246,6 @@ export class DynamicGroup {
data: groupData,
childId,
}: CallbackArgs<'group:add-node'>) => {
console.log('group:add-node', groupData)
this.nodeGroupMap.set(childId, groupData.id)
}

Expand Down Expand Up @@ -291,7 +289,6 @@ export class DynamicGroup {
if (!isAllowAppendIn) return

this.activeGroup = targetGroup
console.log('this.activeGroup', this.activeGroup)
this.activeGroup.setAllowAppendChild(true)
}
}
Expand Down Expand Up @@ -420,7 +417,6 @@ export class DynamicGroup {
}

onGraphRendered = ({ data }: CallbackArgs<'graph:rendered'>) => {
console.log('data', data)
forEach(data.nodes, (node) => {
if (node.children) {
forEach(node.children, (childId) => {
Expand Down Expand Up @@ -499,7 +495,7 @@ export class DynamicGroup {
})

// TODO: 确认,递归的方式,是否将所有嵌套的边数据都有返回
console.log('allRelatedEdges -->>', allRelatedEdges)
// console.log('allRelatedEdges -->>', allRelatedEdges)

// 1. 判断每一条边的开始节点、目标节点是否在 Group 中
const edgesInnerGroup = filter(allRelatedEdges, (edge) => {
Expand Down Expand Up @@ -673,7 +669,7 @@ export class DynamicGroup {
lf.on('node:mousemove', this.onNodeMove)
lf.on('graph:rendered', this.onGraphRendered)

lf.on('graph:updated', ({ data }) => console.log('data', data))
// lf.on('graph:updated', ({ data }) => console.log('data', data))

lf.on('group:add-node', this.onGroupAddNode)

Expand Down Expand Up @@ -719,7 +715,6 @@ export class DynamicGroup {
this.createEdge(edge, nodeIdMap, distance)
})

console.log('selectedEdges --->>>', selectedEdges)
forEach(selectedEdges, (edge) => {
elements.edges.push(this.createEdge(edge, nodeIdMap, distance))
})
Expand Down
1 change: 0 additions & 1 deletion packages/extension/src/materials/group/GroupNode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,6 @@ export class GroupNodeModel extends RectResizeModel {
getData() {
const data = super.getData()
data.children = []
console.log('this.children', this.children)
this.children.forEach((childId) => {
const model = this.graphModel.getNodeModelById(childId)
if (model && !model.virtual) {
Expand Down
1 change: 0 additions & 1 deletion packages/extension/src/tools/proximity-connect/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,6 @@ export class ProximityConnect {

// 设置连线阈值
public setThresholdDistance(distance: number) {
console.log('distance', distance)
if (!isFinite(distance)) return
this.thresholdDistance = distance
}
Expand Down

0 comments on commit 1be3304

Please sign in to comment.