Code Monkey home page Code Monkey logo

Comments (12)

zhongfq avatar zhongfq commented on May 23, 2024

先考虑一下,看一下怎么做合理

from behavior3editor.

zhongfq avatar zhongfq commented on May 23, 2024

https://github.com/zhandouxiaojiji/behavior3editor/releases/tag/v1.1.3

from behavior3editor.

GeorgeShiZZZ avatar GeorgeShiZZZ commented on May 23, 2024

谢谢大大,稍稍提个优化,我觉得查询的input上加个回车事件就更好了,然后过滤节点的时候大概率不会去查询节点的方法名称,可以把desc加入过滤的list中,感觉这样更好一点。emmm其实我感觉name,desc,input,agrs,output,path其实都应该在搜索队列里。

from behavior3editor.

zhongfq avatar zhongfq commented on May 23, 2024

谢谢大大,稍稍提个优化,我觉得查询的input上加个回车事件就更好了,然后过滤节点的时候大概率不会去查询节点的方法名称,可以把desc加入过滤的list中,感觉这样更好一点。emmm其实我感觉name,desc,input,agrs,output,path其实都应该在搜索队列里。

用回车事件触发搜索,普通 输入不触发?

from behavior3editor.

GeorgeShiZZZ avatar GeorgeShiZZZ commented on May 23, 2024

我的意思是回车事件触发跳转下一个,就是在调用下向下的那个方法,就和vscode一样

from behavior3editor.

GeorgeShiZZZ avatar GeorgeShiZZZ commented on May 23, 2024

onKeyPress={ handleKeyPress }
const handleKeyPress = (event: any) => {
if (event.key === 'Enter') {
if (results.length > 0) {
const idx = ( resultIndex + 1 ) % results.length
setResultIndex(idx)
editor.graph.focusItem(results[idx])
selectNode(results[idx])
}
}
}
大概就这个意思

from behavior3editor.

zhongfq avatar zhongfq commented on May 23, 2024

onKeyPress={ handleKeyPress } const handleKeyPress = (event: any) => { if (event.key === 'Enter') { if (results.length > 0) { const idx = ( resultIndex + 1 ) % results.length setResultIndex(idx) editor.graph.focusItem(results[idx]) selectNode(results[idx]) } } } 大概就这个意思

你可以拉测试分支,自己编译试一下

from behavior3editor.

GeorgeShiZZZ avatar GeorgeShiZZZ commented on May 23, 2024

可以了大大,很完美,先膜拜一下。大大,filterNodes方法,是否应该是组合判断,不然只能单独判断一种形式的参数,最后可以加一个node.id的过滤,只是提供建议,大大可以参考下。
2222

from behavior3editor.

zhongfq avatar zhongfq commented on May 23, 2024

可以了大大,很完美,先膜拜一下。大大,filterNodes方法,是否应该是组合判断,不然只能单独判断一种形式的参数,最后可以加一个node.id的过滤,只是提供建议,大大可以参考下。 2222

组合判断没有太大的意义,我们搜索的是节点而已,不需要高亮显示内容,所以只需要有一个满足就行了

另外要包含id的判断,你可以提一个PR,我测试一下

from behavior3editor.

GeorgeShiZZZ avatar GeorgeShiZZZ commented on May 23, 2024

大大们,给个权限。

from behavior3editor.

GeorgeShiZZZ avatar GeorgeShiZZZ commented on May 23, 2024

大大,没权限算了,提供个思路,就是共用一个搜索框,ctrl+f搜索正常参数,ctrl+g搜索节点。这样可以不用很多代码,就实现id查询。

from behavior3editor.

zhongfq avatar zhongfq commented on May 23, 2024

大大们,给个权限。

提PR不用权限的啊,在你的fork的仓库实现好,然后使用create pull request,提到上游仓库

from behavior3editor.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.