|
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.
|
|
From: <ma...@us...> - 2011-01-16 12:56:57
|
Revision: 256
http://openautomation.svn.sourceforge.net/openautomation/?rev=256&view=rev
Author: mayerch
Date: 2011-01-16 12:56:51 +0000 (Sun, 16 Jan 2011)
Log Message:
-----------
Resize canvas during block move and resize
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-16 12:53:14 UTC (rev 255)
+++ PyWireGate/trunk/logic_editor/gle/gle.block.js 2011-01-16 12:56:51 UTC (rev 256)
@@ -221,6 +221,7 @@
if( height < 10 ) height = 10; // sanity...
draw();
}
+ editorResize( { x: x + width, y: y + height } );
$.each( inPorts, function(i){
//if( 'connection' in this )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-01-22 14:46:04
|
Revision: 264
http://openautomation.svn.sourceforge.net/openautomation/?rev=264&view=rev
Author: mayerch
Date: 2011-01-22 14:45:58 +0000 (Sat, 22 Jan 2011)
Log Message:
-----------
Optimized performance: no (unnecessary!) event handlers for the library blocks anymore!
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-22 14:09:22 UTC (rev 263)
+++ PyWireGate/trunk/logic_editor/gle/gle.block.js 2011-01-22 14:45:58 UTC (rev 264)
@@ -113,7 +113,7 @@
} else {
canvas.rect( body, 0, 0, width, height, style );
}
- if( addEvent ) editorConnectionPointCreate( body, undefined, undefined );
+ editorConnectionPointCreate( body, undefined, undefined );
// extend the style for the ports...
style.cursor = 'crosshair';
@@ -345,6 +345,8 @@
////////////////
function editorConnectionPointCreate( obj, portType, portNumber )
{
+ if( !addEvent ) return;
+
if( portType !== undefined && portNumber !== undefined )
{
$(obj).bind( 'mousedown', {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-01-22 20:57:30
|
Revision: 267
http://openautomation.svn.sourceforge.net/openautomation/?rev=267&view=rev
Author: mayerch
Date: 2011-01-22 20:57:24 +0000 (Sat, 22 Jan 2011)
Log Message:
-----------
Update clostes port of a block during mouse move when making a new connection
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-22 20:48:26 UTC (rev 266)
+++ PyWireGate/trunk/logic_editor/gle/gle.block.js 2011-01-22 20:57:24 UTC (rev 267)
@@ -354,7 +354,7 @@
portNumber:portNumber
}, editorConnectionPointDrag );
}
- $(obj).bind( 'mouseover', {
+ $(obj).bind( 'mousemove', {
portType :portType,
portNumber:portNumber
}, editorConnectionPointOverPort );
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ma...@us...> - 2011-01-23 14:49:27
|
Revision: 268
http://openautomation.svn.sourceforge.net/openautomation/?rev=268&view=rev
Author: mayerch
Date: 2011-01-23 14:49:21 +0000 (Sun, 23 Jan 2011)
Log Message:
-----------
Bug fix: don't offer inport during connection making if that port is already connected...
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-22 20:57:24 UTC (rev 267)
+++ PyWireGate/trunk/logic_editor/gle/gle.block.js 2011-01-23 14:49:21 UTC (rev 268)
@@ -422,6 +422,8 @@
var smallestDistancePort = -1;
for( var i = 0; i < inPorts.length; i++ )
{
+ if( inPorts[i].connection ) continue;
+
var dist = distance( that.inPortPos(i)[0] );
if( dist < smallestDistance )
{
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|