MINOR Avoid applying jstree plugin multiple times when onmatch is called on CSS class changes, rather than DOM insertions

This commit is contained in:
Ingo Schommer 2012-03-06 20:17:57 +01:00
parent 0c6bc2f7a1
commit 746e3ea05e

View File

@ -12,6 +12,9 @@
onmatch: function() {
this._super();
// Don't reapply (expensive) tree behaviour if already present
if(!$.isNaN(this.data('jstree_instance_id'))) return;
var hints = this.attr('data-hints');
if(hints) this.setHints($.parseJSON(hints));