commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbe...@apache.org
Subject svn commit: r1037479 [2/3] - in /commons/sandbox/gsoc/2010/scxml-js/trunk: demo/drawing-tool/build/ src/site/xdoc/demo/drag-and-drop/ src/site/xdoc/demo/drawing-tool/ src/site/xdoc/demo/hierarchical-layout/ src/site/xdoc/demo/sandbox/
Date Sun, 21 Nov 2010 15:35:14 GMT

Added: commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/build/canvas.js
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/build/canvas.js?rev=1037479&view=auto
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/build/canvas.js (added)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/build/canvas.js Sun Nov 21 15:35:14 2010
@@ -0,0 +1,4614 @@
+function CanvasStatechartExecutionContext() {
+    var self = this; //used in the rare occasions we call public functions from inside this class
+    //system variable declarations
+    var _event = {
+        name: undefined,
+        data: undefined
+    },
+        _name = "Canvas",
+        _sessionid;
+    var _x = {
+        _event: _event,
+        _name: _name,
+        _sessionid: _sessionid
+    };
+    //variable declarations relating to data model
+    var clickedNode, firstEvent, eventStamp, tDelta, rDelta, cachedCenterPoint, cachedBBox, nodeBeingDrawn;
+    var svg, transformModule, scaleHandle, rotationHandle, ellipseButton, ellipseIcon, rectButton, rectIcon, transformButton, transformIcon, svgNs = 'http://www.w3.org/2000/svg',
+        selectedNodes = [],
+        allNodes = [];
+    //send timeout id variables
+    var $default_Regexp_N1195A = /^($default)/,
+        init_Regexp_N1195F = /^(init)/,
+        NODES_SELECTED_WITH_CLICK_Regexp_N11964 = /^(NODES_SELECTED_WITH_CLICK)/,
+        NODES_SELECTED_WITH_DRAG_Regexp_N11969 = /^(NODES_SELECTED_WITH_DRAG)/,
+        mousedown_Regexp_N1196E = /^(mousedown)/,
+        TOGGLE_TRANSFORM_Regexp_N11973 = /^(TOGGLE_TRANSFORM)/,
+        CHECK_NODES_Regexp_N11978 = /^(CHECK_NODES)/,
+        mouseup_Regexp_N1197D = /^(mouseup)/,
+        mousemove_Regexp_N11982 = /^(mousemove)/;
+    //abstract state
+    var AbstractState = new
+    function() {
+        //triggers are methods
+        this.$default = function() {};
+        this.init = function() {};
+        this.NODES_SELECTED_WITH_CLICK = function() {};
+        this.NODES_SELECTED_WITH_DRAG = function() {};
+        this.mousedown = function() {};
+        this.TOGGLE_TRANSFORM = function() {};
+        this.CHECK_NODES = function() {};
+        this.mouseup = function() {};
+        this.mousemove = function() {};
+        this.$default = function() {};
+        this.$dispatchPrefixEvent = function() {};
+    }
+    //states
+    var scxmlRoot = (function() {
+        function scxmlRootConstructor() {
+            this.parent = AbstractState;
+            this.initial = null;
+            this.depth = 0;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            false;
+            this.toString = function() {
+                return "scxmlRoot"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("scxmlRoot");
+                }
+            }
+            this.exitAction = function() {
+                for (var N10003_iterator = 0, N10003_hoist = listeners.length;
+                N10003_iterator < N10003_hoist;
+                N10003_iterator++) {
+                    var listener = listeners[N10003_iterator];
+                    //from
+                    listener.onExit("scxmlRoot");
+                }
+            }
+        }
+        scxmlRootConstructor.prototype = AbstractState;
+        return new scxmlRootConstructor();
+    })();
+    var initial_default = (function() {
+        function initial_defaultConstructor() {
+            this.parent = scxmlRoot;
+            this.initial = null;
+            this.depth = 1;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                ];
+            this.toString = function() {
+                return "initial_default"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("initial_default");
+                }
+            }
+            this.exitAction = function() {
+                for (var N1000C_iterator = 0, N1000C_hoist = listeners.length;
+                N1000C_iterator < N1000C_hoist;
+                N1000C_iterator++) {
+                    var listener = listeners[N1000C_iterator];
+                    //from
+                    listener.onExit("initial_default");
+                }
+            }
+        }
+        initial_defaultConstructor.prototype = scxmlRoot;
+        return new initial_defaultConstructor();
+    })();
+    var main = (function() {
+        function mainConstructor() {
+            this.parent = scxmlRoot;
+            this.initial = null;
+            this.depth = 1;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            false;
+            this.toString = function() {
+                return "main"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("main");
+                }
+            }
+            this.exitAction = function() {
+                for (var N10139_iterator = 0, N10139_hoist = listeners.length;
+                N10139_iterator < N10139_hoist;
+                N10139_iterator++) {
+                    var listener = listeners[N10139_iterator];
+                    //from
+                    listener.onExit("main");
+                }
+            }
+        }
+        mainConstructor.prototype = scxmlRoot;
+        return new mainConstructor();
+    })();
+    var presentation_state = (function() {
+        function presentation_stateConstructor() {
+            this.parent = main;
+            this.initial = null;
+            this.depth = 2;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            false;
+            this.toString = function() {
+                return "presentation_state"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("presentation_state");
+                }
+            }
+            this.exitAction = function() {
+                for (var N1013C_iterator = 0, N1013C_hoist = listeners.length;
+                N1013C_iterator < N1013C_hoist;
+                N1013C_iterator++) {
+                    var listener = listeners[N1013C_iterator];
+                    //from
+                    listener.onExit("presentation_state");
+                }
+            }
+        }
+        presentation_stateConstructor.prototype = main;
+        return new presentation_stateConstructor();
+    })();
+    var transform_tool_selected = (function() {
+        function transform_tool_selectedConstructor() {
+            this.parent = presentation_state;
+            this.initial = null;
+            this.depth = 3;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            false;
+            this.toString = function() {
+                return "transform_tool_selected"
+            }
+            this.enterAction = function() {
+                //$(transformButton).addClass("selected");
+                transformButton.setAttributeNS(null, "class", "selected");
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("transform_tool_selected");
+                }
+            }
+            this.exitAction = function() {
+                //$(transformButton).removeClass("selected");
+                transformButton.removeAttributeNS(null, "class");
+                for (var N10140_iterator = 0, N10140_hoist = listeners.length;
+                N10140_iterator < N10140_hoist;
+                N10140_iterator++) {
+                    var listener = listeners[N10140_iterator];
+                    //from
+                    listener.onExit("transform_tool_selected");
+                }
+            }
+        }
+        transform_tool_selectedConstructor.prototype = presentation_state;
+        return new transform_tool_selectedConstructor();
+    })();
+    var no_nodes_selected = (function() {
+        function no_nodes_selectedConstructor() {
+            this.parent = transform_tool_selected;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    presentation_state
+                        ,
+                    transform_tool_selected
+                ];
+            this.toString = function() {
+                return "no_nodes_selected"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("no_nodes_selected");
+                }
+            }
+            this.exitAction = function() {
+                for (var N10146_iterator = 0, N10146_hoist = listeners.length;
+                N10146_iterator < N10146_hoist;
+                N10146_iterator++) {
+                    var listener = listeners[N10146_iterator];
+                    //from
+                    listener.onExit("no_nodes_selected");
+                }
+            }
+        }
+        no_nodes_selectedConstructor.prototype = transform_tool_selected;
+        return new no_nodes_selectedConstructor();
+    })();
+    var nodes_selected = (function() {
+        function nodes_selectedConstructor() {
+            this.parent = transform_tool_selected;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            false;
+            this.toString = function() {
+                return "nodes_selected"
+            }
+            this.enterAction = function() {
+                cachedCenterPoint = getAggregateCenterPoint(selectedNodes);
+                cachedBBox = getAggregateBBox(selectedNodes);
+                updateTransformHandles();
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("nodes_selected");
+                }
+            }
+            this.exitAction = function() {
+                this.historyState.lastConfiguration = currentConfiguration.slice();
+                for (var N102EA_iterator = 0, N102EA_hoist = listeners.length;
+                N102EA_iterator < N102EA_hoist;
+                N102EA_iterator++) {
+                    var listener = listeners[N102EA_iterator];
+                    //from
+                    listener.onExit("nodes_selected");
+                }
+            }
+        }
+        nodes_selectedConstructor.prototype = transform_tool_selected;
+        return new nodes_selectedConstructor();
+    })();
+    var ready_to_rotate = (function() {
+        function ready_to_rotateConstructor() {
+            this.parent = nodes_selected;
+            this.initial = null;
+            this.depth = 5;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    presentation_state
+                        ,
+                    transform_tool_selected
+                        ,
+                    nodes_selected
+                ];
+            this.toString = function() {
+                return "ready_to_rotate"
+            }
+            this.enterAction = function() {
+                rotationHandle.setAttributeNS(null, "visibility", "visible");
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("ready_to_rotate");
+                }
+            }
+            this.exitAction = function() {
+                rotationHandle.setAttributeNS(null, "visibility", "hidden");
+                for (var N102F0_iterator = 0, N102F0_hoist = listeners.length;
+                N102F0_iterator < N102F0_hoist;
+                N102F0_iterator++) {
+                    var listener = listeners[N102F0_iterator];
+                    //from
+                    listener.onExit("ready_to_rotate");
+                }
+            }
+        }
+        ready_to_rotateConstructor.prototype = nodes_selected;
+        return new ready_to_rotateConstructor();
+    })();
+    var ready_to_scale = (function() {
+        function ready_to_scaleConstructor() {
+            this.parent = nodes_selected;
+            this.initial = null;
+            this.depth = 5;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    presentation_state
+                        ,
+                    transform_tool_selected
+                        ,
+                    nodes_selected
+                ];
+            this.toString = function() {
+                return "ready_to_scale"
+            }
+            this.enterAction = function() {
+                scaleHandle.setAttributeNS(null, "visibility", "visible");
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("ready_to_scale");
+                }
+            }
+            this.exitAction = function() {
+                scaleHandle.setAttributeNS(null, "visibility", "hidden");
+                for (var N10494_iterator = 0, N10494_hoist = listeners.length;
+                N10494_iterator < N10494_hoist;
+                N10494_iterator++) {
+                    var listener = listeners[N10494_iterator];
+                    //from
+                    listener.onExit("ready_to_scale");
+                }
+            }
+        }
+        ready_to_scaleConstructor.prototype = nodes_selected;
+        return new ready_to_scaleConstructor();
+    })();
+    var nodes_selected_initial = (function() {
+        function nodes_selected_initialConstructor() {
+            this.parent = nodes_selected;
+            this.initial = null;
+            this.depth = 5;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    presentation_state
+                        ,
+                    transform_tool_selected
+                        ,
+                    nodes_selected
+                ];
+            this.parent.initial = this; //init parent's pointer to initial state
+            this.toString = function() {
+                return "nodes_selected_initial"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("nodes_selected_initial");
+                }
+            }
+            this.exitAction = function() {
+                for (var N10638_iterator = 0, N10638_hoist = listeners.length;
+                N10638_iterator < N10638_hoist;
+                N10638_iterator++) {
+                    var listener = listeners[N10638_iterator];
+                    //from
+                    listener.onExit("nodes_selected_initial");
+                }
+            }
+        }
+        nodes_selected_initialConstructor.prototype = nodes_selected;
+        return new nodes_selected_initialConstructor();
+    })();
+    var nodes_selected_history = (function() {
+        function nodes_selected_historyConstructor() {
+            this.parent = nodes_selected;
+            this.initial = null;
+            this.depth = 5;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    presentation_state
+                        ,
+                    transform_tool_selected
+                        ,
+                    nodes_selected
+                ];
+            this.parent.historyState = this; //init parent's pointer to history state
+            this.toString = function() {
+                return "nodes_selected_history"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("nodes_selected_history");
+                }
+            }
+            this.exitAction = function() {
+                for (var N106A6_iterator = 0, N106A6_hoist = listeners.length;
+                N106A6_iterator < N106A6_hoist;
+                N106A6_iterator++) {
+                    var listener = listeners[N106A6_iterator];
+                    //from
+                    listener.onExit("nodes_selected_history");
+                }
+            }
+        }
+        nodes_selected_historyConstructor.prototype = nodes_selected;
+        return new nodes_selected_historyConstructor();
+    })();
+    var transform_tool_selected_initial = (function() {
+        function transform_tool_selected_initialConstructor() {
+            this.parent = transform_tool_selected;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    presentation_state
+                        ,
+                    transform_tool_selected
+                ];
+            this.parent.initial = this; //init parent's pointer to initial state
+            this.toString = function() {
+                return "transform_tool_selected_initial"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("transform_tool_selected_initial");
+                }
+            }
+            this.exitAction = function() {
+                for (var N1071C_iterator = 0, N1071C_hoist = listeners.length;
+                N1071C_iterator < N1071C_hoist;
+                N1071C_iterator++) {
+                    var listener = listeners[N1071C_iterator];
+                    //from
+                    listener.onExit("transform_tool_selected_initial");
+                }
+            }
+        }
+        transform_tool_selected_initialConstructor.prototype = transform_tool_selected;
+        return new transform_tool_selected_initialConstructor();
+    })();
+    var drawing_tool_selected = (function() {
+        function drawing_tool_selectedConstructor() {
+            this.parent = presentation_state;
+            this.initial = null;
+            this.depth = 3;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            false;
+            this.toString = function() {
+                return "drawing_tool_selected"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("drawing_tool_selected");
+                }
+            }
+            this.exitAction = function() {
+                for (var N107E5_iterator = 0, N107E5_hoist = listeners.length;
+                N107E5_iterator < N107E5_hoist;
+                N107E5_iterator++) {
+                    var listener = listeners[N107E5_iterator];
+                    //from
+                    listener.onExit("drawing_tool_selected");
+                }
+            }
+        }
+        drawing_tool_selectedConstructor.prototype = presentation_state;
+        return new drawing_tool_selectedConstructor();
+    })();
+    var ellipse_tool_selected = (function() {
+        function ellipse_tool_selectedConstructor() {
+            this.parent = drawing_tool_selected;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    presentation_state
+                        ,
+                    drawing_tool_selected
+                ];
+            this.toString = function() {
+                return "ellipse_tool_selected"
+            }
+            this.enterAction = function() {
+                //$(ellipseButton).addClass("selected");
+                ellipseButton.setAttributeNS(null, "class", "selected");
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("ellipse_tool_selected");
+                }
+            }
+            this.exitAction = function() {
+                //$(ellipseButton).removeClass("selected");
+                ellipseButton.removeAttributeNS(null, "class");
+                for (var N107EB_iterator = 0, N107EB_hoist = listeners.length;
+                N107EB_iterator < N107EB_hoist;
+                N107EB_iterator++) {
+                    var listener = listeners[N107EB_iterator];
+                    //from
+                    listener.onExit("ellipse_tool_selected");
+                }
+            }
+        }
+        ellipse_tool_selectedConstructor.prototype = drawing_tool_selected;
+        return new ellipse_tool_selectedConstructor();
+    })();
+    var rect_tool_selected = (function() {
+        function rect_tool_selectedConstructor() {
+            this.parent = drawing_tool_selected;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    presentation_state
+                        ,
+                    drawing_tool_selected
+                ];
+            this.toString = function() {
+                return "rect_tool_selected"
+            }
+            this.enterAction = function() {
+                //$(rectButton).addClass("selected");
+                rectButton.setAttributeNS(null, "class", "selected");
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("rect_tool_selected");
+                }
+            }
+            this.exitAction = function() {
+                //$(rectButton).removeClass("selected");
+                rectButton.removeAttributeNS(null, "class");
+                for (var N108CB_iterator = 0, N108CB_hoist = listeners.length;
+                N108CB_iterator < N108CB_hoist;
+                N108CB_iterator++) {
+                    var listener = listeners[N108CB_iterator];
+                    //from
+                    listener.onExit("rect_tool_selected");
+                }
+            }
+        }
+        rect_tool_selectedConstructor.prototype = drawing_tool_selected;
+        return new rect_tool_selectedConstructor();
+    })();
+    var presentation_state_initial = (function() {
+        function presentation_state_initialConstructor() {
+            this.parent = presentation_state;
+            this.initial = null;
+            this.depth = 3;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    presentation_state
+                ];
+            this.parent.initial = this; //init parent's pointer to initial state
+            this.toString = function() {
+                return "presentation_state_initial"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("presentation_state_initial");
+                }
+            }
+            this.exitAction = function() {
+                for (var N109AE_iterator = 0, N109AE_hoist = listeners.length;
+                N109AE_iterator < N109AE_hoist;
+                N109AE_iterator++) {
+                    var listener = listeners[N109AE_iterator];
+                    //from
+                    listener.onExit("presentation_state_initial");
+                }
+            }
+        }
+        presentation_state_initialConstructor.prototype = presentation_state;
+        return new presentation_state_initialConstructor();
+    })();
+    var processing_events = (function() {
+        function processing_eventsConstructor() {
+            this.parent = main;
+            this.initial = null;
+            this.depth = 2;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            false;
+            this.toString = function() {
+                return "processing_events"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("processing_events");
+                }
+            }
+            this.exitAction = function() {
+                for (var N10A23_iterator = 0, N10A23_hoist = listeners.length;
+                N10A23_iterator < N10A23_hoist;
+                N10A23_iterator++) {
+                    var listener = listeners[N10A23_iterator];
+                    //from
+                    listener.onExit("processing_events");
+                }
+            }
+        }
+        processing_eventsConstructor.prototype = main;
+        return new processing_eventsConstructor();
+    })();
+    var ready = (function() {
+        function readyConstructor() {
+            this.parent = processing_events;
+            this.initial = null;
+            this.depth = 3;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                ];
+            this.toString = function() {
+                return "ready"
+            }
+            this.enterAction = function() {
+                updateTransformHandles();
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("ready");
+                }
+            }
+            this.exitAction = function() {
+                clickedNode = _event.data.target;
+                firstEvent = _event.data;
+                eventStamp = _event.data;
+                for (var N10A27_iterator = 0, N10A27_hoist = listeners.length;
+                N10A27_iterator < N10A27_hoist;
+                N10A27_iterator++) {
+                    var listener = listeners[N10A27_iterator];
+                    //from
+                    listener.onExit("ready");
+                }
+            }
+        }
+        readyConstructor.prototype = processing_events;
+        return new readyConstructor();
+    })();
+    var after_mousedown = (function() {
+        function after_mousedownConstructor() {
+            this.parent = processing_events;
+            this.initial = null;
+            this.depth = 3;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            false;
+            this.toString = function() {
+                return "after_mousedown"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("after_mousedown");
+                }
+            }
+            this.exitAction = function() {
+                for (var N10E61_iterator = 0, N10E61_hoist = listeners.length;
+                N10E61_iterator < N10E61_hoist;
+                N10E61_iterator++) {
+                    var listener = listeners[N10E61_iterator];
+                    //from
+                    listener.onExit("after_mousedown");
+                }
+            }
+        }
+        after_mousedownConstructor.prototype = processing_events;
+        return new after_mousedownConstructor();
+    })();
+    var after_mousedown_on_selected_nodes = (function() {
+        function after_mousedown_on_selected_nodesConstructor() {
+            this.parent = after_mousedown;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                        ,
+                    after_mousedown
+                ];
+            this.toString = function() {
+                return "after_mousedown_on_selected_nodes"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("after_mousedown_on_selected_nodes");
+                }
+            }
+            this.exitAction = function() {
+                for (var N10E68_iterator = 0, N10E68_hoist = listeners.length;
+                N10E68_iterator < N10E68_hoist;
+                N10E68_iterator++) {
+                    var listener = listeners[N10E68_iterator];
+                    //from
+                    listener.onExit("after_mousedown_on_selected_nodes");
+                }
+            }
+        }
+        after_mousedown_on_selected_nodesConstructor.prototype = after_mousedown;
+        return new after_mousedown_on_selected_nodesConstructor();
+    })();
+    var after_mousedown_with_shift_key_on_selected_nodes = (function() {
+        function after_mousedown_with_shift_key_on_selected_nodesConstructor() {
+            this.parent = after_mousedown;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                        ,
+                    after_mousedown
+                ];
+            this.toString = function() {
+                return "after_mousedown_with_shift_key_on_selected_nodes"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("after_mousedown_with_shift_key_on_selected_nodes");
+                }
+            }
+            this.exitAction = function() {
+                for (var N1112A_iterator = 0, N1112A_hoist = listeners.length;
+                N1112A_iterator < N1112A_hoist;
+                N1112A_iterator++) {
+                    var listener = listeners[N1112A_iterator];
+                    //from
+                    listener.onExit("after_mousedown_with_shift_key_on_selected_nodes");
+                }
+            }
+        }
+        after_mousedown_with_shift_key_on_selected_nodesConstructor.prototype = after_mousedown;
+        return new after_mousedown_with_shift_key_on_selected_nodesConstructor();
+    })();
+    var after_mousedown_on_nonselected_nodes = (function() {
+        function after_mousedown_on_nonselected_nodesConstructor() {
+            this.parent = after_mousedown;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                        ,
+                    after_mousedown
+                ];
+            this.toString = function() {
+                return "after_mousedown_on_nonselected_nodes"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("after_mousedown_on_nonselected_nodes");
+                }
+            }
+            this.exitAction = function() {
+                for (var N113E3_iterator = 0, N113E3_hoist = listeners.length;
+                N113E3_iterator < N113E3_hoist;
+                N113E3_iterator++) {
+                    var listener = listeners[N113E3_iterator];
+                    //from
+                    listener.onExit("after_mousedown_on_nonselected_nodes");
+                }
+            }
+        }
+        after_mousedown_on_nonselected_nodesConstructor.prototype = after_mousedown;
+        return new after_mousedown_on_nonselected_nodesConstructor();
+    })();
+    var after_mousedown_with_shift_key_on_nonselected_nodes = (function() {
+        function after_mousedown_with_shift_key_on_nonselected_nodesConstructor() {
+            this.parent = after_mousedown;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                        ,
+                    after_mousedown
+                ];
+            this.toString = function() {
+                return "after_mousedown_with_shift_key_on_nonselected_nodes"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("after_mousedown_with_shift_key_on_nonselected_nodes");
+                }
+            }
+            this.exitAction = function() {
+                for (var N116C9_iterator = 0, N116C9_hoist = listeners.length;
+                N116C9_iterator < N116C9_hoist;
+                N116C9_iterator++) {
+                    var listener = listeners[N116C9_iterator];
+                    //from
+                    listener.onExit("after_mousedown_with_shift_key_on_nonselected_nodes");
+                }
+            }
+        }
+        after_mousedown_with_shift_key_on_nonselected_nodesConstructor.prototype = after_mousedown;
+        return new after_mousedown_with_shift_key_on_nonselected_nodesConstructor();
+    })();
+    var after_mousedown_on_canvas = (function() {
+        function after_mousedown_on_canvasConstructor() {
+            this.parent = after_mousedown;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                        ,
+                    after_mousedown
+                ];
+            this.toString = function() {
+                return "after_mousedown_on_canvas"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("after_mousedown_on_canvas");
+                }
+            }
+            this.exitAction = function() {
+                for (var N11982_iterator = 0, N11982_hoist = listeners.length;
+                N11982_iterator < N11982_hoist;
+                N11982_iterator++) {
+                    var listener = listeners[N11982_iterator];
+                    //from
+                    listener.onExit("after_mousedown_on_canvas");
+                }
+            }
+        }
+        after_mousedown_on_canvasConstructor.prototype = after_mousedown;
+        return new after_mousedown_on_canvasConstructor();
+    })();
+    var after_mousedown_initial = (function() {
+        function after_mousedown_initialConstructor() {
+            this.parent = after_mousedown;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                        ,
+                    after_mousedown
+                ];
+            this.parent.initial = this; //init parent's pointer to initial state
+            this.toString = function() {
+                return "after_mousedown_initial"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("after_mousedown_initial");
+                }
+            }
+            this.exitAction = function() {
+                for (var N11C43_iterator = 0, N11C43_hoist = listeners.length;
+                N11C43_iterator < N11C43_hoist;
+                N11C43_iterator++) {
+                    var listener = listeners[N11C43_iterator];
+                    //from
+                    listener.onExit("after_mousedown_initial");
+                }
+            }
+        }
+        after_mousedown_initialConstructor.prototype = after_mousedown;
+        return new after_mousedown_initialConstructor();
+    })();
+    var dragging = (function() {
+        function draggingConstructor() {
+            this.parent = processing_events;
+            this.initial = null;
+            this.depth = 3;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                ];
+            this.toString = function() {
+                return "dragging"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("dragging");
+                }
+            }
+            this.exitAction = function() {
+                for (var N11CB3_iterator = 0, N11CB3_hoist = listeners.length;
+                N11CB3_iterator < N11CB3_hoist;
+                N11CB3_iterator++) {
+                    var listener = listeners[N11CB3_iterator];
+                    //from
+                    listener.onExit("dragging");
+                }
+            }
+        }
+        draggingConstructor.prototype = processing_events;
+        return new draggingConstructor();
+    })();
+    var rotating = (function() {
+        function rotatingConstructor() {
+            this.parent = processing_events;
+            this.initial = null;
+            this.depth = 3;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                ];
+            this.toString = function() {
+                return "rotating"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("rotating");
+                }
+            }
+            this.exitAction = function() {
+                for (var N11E2A_iterator = 0, N11E2A_hoist = listeners.length;
+                N11E2A_iterator < N11E2A_hoist;
+                N11E2A_iterator++) {
+                    var listener = listeners[N11E2A_iterator];
+                    //from
+                    listener.onExit("rotating");
+                }
+            }
+        }
+        rotatingConstructor.prototype = processing_events;
+        return new rotatingConstructor();
+    })();
+    var scaling = (function() {
+        function scalingConstructor() {
+            this.parent = processing_events;
+            this.initial = null;
+            this.depth = 3;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                ];
+            this.toString = function() {
+                return "scaling"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("scaling");
+                }
+            }
+            this.exitAction = function() {
+                for (var N11F89_iterator = 0, N11F89_hoist = listeners.length;
+                N11F89_iterator < N11F89_hoist;
+                N11F89_iterator++) {
+                    var listener = listeners[N11F89_iterator];
+                    //from
+                    listener.onExit("scaling");
+                }
+            }
+        }
+        scalingConstructor.prototype = processing_events;
+        return new scalingConstructor();
+    })();
+    var drawing_marquee = (function() {
+        function drawing_marqueeConstructor() {
+            this.parent = processing_events;
+            this.initial = null;
+            this.depth = 3;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                ];
+            this.toString = function() {
+                return "drawing_marquee"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("drawing_marquee");
+                }
+            }
+            this.exitAction = function() {
+                for (var N120FA_iterator = 0, N120FA_hoist = listeners.length;
+                N120FA_iterator < N120FA_hoist;
+                N120FA_iterator++) {
+                    var listener = listeners[N120FA_iterator];
+                    //from
+                    listener.onExit("drawing_marquee");
+                }
+            }
+        }
+        drawing_marqueeConstructor.prototype = processing_events;
+        return new drawing_marqueeConstructor();
+    })();
+    var drawing = (function() {
+        function drawingConstructor() {
+            this.parent = processing_events;
+            this.initial = null;
+            this.depth = 3;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            false;
+            this.toString = function() {
+                return "drawing"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("drawing");
+                }
+            }
+            this.exitAction = function() {
+                for (var N1223C_iterator = 0, N1223C_hoist = listeners.length;
+                N1223C_iterator < N1223C_hoist;
+                N1223C_iterator++) {
+                    var listener = listeners[N1223C_iterator];
+                    //from
+                    listener.onExit("drawing");
+                }
+            }
+        }
+        drawingConstructor.prototype = processing_events;
+        return new drawingConstructor();
+    })();
+    var drawing_ellipse = (function() {
+        function drawing_ellipseConstructor() {
+            this.parent = drawing;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                        ,
+                    drawing
+                ];
+            this.toString = function() {
+                return "drawing_ellipse"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("drawing_ellipse");
+                }
+            }
+            this.exitAction = function() {
+                for (var N12242_iterator = 0, N12242_hoist = listeners.length;
+                N12242_iterator < N12242_hoist;
+                N12242_iterator++) {
+                    var listener = listeners[N12242_iterator];
+                    //from
+                    listener.onExit("drawing_ellipse");
+                }
+            }
+        }
+        drawing_ellipseConstructor.prototype = drawing;
+        return new drawing_ellipseConstructor();
+    })();
+    var drawing_rect = (function() {
+        function drawing_rectConstructor() {
+            this.parent = drawing;
+            this.initial = null;
+            this.depth = 4;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                        ,
+                    drawing
+                ];
+            this.toString = function() {
+                return "drawing_rect"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("drawing_rect");
+                }
+            }
+            this.exitAction = function() {
+                for (var N1234E_iterator = 0, N1234E_hoist = listeners.length;
+                N1234E_iterator < N1234E_hoist;
+                N1234E_iterator++) {
+                    var listener = listeners[N1234E_iterator];
+                    //from
+                    listener.onExit("drawing_rect");
+                }
+            }
+        }
+        drawing_rectConstructor.prototype = drawing;
+        return new drawing_rectConstructor();
+    })();
+    var processing_events_initial = (function() {
+        function processing_events_initialConstructor() {
+            this.parent = processing_events;
+            this.initial = null;
+            this.depth = 3;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                        ,
+                    processing_events
+                ];
+            this.parent.initial = this; //init parent's pointer to initial state
+            this.toString = function() {
+                return "processing_events_initial"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("processing_events_initial");
+                }
+            }
+            this.exitAction = function() {
+                for (var N12465_iterator = 0, N12465_hoist = listeners.length;
+                N12465_iterator < N12465_hoist;
+                N12465_iterator++) {
+                    var listener = listeners[N12465_iterator];
+                    //from
+                    listener.onExit("processing_events_initial");
+                }
+            }
+        }
+        processing_events_initialConstructor.prototype = processing_events;
+        return new processing_events_initialConstructor();
+    })();
+    var main_initial = (function() {
+        function main_initialConstructor() {
+            this.parent = main;
+            this.initial = null;
+            this.depth = 2;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                        ,
+                    main
+                ];
+            this.parent.initial = this; //init parent's pointer to initial state
+            this.toString = function() {
+                return "main_initial"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("main_initial");
+                }
+            }
+            this.exitAction = function() {
+                for (var N12524_iterator = 0, N12524_hoist = listeners.length;
+                N12524_iterator < N12524_hoist;
+                N12524_iterator++) {
+                    var listener = listeners[N12524_iterator];
+                    //from
+                    listener.onExit("main_initial");
+                }
+            }
+        }
+        main_initialConstructor.prototype = main;
+        return new main_initialConstructor();
+    })();
+    var scxmlRoot_initial = (function() {
+        function scxmlRoot_initialConstructor() {
+            this.parent = scxmlRoot;
+            this.initial = null;
+            this.depth = 1;
+            this.historyState = null;
+            //these variables facilitate fast In predicate
+            this.isBasic =
+            true;
+            this.ancestors = [
+                scxmlRoot
+                ];
+            this.parent.initial = this; //init parent's pointer to initial state
+            this.toString = function() {
+                return "scxmlRoot_initial"
+            }
+            this.enterAction = function() {
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //to
+                    listener.onEntry("scxmlRoot_initial");
+                }
+            }
+            this.exitAction = function() {
+                for (var N125FD_iterator = 0, N125FD_hoist = listeners.length;
+                N125FD_iterator < N125FD_hoist;
+                N125FD_iterator++) {
+                    var listener = listeners[N125FD_iterator];
+                    //from
+                    listener.onExit("scxmlRoot_initial");
+                }
+            }
+        }
+        scxmlRoot_initialConstructor.prototype = scxmlRoot;
+        return new scxmlRoot_initialConstructor();
+    })();
+    //states enum for glass-box unit testing
+    this._states = {
+        initial_default: initial_default,
+        no_nodes_selected: no_nodes_selected,
+        ready_to_rotate: ready_to_rotate,
+        ready_to_scale: ready_to_scale,
+        nodes_selected_initial: nodes_selected_initial,
+        nodes_selected_history: nodes_selected_history,
+        transform_tool_selected_initial: transform_tool_selected_initial,
+        ellipse_tool_selected: ellipse_tool_selected,
+        rect_tool_selected: rect_tool_selected,
+        presentation_state_initial: presentation_state_initial,
+        ready: ready,
+        after_mousedown_on_selected_nodes: after_mousedown_on_selected_nodes,
+        after_mousedown_with_shift_key_on_selected_nodes: after_mousedown_with_shift_key_on_selected_nodes,
+        after_mousedown_on_nonselected_nodes: after_mousedown_on_nonselected_nodes,
+        after_mousedown_with_shift_key_on_nonselected_nodes: after_mousedown_with_shift_key_on_nonselected_nodes,
+        after_mousedown_on_canvas: after_mousedown_on_canvas,
+        after_mousedown_initial: after_mousedown_initial,
+        dragging: dragging,
+        rotating: rotating,
+        scaling: scaling,
+        drawing_marquee: drawing_marquee,
+        drawing_ellipse: drawing_ellipse,
+        drawing_rect: drawing_rect,
+        processing_events_initial: processing_events_initial,
+        main_initial: main_initial,
+        scxmlRoot_initial: scxmlRoot_initial
+    }
+    //trigger methods for synchronous interaction
+    this["$default"] = function(data) {
+        if (isInStableState) {
+            runToCompletion(
+            //TODO: conditionally wrap in quotes for enumerated pattern
+            $default, data, true)
+        } else {
+            return undefined;
+        }
+    }
+    this["init"] = function(data) {
+        if (isInStableState) {
+            runToCompletion(
+            //TODO: conditionally wrap in quotes for enumerated pattern
+            init, data, true)
+        } else {
+            return undefined;
+        }
+    }
+    this["NODES_SELECTED_WITH_CLICK"] = function(data) {
+        if (isInStableState) {
+            runToCompletion(
+            //TODO: conditionally wrap in quotes for enumerated pattern
+            NODES_SELECTED_WITH_CLICK, data, true)
+        } else {
+            return undefined;
+        }
+    }
+    this["NODES_SELECTED_WITH_DRAG"] = function(data) {
+        if (isInStableState) {
+            runToCompletion(
+            //TODO: conditionally wrap in quotes for enumerated pattern
+            NODES_SELECTED_WITH_DRAG, data, true)
+        } else {
+            return undefined;
+        }
+    }
+    this["mousedown"] = function(data) {
+        if (isInStableState) {
+            runToCompletion(
+            //TODO: conditionally wrap in quotes for enumerated pattern
+            mousedown, data, true)
+        } else {
+            return undefined;
+        }
+    }
+    this["TOGGLE_TRANSFORM"] = function(data) {
+        if (isInStableState) {
+            runToCompletion(
+            //TODO: conditionally wrap in quotes for enumerated pattern
+            TOGGLE_TRANSFORM, data, true)
+        } else {
+            return undefined;
+        }
+    }
+    this["CHECK_NODES"] = function(data) {
+        if (isInStableState) {
+            runToCompletion(
+            //TODO: conditionally wrap in quotes for enumerated pattern
+            CHECK_NODES, data, true)
+        } else {
+            return undefined;
+        }
+    }
+    this["mouseup"] = function(data) {
+        if (isInStableState) {
+            runToCompletion(
+            //TODO: conditionally wrap in quotes for enumerated pattern
+            mouseup, data, true)
+        } else {
+            return undefined;
+        }
+    }
+    this["mousemove"] = function(data) {
+        if (isInStableState) {
+            runToCompletion(
+            //TODO: conditionally wrap in quotes for enumerated pattern
+            mousemove, data, true)
+        } else {
+            return undefined;
+        }
+    }
+    //enumeration of states int id's
+    var initial_default_id = 0;
+    var no_nodes_selected_id = 1;
+    var ready_to_rotate_id = 2;
+    var ready_to_scale_id = 3;
+    var nodes_selected_initial_id = 4;
+    var nodes_selected_history_id = 5;
+    var transform_tool_selected_initial_id = 6;
+    var ellipse_tool_selected_id = 7;
+    var rect_tool_selected_id = 8;
+    var presentation_state_initial_id = 9;
+    var ready_id = 10;
+    var after_mousedown_on_selected_nodes_id = 11;
+    var after_mousedown_with_shift_key_on_selected_nodes_id = 12;
+    var after_mousedown_on_nonselected_nodes_id = 13;
+    var after_mousedown_with_shift_key_on_nonselected_nodes_id = 14;
+    var after_mousedown_on_canvas_id = 15;
+    var after_mousedown_initial_id = 16;
+    var dragging_id = 17;
+    var rotating_id = 18;
+    var scaling_id = 19;
+    var drawing_marquee_id = 20;
+    var drawing_ellipse_id = 21;
+    var drawing_rect_id = 22;
+    var processing_events_initial_id = 23;
+    var main_initial_id = 24;
+    var scxmlRoot_initial_id = 25;
+    //map from states int id's to objects
+    var STATE_INT_ID_TO_OBJECT_MAP = [
+        initial_default, no_nodes_selected, ready_to_rotate, ready_to_scale, nodes_selected_initial, nodes_selected_history, transform_tool_selected_initial, ellipse_tool_selected, rect_tool_selected, presentation_state_initial, ready, after_mousedown_on_selected_nodes, after_mousedown_with_shift_key_on_selected_nodes, after_mousedown_on_nonselected_nodes, after_mousedown_with_shift_key_on_nonselected_nodes, after_mousedown_on_canvas, after_mousedown_initial, dragging, rotating, scaling, drawing_marquee, drawing_ellipse, drawing_rect, processing_events_initial, main_initial, scxmlRoot_initial];
+    //tag each state object with an int id to map from object to id
+    //only needed for history
+    initial_default.id = 0;
+    no_nodes_selected.id = 1;
+    ready_to_rotate.id = 2;
+    ready_to_scale.id = 3;
+    nodes_selected_initial.id = 4;
+    nodes_selected_history.id = 5;
+    transform_tool_selected_initial.id = 6;
+    ellipse_tool_selected.id = 7;
+    rect_tool_selected.id = 8;
+    presentation_state_initial.id = 9;
+    ready.id = 10;
+    after_mousedown_on_selected_nodes.id = 11;
+    after_mousedown_with_shift_key_on_selected_nodes.id = 12;
+    after_mousedown_on_nonselected_nodes.id = 13;
+    after_mousedown_with_shift_key_on_nonselected_nodes.id = 14;
+    after_mousedown_on_canvas.id = 15;
+    after_mousedown_initial.id = 16;
+    dragging.id = 17;
+    rotating.id = 18;
+    scaling.id = 19;
+    drawing_marquee.id = 20;
+    drawing_ellipse.id = 21;
+    drawing_rect.id = 22;
+    processing_events_initial.id = 23;
+    main_initial.id = 24;
+    scxmlRoot_initial.id = 25;
+    //enumeration of triggers
+    var $default = 0;
+    var init = 1;
+    var NODES_SELECTED_WITH_CLICK = 2;
+    var NODES_SELECTED_WITH_DRAG = 3;
+    var mousedown = 4;
+    var TOGGLE_TRANSFORM = 5;
+    var CHECK_NODES = 6;
+    var mouseup = 7;
+    var mousemove = 8;
+    //expose them as a convenient interface as part of the API
+    this.TRIGGERS = {
+        $default: $default,
+        init: init,
+        NODES_SELECTED_WITH_CLICK: NODES_SELECTED_WITH_CLICK,
+        NODES_SELECTED_WITH_DRAG: NODES_SELECTED_WITH_DRAG,
+        mousedown: mousedown,
+        TOGGLE_TRANSFORM: TOGGLE_TRANSFORM,
+        CHECK_NODES: CHECK_NODES,
+        mouseup: mouseup,
+        mousemove: mousemove
+    };
+    //needed for debugging
+    var TRIGGER_ID_TO_NAME_MAP = [
+
+        '$default'
+         ,
+        'init'
+         ,
+        'NODES_SELECTED_WITH_CLICK'
+         ,
+        'NODES_SELECTED_WITH_DRAG'
+         ,
+        'mousedown'
+         ,
+        'TOGGLE_TRANSFORM'
+         ,
+        'CHECK_NODES'
+         ,
+        'mouseup'
+         ,
+        'mousemove'
+
+        ];
+    //transition functions
+    var initial_default_init = function() {
+        return {
+            preemptedBasicStates: {
+                0: true,
+                1: true,
+                2: true,
+                3: true,
+                7: true,
+                8: true,
+                10: true,
+                11: true,
+                12: true,
+                13: true,
+                14: true,
+                15: true,
+                17: true,
+                18: true,
+                19: true,
+                20: true,
+                21: true,
+                22: true
+            },
+            action: function() {
+                //exit states
+                initial_default.exitAction();
+                //transition action
+                svg = _event.data.svg;
+                transformModule = _event.data.transformModule;
+                scaleHandle = _event.data.scaleHandle;
+                rotationHandle = _event.data.rotationHandle;
+                ellipseButton = _event.data.ellipseButton;
+                ellipseIcon = _event.data.ellipseIcon;
+                rectButton = _event.data.rectButton;
+                rectIcon = _event.data.rectIcon;
+                transformButton = _event.data.transformButton;
+                transformIcon = _event.data.transformIcon;
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //transition id
+                    listener.onTransition("initial_default", "main_initial", "initial_default_init_1");
+                }
+                //enter states
+                main.enterAction();
+                main_initial.enterAction();
+                //update configuration
+                currentConfiguration = [
+                    main_initial_id
+                    ];
+            }
+        }
+    }
+    var no_nodes_selected_NODES_SELECTED_WITH_CLICK = function() {
+        return {
+            preemptedBasicStates: {
+                1: true,
+                2: true,
+                3: true
+            },
+            action: function() {
+                //exit states
+                no_nodes_selected.exitAction();
+                //transition action
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //transition id
+                    listener.onTransition("no_nodes_selected", "nodes_selected_initial", "no_nodes_selected_NODES_SELECTED_WITH_CLICK_3");
+                }
+                //enter states
+                nodes_selected.enterAction();
+                nodes_selected_initial.enterAction();
+                //update configuration
+                currentConfiguration.splice(
+                currentConfiguration.indexOf(no_nodes_selected_id), 1, nodes_selected_initial_id);
+            }
+        }
+    }
+    var no_nodes_selected_NODES_SELECTED_WITH_DRAG = function() {
+        return {
+            preemptedBasicStates: {
+                1: true,
+                2: true,
+                3: true
+            },
+            action: function() {
+                //exit states
+                no_nodes_selected.exitAction();
+                //transition action
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //transition id
+                    listener.onTransition("no_nodes_selected", "nodes_selected_history", "no_nodes_selected_NODES_SELECTED_WITH_DRAG_4");
+                }
+                //enter states
+                nodes_selected.enterAction();
+                nodes_selected_history.enterAction();
+                //update configuration
+                currentConfiguration.splice(
+                currentConfiguration.indexOf(no_nodes_selected_id), 1, nodes_selected_history_id);
+            }
+        }
+    }
+    var no_nodes_selected_mousedown = function() {
+        if (_event.data.target === ellipseIcon) {
+            return {
+                preemptedBasicStates: {
+                    1: true,
+                    2: true,
+                    3: true,
+                    7: true,
+                    8: true
+                },
+                action: function() {
+                    //exit states
+                    transform_tool_selected.exitAction();
+                    //transition action
+                    for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var listener = listeners[N10000_iterator];
+                        //transition id
+                        listener.onTransition("no_nodes_selected", "ellipse_tool_selected", "no_nodes_selected_mousedown_5");
+                    }
+                    //enter states
+                    drawing_tool_selected.enterAction();
+                    ellipse_tool_selected.enterAction();
+                    //update configuration
+                    currentConfiguration.splice(
+                    currentConfiguration.indexOf(no_nodes_selected_id), 1, ellipse_tool_selected_id);
+                }
+            }
+        }
+        if (_event.data.target === rectIcon) {
+            return {
+                preemptedBasicStates: {
+                    1: true,
+                    2: true,
+                    3: true,
+                    7: true,
+                    8: true
+                },
+                action: function() {
+                    //exit states
+                    transform_tool_selected.exitAction();
+                    //transition action
+                    for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var listener = listeners[N10000_iterator];
+                        //transition id
+                        listener.onTransition("no_nodes_selected", "rect_tool_selected", "no_nodes_selected_mousedown_6");
+                    }
+                    //enter states
+                    drawing_tool_selected.enterAction();
+                    rect_tool_selected.enterAction();
+                    //update configuration
+                    currentConfiguration.splice(
+                    currentConfiguration.indexOf(no_nodes_selected_id), 1, rect_tool_selected_id);
+                }
+            }
+        }
+    }
+    var ready_to_rotate_mousedown = function() {
+        if (_event.data.target === ellipseIcon) {
+            return {
+                preemptedBasicStates: {
+                    1: true,
+                    2: true,
+                    3: true,
+                    7: true,
+                    8: true
+                },
+                action: function() {
+                    //exit states
+                    transform_tool_selected.exitAction();
+                    //transition action
+                    for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var listener = listeners[N10000_iterator];
+                        //transition id
+                        listener.onTransition("ready_to_rotate", "ellipse_tool_selected", "ready_to_rotate_mousedown_13");
+                    }
+                    //enter states
+                    drawing_tool_selected.enterAction();
+                    ellipse_tool_selected.enterAction();
+                    //update configuration
+                    currentConfiguration.splice(
+                    currentConfiguration.indexOf(ready_to_rotate_id), 1, ellipse_tool_selected_id);
+                }
+            }
+        }
+        if (_event.data.target === rectIcon) {
+            return {
+                preemptedBasicStates: {
+                    1: true,
+                    2: true,
+                    3: true,
+                    7: true,
+                    8: true
+                },
+                action: function() {
+                    //exit states
+                    transform_tool_selected.exitAction();
+                    //transition action
+                    for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var listener = listeners[N10000_iterator];
+                        //transition id
+                        listener.onTransition("ready_to_rotate", "rect_tool_selected", "ready_to_rotate_mousedown_14");
+                    }
+                    //enter states
+                    drawing_tool_selected.enterAction();
+                    rect_tool_selected.enterAction();
+                    //update configuration
+                    currentConfiguration.splice(
+                    currentConfiguration.indexOf(ready_to_rotate_id), 1, rect_tool_selected_id);
+                }
+            }
+        }
+    }
+    var ready_to_rotate_TOGGLE_TRANSFORM = function() {
+        return {
+            preemptedBasicStates: {
+                2: true,
+                3: true
+            },
+            action: function() {
+                //exit states
+                ready_to_rotate.exitAction();
+                //transition action
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //transition id
+                    listener.onTransition("ready_to_rotate", "ready_to_scale", "ready_to_rotate_TOGGLE_TRANSFORM_11");
+                }
+                //enter states
+                ready_to_scale.enterAction();
+                //update configuration
+                currentConfiguration.splice(
+                currentConfiguration.indexOf(ready_to_rotate_id), 1, ready_to_scale_id);
+            }
+        }
+    }
+    var ready_to_rotate_CHECK_NODES = function() {
+        if (selectedNodes.length === 0) {
+            return {
+                preemptedBasicStates: {
+                    1: true,
+                    2: true,
+                    3: true
+                },
+                action: function() {
+                    //exit states
+                    nodes_selected.exitAction();
+                    //transition action
+                    for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var listener = listeners[N10000_iterator];
+                        //transition id
+                        listener.onTransition("ready_to_rotate", "no_nodes_selected", "ready_to_rotate_CHECK_NODES_12");
+                    }
+                    //enter states
+                    no_nodes_selected.enterAction();
+                    //update configuration
+                    currentConfiguration.splice(
+                    currentConfiguration.indexOf(ready_to_rotate_id), 1, no_nodes_selected_id);
+                }
+            }
+        }
+    }
+    var ready_to_scale_mousedown = function() {
+        if (_event.data.target === ellipseIcon) {
+            return {
+                preemptedBasicStates: {
+                    1: true,
+                    2: true,
+                    3: true,
+                    7: true,
+                    8: true
+                },
+                action: function() {
+                    //exit states
+                    transform_tool_selected.exitAction();
+                    //transition action
+                    for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var listener = listeners[N10000_iterator];
+                        //transition id
+                        listener.onTransition("ready_to_scale", "ellipse_tool_selected", "ready_to_scale_mousedown_21");
+                    }
+                    //enter states
+                    drawing_tool_selected.enterAction();
+                    ellipse_tool_selected.enterAction();
+                    //update configuration
+                    currentConfiguration.splice(
+                    currentConfiguration.indexOf(ready_to_scale_id), 1, ellipse_tool_selected_id);
+                }
+            }
+        }
+        if (_event.data.target === rectIcon) {
+            return {
+                preemptedBasicStates: {
+                    1: true,
+                    2: true,
+                    3: true,
+                    7: true,
+                    8: true
+                },
+                action: function() {
+                    //exit states
+                    transform_tool_selected.exitAction();
+                    //transition action
+                    for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var listener = listeners[N10000_iterator];
+                        //transition id
+                        listener.onTransition("ready_to_scale", "rect_tool_selected", "ready_to_scale_mousedown_22");
+                    }
+                    //enter states
+                    drawing_tool_selected.enterAction();
+                    rect_tool_selected.enterAction();
+                    //update configuration
+                    currentConfiguration.splice(
+                    currentConfiguration.indexOf(ready_to_scale_id), 1, rect_tool_selected_id);
+                }
+            }
+        }
+    }
+    var ready_to_scale_TOGGLE_TRANSFORM = function() {
+        return {
+            preemptedBasicStates: {
+                2: true,
+                3: true
+            },
+            action: function() {
+                //exit states
+                ready_to_scale.exitAction();
+                //transition action
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //transition id
+                    listener.onTransition("ready_to_scale", "ready_to_rotate", "ready_to_scale_TOGGLE_TRANSFORM_19");
+                }
+                //enter states
+                ready_to_rotate.enterAction();
+                //update configuration
+                currentConfiguration.splice(
+                currentConfiguration.indexOf(ready_to_scale_id), 1, ready_to_rotate_id);
+            }
+        }
+    }
+    var ready_to_scale_CHECK_NODES = function() {
+        if (selectedNodes.length === 0) {
+            return {
+                preemptedBasicStates: {
+                    1: true,
+                    2: true,
+                    3: true
+                },
+                action: function() {
+                    //exit states
+                    nodes_selected.exitAction();
+                    //transition action
+                    for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var listener = listeners[N10000_iterator];
+                        //transition id
+                        listener.onTransition("ready_to_scale", "no_nodes_selected", "ready_to_scale_CHECK_NODES_20");
+                    }
+                    //enter states
+                    no_nodes_selected.enterAction();
+                    //update configuration
+                    currentConfiguration.splice(
+                    currentConfiguration.indexOf(ready_to_scale_id), 1, no_nodes_selected_id);
+                }
+            }
+        }
+    }
+    var nodes_selected_initial_$default = function() {
+        return {
+            preemptedBasicStates: {
+                2: true,
+                3: true
+            },
+            action: function() {
+                hasTakenDefaultTransition = true;
+                //exit states
+                nodes_selected_initial.exitAction();
+                //transition action
+                for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                N10000_iterator < N10000_hoist;
+                N10000_iterator++) {
+                    var listener = listeners[N10000_iterator];
+                    //transition id
+                    listener.onTransition("nodes_selected_initial", "ready_to_scale", "nodes_selected_initial_$default_27");
+                }
+                //enter states
+                ready_to_scale.enterAction();
+                //update configuration
+                currentConfiguration.splice(
+                currentConfiguration.indexOf(nodes_selected_initial_id), 1, ready_to_scale_id);
+            }
+        }
+    }
+    var nodes_selected_history_$default = function() {
+        //history state semantics
+        if (nodes_selected_history.lastConfiguration) {
+            return {
+                preemptedBasicStates: {
+                    2: true,
+                    3: true
+                },
+                action: function() {
+                    //transition action
+                    for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var l = listeners[N10000_iterator];
+                        //transition id
+                        l.onTransition("nodes_selected_history", "ready_to_scale", "nodes_selected_history_$default_29");
+                    }
+                    var historyState = nodes_selected_history;
+                    var newConfiguration = [];
+                    var historyStateParent = nodes_selected_history.parent;
+                    for (var N10000_iterator = 0, N10000_hoist = nodes_selected_history.lastConfiguration.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var state = nodes_selected_history.lastConfiguration[N10000_iterator];
+                        if (STATE_INT_ID_TO_OBJECT_MAP[state].ancestors.indexOf(historyStateParent) != -1) {
+                            var statesEntered = [STATE_INT_ID_TO_OBJECT_MAP[state]];
+                            for (var parent = STATE_INT_ID_TO_OBJECT_MAP[state].parent;
+                            parent != null && parent != historyState.parent;
+                            parent = parent.parent) {
+                                statesEntered.push(parent);
+                            }
+                            var topState = statesEntered.pop();
+                            topState.enterAction();
+                            newConfiguration.push(topState.initial ? topState.initial : topState);
+                        }
+                    }
+                    var filteredConfiguration = [];
+                    for (var N10000_iterator = 0, N10000_hoist = currentConfiguration.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var state = currentConfiguration[N10000_iterator];
+                        if (STATE_INT_ID_TO_OBJECT_MAP[state].ancestors.indexOf(historyStateParent) == -1) {
+                            filteredConfiguration.push(state);
+                        }
+                    }
+                    newConfiguration = newConfiguration.concat(filteredConfiguration)
+                    var historyTriggerDispatcherCurrentConfigurationAssignmentRHS = new Array(newConfiguration.length);
+                    for (var N10000_iterator = 0, N10000_hoist = newConfiguration.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var sObj = newConfiguration[N10000_iterator];
+                        historyTriggerDispatcherCurrentConfigurationAssignmentRHS[N10000_iterator] = sObj.id;
+                    }
+                    currentConfiguration = historyTriggerDispatcherCurrentConfigurationAssignmentRHS;
+                }
+            }
+        } else {
+            return {
+                preemptedBasicStates: {
+                    2: true,
+                    3: true
+                },
+                action: function() {
+                    hasTakenDefaultTransition = true;
+                    //exit states
+                    nodes_selected_history.exitAction();
+                    //transition action
+                    for (var N10000_iterator = 0, N10000_hoist = listeners.length;
+                    N10000_iterator < N10000_hoist;
+                    N10000_iterator++) {
+                        var listener = listeners[N10000_iterator];
+                        //transition id
+                        listener.onTransition("nodes_selected_history", "ready_to_scale", "nodes_selected_history_$default_29");
+                    }
+                    //enter states
+                    ready_to_scale.enterAction();
+                    //update configuration
+                    currentConfiguration.splice(
+                    currentConfiguration.indexOf(nodes_selected_history_id), 1, ready_to_scale_id);
+                }
+            }
+        }
+    }
+    var transform_tool_selected_initial_$default = function() {
+        if (selectedNodes.length === 0) {

[... 2417 lines stripped ...]


Mime
View raw message