Explorar o código

restore destroyEvents/destroySelection, tho deprecated

Adam Shaw %!s(int64=10) %!d(string=hai) anos
pai
achega
926003df5c
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      src/common/View.js

+ 6 - 0
src/common/View.js

@@ -530,6 +530,9 @@ var View = fc.View = Class.extend({
 	clearEvents: function() {
 		if (this.isEventsRendered) {
 			this.triggerEventUnrender();
+			if (this.destroyEvents) {
+				this.destroyEvents(); // TODO: deprecate
+			}
 			this.unrenderEvents();
 			this.isEventsRendered = false;
 		}
@@ -794,6 +797,9 @@ var View = fc.View = Class.extend({
 	unselect: function(ev) {
 		if (this.isSelected) {
 			this.isSelected = false;
+			if (this.destroySelection) {
+				this.destroySelection(); // TODO: deprecate
+			}
 			this.unrenderSelection();
 			this.trigger('unselect', null, ev);
 		}