ElementsSidebarPane.js 991 B

123456789
  1. export default class ElementsSidebarPane extends UI.VBox{constructor(delegatesFocus){super(true,delegatesFocus);this.element.classList.add('flex-none');this._computedStyleModel=new Elements.ComputedStyleModel();this._computedStyleModel.addEventListener(Elements.ComputedStyleModel.Events.ComputedStyleChanged,this.onCSSModelChanged,this);this._updateThrottler=new Common.Throttler(100);this._updateWhenVisible=false;}
  2. node(){return this._computedStyleModel.node();}
  3. cssModel(){return this._computedStyleModel.cssModel();}
  4. doUpdate(){return Promise.resolve();}
  5. update(){this._updateWhenVisible=!this.isShowing();if(this._updateWhenVisible){return;}
  6. this._updateThrottler.schedule(innerUpdate.bind(this));function innerUpdate(){return this.isShowing()?this.doUpdate():Promise.resolve();}}
  7. wasShown(){super.wasShown();if(this._updateWhenVisible){this.update();}}
  8. onCSSModelChanged(event){}}
  9. self.Elements=self.Elements||{};Elements=Elements||{};Elements.ElementsSidebarPane=ElementsSidebarPane;