Commit 444eca0b authored by maxchaza's avatar maxchaza
Browse files

set panel mask target

parent 2779d7b8
......@@ -27,7 +27,6 @@ Ext.define('metExploreViz.view.button.buttonImportToNetwork.ButtonImportToNetwor
// Allows to reload the same file
metExploreD3.GraphPanel.refreshPanel(json, function(){
view.lookupReference('importNetwork').reset();
metExploreD3.hideInitialMask();
});
});
},
......
......@@ -39,9 +39,7 @@ Ext.define('metExploreViz.view.menu.viz_LoadMenu.Viz_LoadMenuController', {
view.lookupReference('loadNetworkFromWebsite').on({
click : function(){
metExploreD3.GraphPanel.refreshPanel(_metExploreViz.getDataFromWebSite(), function () {
metExploreD3.hideInitialMask();
});
metExploreD3.GraphPanel.refreshPanel(_metExploreViz.getDataFromWebSite());
},
scope : me
});
......
......@@ -101,9 +101,7 @@ Ext.define('metExploreViz.view.panel.networkPanel.NetworkPanelController', {
hidden:false,
style:'margin : 10px 10px 10px 10px',
handler: function(){
metExploreD3.GraphPanel.refreshPanel(_metExploreViz.getDataFromWebSite(),function(){
mask.hide();
});
metExploreD3.GraphPanel.refreshPanel(_metExploreViz.getDataFromWebSite());
},
listeners: {
hideInitialLoadButtons: function(){
......
......@@ -11,6 +11,10 @@ x-form-checkbox-default {
background-position: 50% 45%;;
}
.x-mask {
background-color: rgba(208,208,208,0.8);
}
.msgClsCustomLoadMask .x-mask-msg-inner{
position:relative;
height: 100%;
......
......@@ -1077,7 +1077,7 @@ metExploreD3.GraphFunction = {
else extract();
function extract(){
var myMask = metExploreD3.createLoadMask("Keep only subnetwork...", 'viz');
var myMask = metExploreD3.createLoadMask("Keep only subnetwork...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1170,7 +1170,7 @@ metExploreD3.GraphFunction = {
*/
highlightSubnetwork : function(nodeToLink) {
var session = _metExploreViz.getSessionById('viz');
var myMask = metExploreD3.createLoadMask("Highlight Subnetwork...", 'viz');
var myMask = metExploreD3.createLoadMask("Highlight Subnetwork...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......
......@@ -72,7 +72,7 @@ metExploreD3.GraphMapping = {
var session = _metExploreViz.getSessionById('viz');
var force = session.getForce();
force.stop();
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
setTimeout(
......@@ -206,7 +206,7 @@ metExploreD3.GraphMapping = {
* This function will assignmapping value to each nodes in datas
*/
mapNodeData: function(mapping, lines) {
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -423,7 +423,7 @@ metExploreD3.GraphMapping = {
});
session.nodesMap = [];
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
var mapping = _metExploreViz.getMappingByName(mappingName);
if(myMask!= undefined){
......@@ -711,7 +711,7 @@ metExploreD3.GraphMapping = {
*/
parseFluxValues : function(mappingName, aStyleFormParent) {
var mapping = _metExploreViz.getMappingByName(mappingName);
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
......@@ -797,7 +797,7 @@ metExploreD3.GraphMapping = {
var session = _metExploreViz.getSessionById('viz');
var force = session.getForce();
force.stop();
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -914,7 +914,7 @@ metExploreD3.GraphMapping = {
metExploreD3.onloadMapping(mappingName, function(){
var mapping = _metExploreViz.getMappingByName(mappingName);
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1085,7 +1085,7 @@ metExploreD3.GraphMapping = {
metExploreD3.onloadMapping(mappingName, function(){
var mapping = _metExploreViz.getMappingByName(mappingName);
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1336,7 +1336,7 @@ metExploreD3.GraphMapping = {
var conditionName = condition.split("_")[1];
metExploreD3.onloadMapping(mappingName, function(){
var mapping = _metExploreViz.getMappingByName(mappingName);
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1513,7 +1513,7 @@ metExploreD3.GraphMapping = {
var session = metExploreD3.getSessionById(networkVizSessionStore, 'viz');
var force = session.getForce();
force.stop();
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1568,7 +1568,7 @@ metExploreD3.GraphMapping = {
var session = _metExploreViz.getSessionById('viz');
var force = session.getForce();
force.stop();
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1781,7 +1781,7 @@ metExploreD3.GraphMapping = {
var session = _metExploreViz.getSessionById('viz');
var force = session.getForce();
force.stop();
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1816,7 +1816,7 @@ metExploreD3.GraphMapping = {
metExploreD3.onloadMapping(mappingName, function(){
var mapping = _metExploreViz.getMappingByName(mappingName);
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -2003,7 +2003,7 @@ metExploreD3.GraphMapping = {
var session = _metExploreViz.getSessionById('viz');
var force = session.getForce();
force.stop();
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -2156,7 +2156,7 @@ metExploreD3.GraphMapping = {
var session = _metExploreViz.getSessionById('viz');
var force = session.getForce();
force.stop();
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -2211,7 +2211,7 @@ metExploreD3.GraphMapping = {
var session = _metExploreViz.getSessionById('viz');
var force = session.getForce();
force.stop();
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'viz');
var myMask = metExploreD3.createLoadMask("Mapping in progress...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......
......@@ -194,7 +194,14 @@ metExploreD3.GraphPanel = {
var vizComp = Ext.getCmp("viz");
if(vizComp!=undefined){
var myMask = metExploreD3.createLoadMask("Refresh in process...", 'viz');
var panel;
console.log(Ext.getCmp("maskInit"));
if(Ext.getCmp("maskInit").isHidden())
panel = 'graphPanel';
else
panel = "maskInit";
console.log(panel);
var myMask = metExploreD3.createLoadMask("Refresh in process...", panel);
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -223,7 +230,7 @@ metExploreD3.GraphPanel = {
metExploreD3.fireEvent('graphPanel', 'afterrefresh');*/
function end(){
metExploreD3.hideMask(myMask);
metExploreD3.hideInitialMask();
metExploreD3.fireEvent('graphPanel', 'afterrefresh');
if(metExploreD3.isNewBioSource()){
metExploreD3.hideInitialMask();
......
......@@ -340,7 +340,7 @@ metExploreD3.GraphUtils = {
var emptySvg = window.document.createElementNS(prefix.svg, 'svg');
window.document.body.appendChild(emptySvg);
var emptySvgDeclarationComputed = getComputedStyle(emptySvg);
var myMask = metExploreD3.createLoadMask("Export initialization...", 'viz');
var myMask = metExploreD3.createLoadMask("Export initialization...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1222,7 +1222,7 @@ clone.setAttribute("version", "1.1");
},
saveNetworkDot : function() {
var myMask = metExploreD3.createLoadMask("Export DOT file...", 'viz');
var myMask = metExploreD3.createLoadMask("Export DOT file...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1319,7 +1319,7 @@ clone.setAttribute("version", "1.1");
* Retrieve all necessary data to load saved visualization
*/
saveNetworkJSON : function() {
var myMask = metExploreD3.createLoadMask("Saving...", 'viz');
var myMask = metExploreD3.createLoadMask("Saving...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1573,7 +1573,7 @@ clone.setAttribute("version", "1.1");
* Save nodes coordinates
*/
saveNetworkCoordinates : function() {
var myMask = metExploreD3.createLoadMask("Saving...", 'viz');
var myMask = metExploreD3.createLoadMask("Saving...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1660,7 +1660,7 @@ clone.setAttribute("version", "1.1");
* Save nodes coordinates
*/
saveStyles : function(scaleRange, all) {
var myMask = metExploreD3.createLoadMask("Saving...", 'viz');
var myMask = metExploreD3.createLoadMask("Saving...", 'graphPanel');
if(myMask!= undefined){
metExploreD3.showMask(myMask);
......@@ -1747,7 +1747,7 @@ clone.setAttribute("version", "1.1");
},
saveNetworkGml : function() {
var myMask = metExploreD3.createLoadMask("Export GML file...", 'viz');
var myMask = metExploreD3.createLoadMask("Export GML file...", 'graphPanel');
if(myMask!==undefined){
metExploreD3.showMask(myMask);
......@@ -1866,7 +1866,7 @@ clone.setAttribute("version", "1.1");
saveCyclesList : function () {
var allDrawnCycles = metExploreD3.GraphStyleEdition.allDrawnCycles;
if ( metExploreD3.GraphStyleEdition.allDrawnCycles.length) {
var myMask = metExploreD3.createLoadMask("Saving...", 'viz');
var myMask = metExploreD3.createLoadMask("Saving...", 'graphPanel');
if (myMask != undefined) {
metExploreD3.showMask(myMask);
......
......@@ -609,10 +609,11 @@ var metExploreD3 = {
* @param {} component : The panel where is displayed the mask
*/
createLoadMask : function(label, component){
if(component!='viz')
if(component!='viz' && component!='graphPanel' && component!='maskInit')
var panelComponent = component.substring(0, component.length-5);
else
var panelComponent = component;
if(panelComponent!= undefined){
return new Ext.LoadMask({
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment