API Docs for:
Show:

File: view\FullScreenView.js

  1. /*
  2. * BGPlay.js #9660
  3. * A web-based service for the visualization of the Internet routing
  4. *
  5. * Copyright (c) 2012 Roma Tre University and RIPE NCC
  6. *
  7. * See the file LICENSE.txt for copying permission.
  8. */
  9.  
  10. /**
  11. * FullScreenView provides a full-screen visualization
  12. * @class FullScreenView
  13. * @module modules
  14. */
  15. var FullScreenView=Backbone.View.extend({
  16. events:{
  17. "click":"fullscreen"
  18. },
  19.  
  20. /**
  21. * The initialization method of this object.
  22. * @method initialize
  23. * @param {Map} A map of parameters
  24. */
  25. initialize:function(){
  26. this.environment=this.options.environment;
  27. this.bgplay=this.environment.bgplay;
  28. this.fileRoot=this.environment.fileRoot;
  29. this.eventAggregator=this.environment.eventAggregator;
  30.  
  31. this.eventAggregator.trigger("moduleLoading", true);
  32.  
  33. this.eventAggregator.on("destroyAll", function(){
  34. this.destroyMe();
  35. },this);
  36.  
  37. this.eventAggregator.trigger("moduleLoading", false);
  38. },
  39.  
  40. /**
  41. * This method opens the full-screen view
  42. * @method fullscreen
  43. */
  44. fullscreen:function(event){
  45. var uriContent="";
  46. var instant=this.bgplay.get("cur_instant");
  47.  
  48. uriContent = setUrlParam("unix_timestamps","TRUE",false, uriContent);
  49. uriContent = setUrlParam("starttime",this.environment.params.starttimestamp,false, uriContent);
  50. uriContent = setUrlParam("endtime",this.environment.params.endtimestamp,false, uriContent);
  51. uriContent = setUrlParam("resource",this.environment.params.targets,false, uriContent);
  52. uriContent = setUrlParam("ignoreReannouncements",this.environment.params.ignoreReannouncements,false, uriContent);
  53. uriContent = setUrlParam("instant",instant.get("id")+','+instant.get("timestamp"),false, uriContent);
  54. uriContent = setUrlParam("selectedRrcs",this.environment.params.selectedRrcs,false, uriContent);
  55.  
  56. window.open(this.environment.fullScreenVersionPosition + uriContent, 'BGPlay');
  57. }
  58. });