Skip to content

Commit b627f04

Browse files
committed
add some padding
1 parent 5da065a commit b627f04

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

‎v3/css/pytutor.css‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,10 @@ div.ExecutionVisualizer div.heapObject {
491491
padding-left: 2px; /* leave a TINY amount of room for connector endpoints */
492492
}
493493

494+
div.ExecutionVisualizer div.heapPrimitive {
495+
padding-left: 4px; /* leave some more room for connector endpoints */
496+
}
497+
494498
div.ExecutionVisualizer div#stackHeader {
495499
margin-bottom: 15px;
496500
text-align: right;

‎v3/js/pytutor.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2067,7 +2067,9 @@ ExecutionVisualizer.prototype.renderDataStructures = function() {
20672067
assert(obj.length == 2);
20682068

20692069
var primitiveVal = obj[1];
2070-
renderPrimitiveObject(primitiveVal, d3DomElement);
2070+
// add a bit of padding to heap primitives, for aesthetics
2071+
d3DomElement.append('<div class="heapPrimitive"></div>');
2072+
renderPrimitiveObject(primitiveVal, d3DomElement.find('div.heapPrimitive'));
20712073
}
20722074
else {
20732075
// render custom data type

0 commit comments

Comments
 (0)