commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbe...@apache.org
Subject svn commit: r984034 - in /commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool: behaviour/canvas.xml drawing-tool.html
Date Tue, 10 Aug 2010 14:20:00 GMT
Author: jbeard
Date: Tue Aug 10 14:19:59 2010
New Revision: 984034

URL: http://svn.apache.org/viewvc?rev=984034&view=rev
Log:
Drawing tool demo now compiles correctly. Next step is to debug it and make it work.

Modified:
    commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/behaviour/canvas.xml
    commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/drawing-tool.html

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/behaviour/canvas.xml
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/behaviour/canvas.xml?rev=984034&r1=984033&r2=984034&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/behaviour/canvas.xml (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/behaviour/canvas.xml Tue Aug
10 14:19:59 2010
@@ -203,7 +203,7 @@ In both:
 
 		<!-- dynamically changing data -->
 		<data id="selectedNodes" expr="[]"/>
-		<data id="nodesOnCanvas" expr="[]"/>
+		<data id="allNodes" expr="[]"/>
 
 	</datamodel>
 
@@ -226,7 +226,7 @@ In both:
 
 	<parallel id="main">
 
-		<state id="presentation_state">
+		<state id="presentation_state" initial="rect_tool_selected">
 
 			<state id="transform_tool_selected">
 				<onentry>
@@ -289,8 +289,8 @@ In both:
 
 				</state>
 		
-				<transition target="ellipse_tool_selected" event="mousedown" cond="_event.data.target
=== rotationButtonHandle"/>
-				<transition target="rect_tool_selected" event="mousedown" cond="_event.data.target
=== scaleButtonHandle"/>
+				<transition target="ellipse_tool_selected" event="mousedown" cond="_event.data.target
=== ellipseIcon"/>
+				<transition target="rect_tool_selected" event="mousedown" cond="_event.data.target
=== rectIcon"/>
 			</state>
 
 			<state id="drawing_tool_selected">
@@ -306,7 +306,7 @@ In both:
 						</script>
 					</onexit>
 
-					<transition target="rect_tool_selected" event="mousedown" cond="_event.data.target
=== scaleButtonHandle"/>
+					<transition target="rect_tool_selected" event="mousedown" cond="_event.data.target
=== rectIcon"/>
 				</state>
 
 				<state id="rect_tool_selected">
@@ -321,21 +321,22 @@ In both:
 						</script>
 					</onexit>
 
-					<transition target="ellipse_tool_selected" event="mousedown" cond="_event.data.target
=== rotationButtonHandle"/>
+					<transition target="ellipse_tool_selected" event="mousedown" cond="_event.data.target
=== ellipseIcon"/>
 				</state>
 
 				<!-- TODO: add reference to transform button handle -->
-				<transition target="transform_tool_selected" event="mousedown" cond="_event.data.target
=== transformButtonHandle"/>
+				<transition target="transform_tool_selected" event="mousedown" cond="_event.data.target
=== transformIcon"/>
 			</state>
 		</state>
 
-		<state id="processing_events">
+		<state id="processing_events" initial="ready">
 			<datamodel>
 				<data id="clickedNode"/>
 
 				<data id="firstEvent"/>
 				<data id="eventStamp"/>
 				<data id="tDelta"/>
+				<data id="rDelta"/>
 				<data id="cachedCenterPoint"/>
 				<data id="cachedBBox"/>
 
@@ -508,7 +509,7 @@ In both:
 				</transition>
 
 				<transition target="rotating" event="mousemove">
-					<assign target="rDelta" expr="computeRDelta(eventStamp,_event.data,cachedCenterPoint)"/>
+					<assign location="rDelta" expr="computeRDelta(eventStamp,_event.data,cachedCenterPoint)"/>
 					<assign location="eventStamp" expr="_event.data"/>
 					<script><![CDATA[
 						for(var i=0,l=selectedNodes.length; i < l; i++){

Modified: commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/drawing-tool.html
URL: http://svn.apache.org/viewvc/commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/drawing-tool.html?rev=984034&r1=984033&r2=984034&view=diff
==============================================================================
--- commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/drawing-tool.html (original)
+++ commons/sandbox/gsoc/2010/scxml-js/trunk/demo/drawing-tool/drawing-tool.html Tue Aug 10
14:19:59 2010
@@ -118,11 +118,11 @@
                   stroke:"black"
                 });
 
-								var scaleHandle = svg.path("M 0 0 L -4 6 L -2 6 L -2 12 L -4 12 L 0 18 L 4 12 L 2
12 L 2 6 L 4 6 L 0 0 z",{
-									transform:"rotate(-45)",
-									visibility:"hidden"
-								})
-								var rotationHandle =  svg.path("M 12 0 L 17 5 L 15 5 Q 15 15 5 15 L 5 17 L 0 12 L
5 7 L 5 9 Q 9 9 9 5 L 7 5 L 12 0 z",{visibility:"hidden"})
+		var scaleHandle = svg.path("M 0 0 L -4 6 L -2 6 L -2 12 L -4 12 L 0 18 L 4 12 L 2 12 L
2 6 L 4 6 L 0 0 z",{
+		  transform:"rotate(-45)",
+		  visibility:"hidden"
+		})
+		var rotationHandle =  svg.path("M 12 0 L 17 5 L 15 5 Q 15 15 5 15 L 5 17 L 0 12 L 5 7 L
5 9 Q 9 9 9 5 L 7 5 L 12 0 z",{visibility:"hidden"})
 
                 function hookUpDOMEvents(node,compiledStatechartInstance){
                   //hook up DOM events
@@ -174,21 +174,21 @@
                         //hook up canvas behaviour
                         var canvasSC = new CanvasStatechartExecutionContext(); 
 
-												svg.statechart = canvasSC;	//hook up dom node reference
+			svg.statechart = canvasSC;	//hook up dom node reference
 
                         canvasSC.initialize();
                         
                         //pass in reference to rect
                         canvasSC.init({  
                           svg:svg,
-													scaleHandle:scaleHandle,
-													rotationHandle:rotationHandle,
+			  scaleHandle:scaleHandle,
+			  rotationHandle:rotationHandle,
                           ellipseButton:ellipseButton,
                           rectButton:rectButton,
                           transformButton:transformButton,
                           ellipseIcon:ellipseButtonIcon,
                           rectIcon:rectButtonIcon,
-                          transformIcon:transformIcon
+                          transformIcon:transformButtonIcon 
                         });   
 
                         hookUpDOMEvents(svg.root(),canvasSC);



Mime
View raw message