(index?: number, tooltipInstance?: MatTooltip)
| 193 | } |
| 194 | |
| 195 | toggleDensity(index?: number, tooltipInstance?: MatTooltip) { |
| 196 | if (index == null) { |
| 197 | index = (this._densityScales.indexOf(this.state.density) + 1) % this._densityScales.length; |
| 198 | } |
| 199 | |
| 200 | this.state.density = this._densityScales[index]; |
| 201 | setAppState(this.state); |
| 202 | |
| 203 | // Keep the tooltip open so we can see what the density was changed to. Ideally we'd |
| 204 | // always show the density in a badge, but the M2 badge is too large for the toolbar. |
| 205 | if (tooltipInstance) { |
| 206 | requestAnimationFrame(() => tooltipInstance.show(0)); |
| 207 | } |
| 208 | } |
| 209 | |
| 210 | toggleRippleDisabled(value = !this.state.rippleDisabled) { |
| 211 | this._rippleOptions.disabled = this.state.rippleDisabled = value; |
no test coverage detected