|
From: <ma...@us...> - 2011-01-11 21:40:16
|
Revision: 245
http://openautomation.svn.sourceforge.net/openautomation/?rev=245&view=rev
Author: mayerch
Date: 2011-01-11 21:40:10 +0000 (Tue, 11 Jan 2011)
Log Message:
-----------
Inital implementation of setting cursor for connection drawing to crosshair
Modified Paths:
--------------
PyWireGate/trunk/logic_editor/gle/gle.block.js
Modified: PyWireGate/trunk/logic_editor/gle/gle.block.js
===================================================================
--- PyWireGate/trunk/logic_editor/gle/gle.block.js 2011-01-11 20:46:56 UTC (rev 244)
+++ PyWireGate/trunk/logic_editor/gle/gle.block.js 2011-01-11 21:40:10 UTC (rev 245)
@@ -104,6 +104,10 @@
canvas.rect( body, 0, 0, width, height, style );
}
+ // extend the style for the ports...
+ style.cursor = 'crosshair';
+ style.fill = style.stroke;
+
// Draw the inports
var inPortsLength = inPorts.length;
$.each( inPorts, function(i){
@@ -111,7 +115,7 @@
if( 'connection' in this )
canvas.line( g, 0, y, 6, y, style );
else
- editorConnectionPointCreate( canvas.polyline( g, [[1, y-4],[6, y],[1, y+4]] ), 'inPort', i );
+ editorConnectionPointCreate( canvas.polyline( g, [[1, y-4],[6, y],[1, y+4]], style ), 'inPort', i );
if( maskOptions.showLabel )
canvas.text( g, 10, y, this.name, {'dominant-baseline':'middle','text-anchor':'start'} );
});
@@ -123,7 +127,7 @@
if( 'connection' in this )
canvas.line( g, width+6, y, width+12, y, style );
else
- editorConnectionPointCreate( canvas.polyline( g, [[width+6, y-4],[width+11, y],[width+6, y+4]] ), 'outPort', i );
+ editorConnectionPointCreate( canvas.polyline( g, [[width+6, y-4],[width+11, y],[width+6, y+4]], style ), 'outPort', i );
if( maskOptions.showLabel )
canvas.text( g, width, y, this.name, {'dominant-baseline':'middle','text-anchor':'end'} );
});
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|