OLD | NEW |
1 <!-- | 1 <!-- |
2 Copyright (C) 2012 Google Inc. All rights reserved. | 2 Copyright (C) 2012 Google Inc. All rights reserved. |
3 | 3 |
4 Redistribution and use in source and binary forms, with or without | 4 Redistribution and use in source and binary forms, with or without |
5 modification, are permitted provided that the following conditions | 5 modification, are permitted provided that the following conditions |
6 are met: | 6 are met: |
7 | 7 |
8 1. Redistributions of source code must retain the above copyright | 8 1. Redistributions of source code must retain the above copyright |
9 notice, this list of conditions and the following disclaimer. | 9 notice, this list of conditions and the following disclaimer. |
10 2. Redistributions in binary form must reproduce the above copyright | 10 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 function drawPausedInDebuggerMessage(message) | 117 function drawPausedInDebuggerMessage(message) |
118 { | 118 { |
119 var pausedInDebugger = document.getElementById("paused-in-debugger"); | 119 var pausedInDebugger = document.getElementById("paused-in-debugger"); |
120 pausedInDebugger.textContent = message; | 120 pausedInDebugger.textContent = message; |
121 pausedInDebugger.style.visibility = "visible"; | 121 pausedInDebugger.style.visibility = "visible"; |
122 document.body.classList.add("dimmed"); | 122 document.body.classList.add("dimmed"); |
123 } | 123 } |
124 | 124 |
125 function _drawGrid(highlight, rulerAtRight, rulerAtBottom) | 125 function _drawGrid(highlight, rulerAtRight, rulerAtBottom) |
126 { | 126 { |
| 127 if (!highlight.showRulers) |
| 128 return; |
127 context.save(); | 129 context.save(); |
128 | 130 |
129 var width = canvas.width; | 131 var width = canvas.width; |
130 var height = canvas.height; | 132 var height = canvas.height; |
131 | 133 |
132 const gridSubStep = 5; | 134 const gridSubStep = 5; |
133 const gridStep = 50; | 135 const gridStep = 50; |
134 | 136 |
135 { | 137 { |
136 // Draw X grid background | 138 // Draw X grid background |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 | 398 |
397 context.restore(); | 399 context.restore(); |
398 | 400 |
399 elementTitle.style.visibility = "visible"; | 401 elementTitle.style.visibility = "visible"; |
400 elementTitle.style.top = (boxY + 3) + "px"; | 402 elementTitle.style.top = (boxY + 3) + "px"; |
401 elementTitle.style.left = (boxX + 3) + "px"; | 403 elementTitle.style.left = (boxX + 3) + "px"; |
402 } | 404 } |
403 | 405 |
404 function _drawRulers(highlight, rulerAtRight, rulerAtBottom) | 406 function _drawRulers(highlight, rulerAtRight, rulerAtBottom) |
405 { | 407 { |
| 408 if (!highlight.showRulers) |
| 409 return; |
406 context.save(); | 410 context.save(); |
407 var width = canvas.width; | 411 var width = canvas.width; |
408 var height = canvas.height; | 412 var height = canvas.height; |
409 context.strokeStyle = "rgba(128, 128, 128, 0.3)"; | 413 context.strokeStyle = "rgba(128, 128, 128, 0.3)"; |
410 context.lineWidth = 1; | 414 context.lineWidth = 1; |
411 context.translate(0.5, 0.5); | 415 context.translate(0.5, 0.5); |
412 var leftmostXForY = {}; | 416 var leftmostXForY = {}; |
413 var rightmostXForY = {}; | 417 var rightmostXForY = {}; |
414 var topmostYForX = {}; | 418 var topmostYForX = {}; |
415 var bottommostYForX = {}; | 419 var bottommostYForX = {}; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 </body> | 563 </body> |
560 <canvas id="canvas" class="fill"></canvas> | 564 <canvas id="canvas" class="fill"></canvas> |
561 <div id="element-title"> | 565 <div id="element-title"> |
562 <span id="tag-name"></span><span id="node-id"></span><span id="class-name"></s
pan> | 566 <span id="tag-name"></span><span id="node-id"></span><span id="class-name"></s
pan> |
563 <span id="node-width"></span><span class="px">px</span><span class="px"> ×
; </span><span id="node-height"></span><span class="px">px</span> | 567 <span id="node-width"></span><span class="px">px</span><span class="px"> ×
; </span><span id="node-height"></span><span class="px">px</span> |
564 </div> | 568 </div> |
565 <div id="right-gutter"></div> | 569 <div id="right-gutter"></div> |
566 <div id="bottom-gutter"></div> | 570 <div id="bottom-gutter"></div> |
567 <div id="log"></div> | 571 <div id="log"></div> |
568 </html> | 572 </html> |
OLD | NEW |