|
From: <ma...@us...> - 2011-02-04 19:54:05
|
Revision: 276
http://openautomation.svn.sourceforge.net/openautomation/?rev=276&view=rev
Author: mayerch
Date: 2011-02-04 19:53:58 +0000 (Fri, 04 Feb 2011)
Log Message:
-----------
Add stub at the connection target
Modified Paths:
--------------
PyWireGate/trunk/logic_editor/backendCommunication.js
PyWireGate/trunk/logic_editor/gle/gle.block.js
PyWireGate/trunk/logic_editor/gle/gle.connection.js
Modified: PyWireGate/trunk/logic_editor/backendCommunication.js
===================================================================
--- PyWireGate/trunk/logic_editor/backendCommunication.js 2011-02-04 17:45:32 UTC (rev 275)
+++ PyWireGate/trunk/logic_editor/backendCommunication.js 2011-02-04 19:53:58 UTC (rev 276)
@@ -159,8 +159,8 @@
var c = Math.cos( angle );
return [ { x: x + width * 0.5 * ( 1 + c ),
y: y + height * 0.5 * ( 1 - s ) },
- { x: x + width * 0.5 + (width +5) * 0.5 * c,
- y: y + height * 0.5 - (height+5) * 0.5 * s }
+ { x: x + width * 0.5 + (width +40) * 0.5 * c,
+ y: y + height * 0.5 - (height+40) * 0.5 * s }
];
}
nr--;
Modified: PyWireGate/trunk/logic_editor/gle/gle.block.js
===================================================================
--- PyWireGate/trunk/logic_editor/gle/gle.block.js 2011-02-04 17:45:32 UTC (rev 275)
+++ PyWireGate/trunk/logic_editor/gle/gle.block.js 2011-02-04 19:53:58 UTC (rev 276)
@@ -144,7 +144,7 @@
, 'inPort', i );
}
if( maskOptions.showLabel )
- canvas.text( g, 2*p[0].x-p[1].x, 2*p[0].y-p[1].y, this.name,
+ canvas.text( g, 1.2*p[0].x-0.2*p[1].x, 1.2*p[0].y-0.2*p[1].y, this.name,
{'dominant-baseline':'middle','text-anchor':'start'} );
});
@@ -166,7 +166,7 @@
);
}
if( maskOptions.showLabel )
- canvas.text( g, 2*p[0].x-p[1].x, 2*p[0].y-p[1].y, this.name,
+ canvas.text( g, 1.2*p[0].x-0.2*p[1].x, 1.2*p[0].y-0.2*p[1].y, this.name,
{'dominant-baseline':'middle','text-anchor':'end'} );
});
@@ -331,15 +331,15 @@
return maskOptions.inPortPos( number, that, maskOptions, parameter );
} else
return [
- { x: x , y: y + height * (0.5 + number) / inPorts.length },
- { x: x - 5, y: y + height * (0.5 + number) / inPorts.length }
+ { x: x , y: y + height * (0.5 + number) / inPorts.length },
+ { x: x - 20, y: y + height * (0.5 + number) / inPorts.length }
];
}
this.outPortPos = function( number )
{
return [
- { x: x + width , y: y + height * (0.5 + number) / outPorts.length },
- { x: x + width + 5, y: y + height * (0.5 + number) / outPorts.length }
+ { x: x + width , y: y + height * (0.5 + number) / outPorts.length },
+ { x: x + width + 20, y: y + height * (0.5 + number) / outPorts.length }
];
}
Modified: PyWireGate/trunk/logic_editor/gle/gle.connection.js
===================================================================
--- PyWireGate/trunk/logic_editor/gle/gle.connection.js 2011-02-04 17:45:32 UTC (rev 275)
+++ PyWireGate/trunk/logic_editor/gle/gle.connection.js 2011-02-04 19:53:58 UTC (rev 276)
@@ -217,9 +217,11 @@
}
//console.log( 'extend', dir, i, path.length, lastFixed, path, lastPoint );
var op = overPort;
+ var prePos = undefined;
if( op && op.type == 'inPort' )
{
- pos = op.block.inPortPos( op.number )[0];
+ pos = op.block.inPortPos( op.number )[1];
+ prePos = op.block.inPortPos( op.number )[0];
paths[branch].target = op;
} else
paths[branch].target = undefined;
@@ -263,6 +265,8 @@
break;
}
path.push( [ pos.x, pos.y ] );
+ if( prePos )
+ path.push( [ prePos.x, prePos.y ] );
} else {
if( path[i-1] !== undefined )
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|