您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

functions.web.js 714B

12345678910111213141516171819202122232425262728
  1. // @flow
  2. export * from './functions.any';
  3. declare var interfaceConfig: Object;
  4. /**
  5. * Helper for getting the height of the toolbox.
  6. *
  7. * @returns {number} The height of the toolbox.
  8. */
  9. export function getToolboxHeight() {
  10. const toolbox = document.getElementById('new-toolbox');
  11. return (toolbox && toolbox.clientHeight) || 0;
  12. }
  13. /**
  14. * Indicates if a toolbar button is enabled.
  15. *
  16. * @param {string} name - The name of the setting section as defined in
  17. * interface_config.js.
  18. * @returns {boolean} - True to indicate that the given toolbar button
  19. * is enabled, false - otherwise.
  20. */
  21. export function isButtonEnabled(name: string) {
  22. return interfaceConfig.TOOLBAR_BUTTONS.indexOf(name) !== -1;
  23. }