algorithm.js 903 B

123456789101112131415161718192021222324252627282930313233343536
  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. console.log('rendering algorithm');
  13. $('.all_functions').children().off();
  14. $('.all_functions').empty();
  15. $('.list_globals').children().off();
  16. $('.list_globals').empty();
  17. for (var i = 0; i < window.program_obj.functions.length; i++) {
  18. FunctionsManagement.renderFunction(window.program_obj.functions[i]);
  19. }
  20. for (var i = 0; i < window.program_obj.globals.length; i++) {
  21. GlobalsManagement.renderGlobal(window.program_obj.globals[i]);
  22. }
  23. setTimeout(function(){ window.block_render = false; }, 100);
  24. console.log('fim do render');
  25. if (settingsFilter && settingsFilter[0]) {
  26. blockAllEditingOptions();
  27. }
  28. }