Closed flexphperia closed 9 years ago
Thanks for the report, I also added a new example to test this issue, you can find it on the examples
folder, file 05-destroy.html
.
Now it looks good but, now when calling destroy
when createElements = false
references to document and window are not cleaned.
I'm not sure that I want gm-prevented
added to my container after destroy. Maybe destroy method should get one parameter to remove everything or not?
Another problem is that when when createElements = false
in create
method plugin re aranges my scrollbar and view divs because it still calls:
this.element.appendChild(this._scrollbarVerticalElement);
this.element.appendChild(this._scrollbarHorizontalElement);
this.element.appendChild(this._viewElement);
Hey @flexphperia, just fixed those issues on this commit fdd8b4c.
No more gm-prevented
added after calling destroy
, no more elements appended on the create
method if createElements
option is false
and document and window references are now cleaned on destroy
.
Thanks!
@noeldelgado references still not cleared when SCROLLBAR_WIDTH === 0
Also there should be: this._viewElement = this.element = null;
When
createElements
option is set tofalse
plugin should not destroy scrollbar and view div's when calleddestroy()
method.