1
0

algorithm.js 949 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import * as GlobalsManagement from './globals';
  2. import * as FunctionsManagement from './functions';
  3. import { Config } from './../util/config';
  4. window.block_render = false;
  5. export function renderAlgorithm () {
  6. if (window.block_render) {
  7. return;
  8. }
  9. if (window.draging) {
  10. return;
  11. }
  12. window.block_render = true;
  13. console.log('rendering algorithm');
  14. $('.all_functions').children().off();
  15. $('.all_functions').empty();
  16. $('.list_globals').children().off();
  17. $('.list_globals').empty();
  18. for (var i = 0; i < window.program_obj.functions.length; i++) {
  19. FunctionsManagement.renderFunction(window.program_obj.functions[i]);
  20. }
  21. for (var i = 0; i < window.program_obj.globals.length; i++) {
  22. GlobalsManagement.renderGlobal(window.program_obj.globals[i]);
  23. }
  24. setTimeout(function(){ window.block_render = false; }, 100);
  25. console.log('fim do render');
  26. if (Config.isSettingEnabled("filter_active")) {
  27. blockAllEditingOptions();
  28. }
  29. }