clientIO / JointJS_plus

JointJS+ support
4 stars 9 forks source link

joint.ui.SelectionView bug fix #56

Closed kmansel closed 9 years ago

kmansel commented 9 years ago

Starting in the remove function (around line 525 in the clean version)

You are missing an event un-registration function, and since you weren't including the function in the .off() call, two different selection views would unregister each other's event listeners.

Old Code :

remove: function() {

        Backbone.View.prototype.remove.apply(this, arguments);
        $(document.body).off('.selectionView');
    },

New Proposed Code :

remove: function() {

        Backbone.View.prototype.remove.apply(this, arguments);
        $(document.body).off('.selectionView', this.adjustSelection);
        $(document).off('.selectionView', this.pointerup);
    },
kumilingus commented 9 years ago

Fixed. Available in the next release. Thank You.