Commit baaae987 authored by Philippe Bardou's avatar Philippe Bardou
Browse files

Graph buttons : update "reset" and remove "info"

parent 8617dc64
......@@ -13542,12 +13542,24 @@ var cytoscape;
var tmpLineWidth = context.lineWidth;
context.beginPath();
context.lineWidth = 2.2;
context.lineCap = 'square';
context.strokeStyle = 'white';
context.moveTo(-4, -4);
context.lineTo( 4, 4);
context.moveTo(-4, 4);
context.lineTo( 4, -4);
context.moveTo(-3, -3);
context.lineTo( 3, 3);
context.moveTo(-3, 3);
context.lineTo( 3, -3);
context.stroke();
context.beginPath();
context.lineWidth = 1.2;
context.strokeStyle = '#333333';
context.moveTo(-4, 8);
context.lineTo(-4.5, 8);
context.lineTo(-3, 9.9);
context.lineTo(-1.5, 8);
context.lineTo(-4, 8);
context.lineTo(-3, 9);
context.stroke();
context.closePath();
context.lineWidth = tmpLineWidth;
}
......
......@@ -304,17 +304,17 @@
cy.elements().unselectify();
cy.on('mouseover', 'node', function(e){
var node = e.cyTarget;
if(node._private.data.type == 'input' || node._private.data.type == 'inputs') {
node.animate({css: {'background-opacity':'0.5'} }, {duration: 100});
if(node._private.data.type == 'component') {
node.animate({css: {'background-opacity':'0.1'} }, {duration: 100});
}
else {
node.animate({css: {'background-opacity':'0.2'} }, {duration: 100});
node.animate({css: {'background-opacity':'0.7'} }, {duration: 100});
}
});
cy.on('mouseout', 'node', function(e){
var node = e.cyTarget;
if(node._private.data.type == 'button') {
node.animate({css: {'background-opacity':'0.7'} }, {duration: 100});
node.animate({css: {'background-opacity':'0.8'} }, {duration: 100});
}
else {
node.animate({css: {'background-opacity':'1'} }, {duration: 100});
......@@ -341,16 +341,15 @@
css: {
'width': '0px',
'height': '0px',
'border-width': '0px',
'background-color': 'black',
'background-opacity' : '0.7',
'background-opacity' : '0.8',
'content': 'data(name)',
'color': '#a94451',
'shape': 'roundrectangle'
},
position: { x: (node.position().x -11), y: (node.position().y -53) }
position: { x: (node.position().x +21), y: (node.position().y -47) }
}
).animate({css: {'width': 20, 'height': 15}}, {duration: 150});
/* info button
cy.add(
{ group: "nodes",
data: { id: "info", name: "", cname: node.id(), type: "button" },
......@@ -359,14 +358,14 @@
'height': '0px',
'border-width': '0px',
'background-color': 'black',
'background-opacity' : '0.7',
'background-opacity' : '0.8',
'content': 'data(name)',
'color': '#31708f',
'shape': 'roundrectangle'
},
position: { x: (node.position().x +11), y: (node.position().y -53) }
position: { x: (node.position().x -11), y: (node.position().y -53) }
}
).animate({css: {'width': 20, 'height': 15}}, {duration: 150});
*/
cy.$("node[type = 'button']").lock();
node.lock();
}
......
Supports Markdown
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