Browse Source

Pull request #2584: 无JIRA任务 feature: 增加IE9支持的vertical_fill动态布局

Merge in VISUAL/fineui from ~GUY/fineui:master to master

* commit '68584c07a1f4818a6b32dc3715e2b9204c003d7f':
  feature: 增加IE9支持的vertical_fill动态布局
es6
guy 3 years ago
parent
commit
05ede7ff00
  1. 9
      src/core/wrapper/layout/fill/auto.vtape.js

9
src/core/wrapper/layout/fill/auto.vtape.js

@ -94,6 +94,10 @@ BI.AutoVerticalTapeLayout = BI.inherit(BI.Layout, {
}, },
mounted: function () { mounted: function () {
if (window.ResizeObserver) {
this.resizeObserver = new window.ResizeObserver(this._handleResize.bind(this));
this.resizeObserver.observe(this.element[0]);
}
if (window.MutationObserver) { if (window.MutationObserver) {
this.mutationObserver = new window.MutationObserver(this._handleResize.bind(this)); this.mutationObserver = new window.MutationObserver(this._handleResize.bind(this));
this.mutationObserver.observe(this.element[0], { this.mutationObserver.observe(this.element[0], {
@ -105,6 +109,11 @@ BI.AutoVerticalTapeLayout = BI.inherit(BI.Layout, {
this._handleResize(); this._handleResize();
}, },
destroyed: function () {
this.resizeObserver && this.resizeObserver.unobserve(this.element[0]);
this.mutationObserver && this.mutationObserver.disconnect();
},
resize: function () { resize: function () {
this.layout.resize(); this.layout.resize();
}, },

Loading…
Cancel
Save