|
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.
|