Rensselaer Center for Open Source Software

began writing the redraw function thinking about APIs, local version will load new script server version will load old script

4 files changed, 39 lines added, 13 lines removed

Changes

--- clientSide/spreadsheet/script/newLayoutcontrol.js cf19ba5373b7932d5fd51a1183964614d9b232d9
+++ clientSide/spreadsheet/script/newLayoutcontrol.js d58b2f0157d00d86c51a383c853f5ca58308324e
@@ -8,6 +8,9 @@
+// Width and height for the labled cells
+var labelCellHeight = 18;
+var labelCellWidth = 40;
@@ -25,7 +28,6 @@
-
@@ -37,7 +39,7 @@
-}
+});
@@ -47,9 +49,24 @@
+  redrawFrame();
-
+  //////////////////////////////////////////////////////////////////////////////
+ /////////////////////////////// SCROLL BAR API ///////////////////////////////
+//////////////////////////////////////////////////////////////////////////////
+/**************************** GET SCROLL X POSITION ***************************\
+|
+\******************************************************************************/
+function getScrollX () {  
+  return 0;
+}
+/**************************** GET SCROLL Y POSITION ***************************\
+|
+\******************************************************************************/
+function getScrollY () {
+  return 0;
+}
@@ -58,25 +75,32 @@
-
-  
-
-
+  alert("redrawing");
+  // get the application
+  // 
-
+  
+  // get the context of the canvas so we can draw on it
-
-  // draw the grid lines
+  // Draw the first two grid lines for the cell labels
+  context.moveTo(labelCellWidth+0.5,0);
+  context.lineTo(labelCellWidth+0.5,c_canvas.height);
+  context.moveTo(0, labelCellHeight+0.5);
+  context.lineTo(c_canvas.width,labelCellHeight+0.5);
-  for (var i = 
+  
+  //Draw the other Grid lines
+  var startx = ~~(getScrollX() / defaultCellWidht);
+  
+  /*
@@ -85,6 +109,7 @@
+  */
--- clientSide/spreadsheet/spreadsheet.html cf19ba5373b7932d5fd51a1183964614d9b232d9
+++ clientSide/spreadsheet/spreadsheet.html d58b2f0157d00d86c51a383c853f5ca58308324e
@@ -22,9 +22,10 @@
-    <!--LOCAL--> <script type="text/javascript" src="script/layoutControl.js"></script><!--LOCAL-->
+    <!--LOCAL-- <script type="text/javascript" src="script/layoutControl.js"></script><!--LOCAL-->
+    <!--LOCAL--> <script type="text/javascript" src="script/newLayoutcontrol.js"></script><!--LOCAL-->
-    <!--LOCAL--> <script type="text/javascript" src="script/draw.js"></script>         <!--LOCAL-->
+    <!--LOCAL-- <script type="text/javascript" src="script/draw.js"></script>         <!--LOCAL-->
Briefcase • 58 weeks ago