Changeset 2118 for lang/ruby/RubyESRIShape
- Timestamp:
- 11/28/07 16:52:27 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/RubyESRIShape/test/shape-test/sample/jsonp_map.js
r2116 r2118 20 20 var ShapeColors = {"bnda_1_1": "#897", "trans_rails": "#007", "transp_1_1": "#259"}; 21 21 var ShapeWidths = {"bnda_1_1": 0.5, "trans_rails": 1, "transp_1_1": 1}; 22 var ShapeFillColors = {"bnda_1_1": "#eeffe0", "trans_rails": null, "transp_1_1": null}; 22 23 23 24 var OUT; … … 132 133 g.lineWidth = ShapeWidths[ ShapeName ]; 133 134 g.strokeStyle = ShapeColors[ ShapeName ]; 135 g.fillStyle = ShapeFillColors[ ShapeName ]; 134 136 var d = new DrawingTask(ShapeData, g, theCanvas.width-0, theCanvas.height-0); 135 137 var _this = this; … … 149 151 this.currentPoint = 0; 150 152 this.data = data; 153 this.newPath = true; 151 154 } 152 155 153 156 DrawingTask.prototype = { 154 157 start: function() { 158 if (ShapeType != "point") 159 this.g.beginPath(); 160 155 161 this.next(); 156 162 }, … … 192 198 (sx2 < this.width && sx2 >= 0 && sy2 < this.height && sy2 >= 0)) 193 199 { 194 this.g.moveTo(sx1, sy1); 200 if (this.newPath) 201 { 202 this.newPath = false; 203 this.g.moveTo(sx1, sy1); 204 } 195 205 this.g.lineTo(sx2, sy2); 196 206 } … … 226 236 if (ShapeType != "point") 227 237 { 238 if (ShapeFillColors[ ShapeName ]) 239 this.g.fill(); 228 240 this.g.stroke(); 229 241 this.g.beginPath(); 230 } 242 this.newPath = true; 243 } 244 231 245 return this.popNextLine(); 232 246 } … … 259 273 AirportIcon.src = "apt.png" 260 274 275 document.getElementById("theCanvas").style.background = "#f0f2ff"; 261 276 AirportLabel = new HTMLLabel(document.body, document.getElementById("theCanvas")); 262 277
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)