algorithm.js 835 B

12345678910111213141516171819202122232425262728293031323334
  1. import * as GlobalsManagement from './globals';
  2. import * as FunctionsManagement from './functions';
  3. window.block_render = false;
  4. export function renderAlgorithm () {
  5. if (window.block_render) {
  6. return;
  7. }
  8. if (window.draging) {
  9. return;
  10. }
  11. window.block_render = true;
  12. $('.all_functions').children().off();
  13. $('.all_functions').empty();
  14. $('.list_globals').children().off();
  15. $('.list_globals').empty();
  16. for (var i = 0; i < window.program_obj.functions.length; i++) {
  17. FunctionsManagement.renderFunction(window.program_obj.functions[i]);
  18. }
  19. for (var i = 0; i < window.program_obj.globals.length; i++) {
  20. GlobalsManagement.renderGlobal(window.program_obj.globals[i]);
  21. }
  22. setTimeout(function(){ window.block_render = false; }, 100);
  23. if (settingsFilter && settingsFilter[0]) {
  24. blockAllEditingOptions();
  25. }
  26. }