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.

Update trigger does not respect new cssClass

See original GitHub issue

While creating an area array, and passing it through to the update event, when new cssClasses are assigned, it is ignored.

Here is a proof of concept using the “Trigger an ‘update’ event for refreshing elements” example included.

Add a new css class: .updatedArea { fill: #00FF00; stroke: #FF0000; }

Modify the on click event: $(‘#refresh’).on(‘click’, function () {

            // Update some plots and areas attributes ...
            var updatedOptions = {'areas': {}};
            updatedOptions.areas["department-56"] = {
                tooltip: {
                    content: "Morbihan (56) (2)"
                },
				cssClass: "updatedArea",
                text: {content: "56 (2)"}
            };
           

            $(".mapcontainer").trigger('update', [{
                mapOptions: updatedOptions, 
                animDuration: 1000
            }]);
        });

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
jordanreadcommented, Oct 3, 2017

@neveldo I pulled down the latest, and confirmed it works as expected. Thank you.

0reactions
neveldocommented, Oct 4, 2017

Nice, thanks @Indigo744 for the fix !

Read more comments on GitHub >

github_iconTop Results From Across the Web

Firing events on CSS class changes in jQuery - Stack Overflow
Triggering is a mechanism that will allow certain elements to "subscribe" to an event. that way, when the event is triggered, those events...
Read more >
How to trigger a Two Step Modal using CSS Class? (Trigger ...
Click on Behavior -> Manual Launch -> Launch with CSS Class. Enter the Class name.
Read more >
CSS Class doesn't trigger on #Login - WordPress.org
But I found that with a latest update, #login does not trigger the pop up without reason, at first I thought it was...
Read more >
CSS style not applying on dynamic injected html elements
I am using Angular 2.0.0-beta.12 & D3, i am injecting D3 barchart after viewInit, and inject css in component by adding attribute "styles", ......
Read more >
Selectors - W3C
In CSS, pattern matching rules determine which style rules apply to elements in the document tree. These patterns, called selectors, may range from...
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