Commit 794deac0 authored by maxchaza's avatar maxchaza
Browse files

Merge branch 'hotfix/initButton'

parents 15624210 489f37d8
...@@ -12,6 +12,7 @@ Ext.define('metExploreViz.view.panel.viz.VizController', { ...@@ -12,6 +12,7 @@ Ext.define('metExploreViz.view.panel.viz.VizController', {
view.on({ view.on({
initiateViz : me.initiateViz, initiateViz : me.initiateViz,
initAnimationButton : me.initAnimationButton,
scope:me scope:me
}); });
...@@ -32,6 +33,14 @@ Ext.define('metExploreViz.view.panel.viz.VizController', { ...@@ -32,6 +33,14 @@ Ext.define('metExploreViz.view.panel.viz.VizController', {
view.lookupReference('handcursor').on({ view.lookupReference('handcursor').on({
click : function() { click : function() {
metExploreD3.GraphNetwork.moveGraph(); metExploreD3.GraphNetwork.moveGraph();
if(view.lookupReference('handcursor').hasCls('focus')){
view.lookupReference('handcursor').removeCls('focus');
}
else
{
view.lookupReference('handcursor').addCls('focus');
}
}, },
scope:me scope:me
}); });
...@@ -39,6 +48,7 @@ Ext.define('metExploreViz.view.panel.viz.VizController', { ...@@ -39,6 +48,7 @@ Ext.define('metExploreViz.view.panel.viz.VizController', {
view.lookupReference('rescale').on({ view.lookupReference('rescale').on({
click : function() { click : function() {
metExploreD3.GraphNetwork.rescale("viz"); metExploreD3.GraphNetwork.rescale("viz");
}, },
scope:me scope:me
}); });
...@@ -711,6 +721,24 @@ Ext.define('metExploreViz.view.panel.viz.VizController', { ...@@ -711,6 +721,24 @@ Ext.define('metExploreViz.view.panel.viz.VizController', {
viz.CtxMenu.showAt(e.clientX, e.clientY); viz.CtxMenu.showAt(e.clientX, e.clientY);
}); });
}, },
/*****************************************************
* Initialization of visualization
* @param {} vizEngine : library used to make the visualization
*/
initAnimationButton : function() {
var me = this,
viewModel = me.getViewModel(),
view = me.getView();
if(!metExploreD3.GraphNetwork.isAnimated("viz")){
view.lookupReference('animation').setIconCls('play');
}
else
{
view.lookupReference('animation').setIconCls("pause");
}
},
enterEditMode: function () { enterEditMode: function () {
metExploreD3.GraphStyleEdition.toggleEditMode(); metExploreD3.GraphStyleEdition.toggleEditMode();
//(metExploreD3.GraphStyleEdition.editMode) ? Ext.getCmp('editModePanel').show() : Ext.getCmp('editModePanel').hide(); //(metExploreD3.GraphStyleEdition.editMode) ? Ext.getCmp('editModePanel').show() : Ext.getCmp('editModePanel').hide();
......
...@@ -1468,6 +1468,7 @@ metExploreD3.GraphNetwork = { ...@@ -1468,6 +1468,7 @@ metExploreD3.GraphNetwork = {
metExploreD3.hideMask(mask); metExploreD3.hideMask(mask);
metExploreD3.fireEvent('allStylesForm', "refreshAllStyles"); metExploreD3.fireEvent('allStylesForm', "refreshAllStyles");
metExploreD3.fireEvent('viz', "initAnimationButton");
} }
catch (e) { catch (e) {
e.functionUsed="refreshViz"; e.functionUsed="refreshViz";
......
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