Commit 1c4104e08db36f8c3937ef530e173ce97ca24972
Fix: TagCloudView was getting initialized every time a user comes to the
linked-data page. Check if the view has already been initialized and
then initialize a new one if needed.
| | | | 695 | swtr.LDs.getAll({what: 'img-anno', | 695 | swtr.LDs.getAll({what: 'img-anno', |
---|
696 | success: function(data) { | 696 | success: function(data) { |
---|
697 | swtr.LDs.add(data); | 697 | swtr.LDs.add(data); |
---|
698 | this.tagCloudView = new TagCloudView({collection: swtr.LDs}); | | this.tagCloudView = new TagCloudView({collection: swtr.LDs}); |
---|
| | 698 | if(!swtr.tagCloudView) { | | | 699 | swtr.tagCloudView = new TagCloudView({collection: swtr.LDs}); |
---|
| | 700 | } |
---|
699 | }}); | 701 | }}); |
---|
700 | }, | 702 | }, |
---|
701 | destroy: function() { | 703 | destroy: function() { |
---|
702 | this.remove(); | 704 | this.remove(); |
---|
703 | | 705 | |
---|
704 | // $('#user-tag-cloud').html(''); | | // $('#user-tag-cloud').html(''); |
---|
705 | // $('#tags-tag-cloud').html(''); | | // $('#tags-tag-cloud').html(''); |
---|
706 | } | 706 | } |
---|
707 | }); | 707 | }); |
---|
708 | | 708 | |
---|