wavedrom / zoom

🔍 Zoomable Waveform viewer for the Web
MIT License
43 stars 1 forks source link

Composition #6

Open drom opened 5 years ago

drom commented 5 years ago

Way to compose zoom with a custom components (plugins)

drom commented 5 years ago

from : @wifasoi #1

  • plugins: support plugins that can create/annotate metadata based on the waveform (big word for having a way to create decoder/checkers that can, for example, color the trace that trigger a condition), or generate new traces (user-case: pwm to analog, and why stopping there.. analog/digital to Fourier transform)

from : @DrSensor #1

Big +1 for extensibility via plugins. Maybe there is a need to separate Github issue for discussing plugins idea. From there we can conclude the core features that need to be implemented. I think we need to address 3 things: architecture, core features, and the common use-cases (for plugins).

DrSensor commented 5 years ago

As for custom behaviors, how about starting from basic left/right/middle click and hovering on specific areas. The question is what the context/data/payload that should be pass on :thinking:

Examples ```js zoom.on('rightclick', context => { // inspired from koajs const { i2c, a1 } = context console.log(i2c[2].time, a1.value) }) ``` Or :thinking: ```js zoom.on('hover:i2c_3', (time,value, ...something_else) => { console.log(time, value) }) ```