2013-01-10 22:01:24 -05:00
|
|
|
/*
|
|
|
|
* @file
|
|
|
|
* This file holds the Model object that is referenced in other graphsettings
|
|
|
|
* files. It lists selected nodes, selected edges, and stores data about
|
|
|
|
* double clicks on the canvas
|
|
|
|
*/
|
|
|
|
|
|
|
|
var MetamapsModel = new Object();
|
2013-02-22 18:08:03 -05:00
|
|
|
|
2013-02-19 09:44:43 -05:00
|
|
|
MetamapsModel.embed = false;
|
2013-02-22 18:08:03 -05:00
|
|
|
|
2014-06-11 16:47:46 -04:00
|
|
|
// if you're on a map, this will be an object that has a reference to each user that has loaded the map, and whether they are
|
|
|
|
// in realtime or not
|
|
|
|
MetamapsModel.mappersOnMap = {};
|
|
|
|
|
2014-06-04 15:24:16 -04:00
|
|
|
|
|
|
|
MetamapsModel.metacodeScrollerInit = false; // indicates whether the scrollbar in the custom metacode set space has been init
|
|
|
|
|
|
|
|
MetamapsModel.selectedMetacodeSet = null;
|
|
|
|
MetamapsModel.selectedMetacodeSetIndex = null;
|
|
|
|
|
|
|
|
MetamapsModel.selectedMetacodeNames = new Array();
|
|
|
|
MetamapsModel.newSelectedMetacodeNames = new Array();
|
|
|
|
|
|
|
|
MetamapsModel.selectedMetacodes = new Array();
|
|
|
|
MetamapsModel.newSelectedMetacodes = new Array();
|
|
|
|
|
2013-03-11 22:25:22 -04:00
|
|
|
//array of all selected edges, same for nodes
|
2013-01-10 22:01:24 -05:00
|
|
|
MetamapsModel.selectedEdges = new Array();
|
2013-03-11 22:25:22 -04:00
|
|
|
MetamapsModel.selectedNodes = new Array();
|
2013-02-22 18:08:03 -05:00
|
|
|
|
2013-04-26 00:07:29 -04:00
|
|
|
//this stores a value that indicates whether the user panned or simply clicked without panning
|
|
|
|
// used for purposes of knowing whether to close the open card or not (don't if panned)
|
|
|
|
MetamapsModel.didPan = false;
|
|
|
|
|
2013-02-22 18:08:03 -05:00
|
|
|
//is any showcard open right now? which one?
|
2013-02-14 22:23:14 -05:00
|
|
|
MetamapsModel.showcardInUse = null;
|
2013-03-17 05:18:30 -04:00
|
|
|
MetamapsModel.widthOfLabel = null;
|
2013-02-22 18:08:03 -05:00
|
|
|
|
2013-04-26 00:07:29 -04:00
|
|
|
//is an edge card open right now? which one (the id)?
|
|
|
|
MetamapsModel.edgecardInUse = null;
|
|
|
|
|
2013-02-22 18:08:03 -05:00
|
|
|
//is the mouse hovering over an edge? which one?
|
|
|
|
MetamapsModel.edgeHoveringOver = false;
|
|
|
|
|
2013-03-22 02:37:56 -04:00
|
|
|
//coordinates of shift click for using box select
|
|
|
|
MetamapsModel.boxStartCoordinates = false;
|
|
|
|
MetamapsModel.boxEndCoordinates = false;
|
|
|
|
|
2014-01-28 22:46:58 -05:00
|
|
|
//coordinates for drawing edge that's not created yet
|
|
|
|
MetamapsModel.synapseStartCoord = false;
|
|
|
|
MetamapsModel.synapseEndCoord = false;
|
|
|
|
|
2013-02-22 18:08:03 -05:00
|
|
|
//double clicking of nodes or canvas
|
2014-01-28 22:46:58 -05:00
|
|
|
MetamapsModel.lastSynapseClick = 0;
|
2013-02-22 18:08:03 -05:00
|
|
|
MetamapsModel.lastNodeClick = 0;
|
2013-01-10 22:01:24 -05:00
|
|
|
MetamapsModel.lastCanvasClick = 0;
|
|
|
|
MetamapsModel.DOUBLE_CLICK_TOLERANCE = 300;
|
2013-02-22 18:08:03 -05:00
|
|
|
|
|
|
|
//pop-up permission editors timers
|
2013-01-27 17:21:19 -05:00
|
|
|
MetamapsModel.edgePermTimer1 = null;
|
|
|
|
MetamapsModel.edgePermTimer2 = null;
|
|
|
|
MetamapsModel.edgePermSliding = false;
|
|
|
|
MetamapsModel.topicPermTimer1 = null;
|
|
|
|
MetamapsModel.topicPermTimer2 = null;
|
|
|
|
MetamapsModel.topicPermSliding = false;
|