plugin/vizPlanimationPlugin.js
// Called when you click 'Go' on the file chooser
Called when you click 'Go' on the file chooser
Called when you click ' Go ' on the file chooser
function loadStatespacePlanimation() {
  var domain = window.ace.edit($('#domainPlanimationSelection').find(':selected').val()).getSession().getValue();
  var problem = window.ace.edit($('#problemPlanimationSelection').find(':selected').val()).getSession().getValue();
  var animation = window.ace.edit($('#animateSelection').find(':selected').val()).getSession().getValue();
  window.heuristicVizDomain = domain;
  window.heuristicVizProblem = problem;
  window.heuristicVizAnimation = animation;
  $('#chooseFilesVizPlanimationModel').modal('toggle');
  $('#plannerURLInput').show();
  ground(domain, problem).then(function (result) {
    treeData = { "name": "root", "children": [], "state": result.state, "strState": result.strState, "precondition": null, "loadedChildren": false };
    stateCounter = 1;
    launchVizPlanimation().then(function () {
      initialisePlanimation(domain, problem, animation);
    })
  });
}
function loadStatespacePlanimation ( ) { var domain = window . ace . edit ( $ ( '#domainPlanimationSelection' ) . find ( ':selected' ) . val ( ) ) . getSession ( ) . getValue ( ) ; var problem = window . ace . edit ( $ ( '#problemPlanimationSelection' ) . find ( ':selected' ) . val ( ) ) . getSession ( ) . getValue ( ) ; var animation = window . ace . edit ( $ ( '#animateSelection' ) . find ( ':selected' ) . val ( ) ) . getSession ( ) . getValue ( ) ; window . heuristicVizDomain = domain ; window . heuristicVizProblem = problem ; window . heuristicVizAnimation = animation ; $ ( '#chooseFilesVizPlanimationModel' ) . modal ( 'toggle' ) ; $ ( '#plannerURLInput' ) . show ( ) ; ground ( domain , problem ) . then ( function ( result ) { treeData = { "name" : "root" , "children" : [ ] , "state" : result . state , "strState" : result . strState , "precondition" : null , "loadedChildren" : false } ; stateCounter = 1 ; launchVizPlanimation ( ) . then ( function ( ) { initialisePlanimation ( domain , problem , animation ) ; } ) } ) ; }
Called when you click 'Go' on the file chooser
Called when you click ' Go ' on the file chooser
// Getting string versions of the selected files // Lowering the choose file modal menu // Ground the domain and problem // launchViz and then initialise the planimation