Update trigger does not respect new cssClass
See original GitHub issueWhile 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:
- Created 6 years ago
- Comments:8 (4 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@neveldo I pulled down the latest, and confirmed it works as expected. Thank you.
Nice, thanks @Indigo744 for the fix !