question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[vega 3.0] view.on generates error

See original GitHub issue

When writing a simple custom event listener, we get the following error:

view.on(view.events('view', 'mouseover'), e => {
  console.log(e);
});

screen shot 2016-12-30 at 5 34 34 pm

It seems to come from onStream method which expects the callback to return something:

func = function(e) {
  df.touch(target(e)); // breaks when target(e) is undefined
};

If you’d like (and it is a proper fix) I can create a PR with this change:

func = function(e) {
  var t = target(e);
  if (t) {
    df.touch(t);
  }
};

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jheercommented, Jan 5, 2017

I’ve now updated the porting guide. I’ve also extended the Vega View class with new methods:

  • addEventListener / removeEventListener (for traditional input event callbacks)
  • addSignalListener / removeSignalListener (which replace the v2 onSignal / offSignal methods)
0reactions
floriboncommented, Jan 5, 2017

That’s really great, thanks a lot!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Regression | Vega-Lite
Generate a linear regression trend line that models field "y" as a function of "x" . The output data stream can then be...
Read more >
VEGA - Frequently Asked Question
The IFF files generated by VEGA ZZ 3.0.2+ are shown corrupted by the previous releases. Is it possible to fix the problem ?...
Read more >
User Manual Vega 100 Series Routers
Channel status is generated and the source label is set to “Vega”. ... See the RollCall Status page for the error details. Table...
Read more >
Vega User's Manual Issue 4
This Vega User's Manual provides essential data on the Vega launch system ... phases, the launch vehicle will determine the attitude position of...
Read more >
Vega | Kibana Guide [master]
Use Vega or Vega-Lite when you want to create visualizations with: Aggregations that use nested or parent/child mapping; Aggregations without a data view...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found