Browse Source

Added methods to re-initialize and destroy sortable

Moved attached initialization of sortable into a method and run that method on attached.
Did the same for detached and created a destroy method.
pull/801/head
AndreasGalster 9 years ago
parent
commit
4745fb294e
  1. 9
      Sortable.html

9
Sortable.html

@ -61,9 +61,10 @@
},
detached: function() {
this.sortable.destroy()
this.destroy()
},
initialize: function() {
var templates = this.querySelectorAll("template[is='dom-repeat']")
@ -122,6 +123,12 @@
},
destroy: function() {
if(this.sortable) {
this.sortable.destroy()
}
},
groupChanged : function(value) { this.sortable && this.sortable.option("group", value) },
sortChanged : function(value) { this.sortable && this.sortable.option("sort", value) },
disabledChanged : function(value) { this.sortable && this.sortable.option("disabled", value) },

Loading…
Cancel
Save