@teachinglab/omd 0.2.6 → 0.2.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -60,21 +60,6 @@ export class Toolbar {
60
60
 
61
61
  // Add to main SVG so it is rendered
62
62
  this.canvas.svg.appendChild(this.toolbarGroup.svgObject);
63
-
64
-
65
- // Check if the SVG is actually in the DOM
66
- setTimeout(() => {
67
-
68
-
69
- // Check the actual SVG content
70
- console.log('Toolbar SVG innerHTML:', this.toolbarGroup.svgObject.innerHTML);
71
- console.log('Background SVG object:', this.background.svgObject);
72
- console.log('Background SVG innerHTML:', this.background.svgObject.outerHTML);
73
-
74
- // Check if the background is visible
75
- console.log('Background fill color:', this.background.svgObject.getAttribute('fill'));
76
- console.log('Background width/height:', this.background.svgObject.getAttribute('width'), this.background.svgObject.getAttribute('height'));
77
- }, 100);
78
63
  }
79
64
 
80
65
  /**
@@ -27,8 +27,8 @@ const defaultConfig = {
27
27
  stepVisualizer: {
28
28
  dotSizes: {
29
29
  level0: 8,
30
- level1: 6,
31
- level2: 4
30
+ level1: 8,
31
+ level2: 8
32
32
  },
33
33
  fontWeights: {
34
34
  level0: 400,
@@ -34,7 +34,9 @@ export class omdEquationStack extends jsvgGroup {
34
34
 
35
35
  // The sequence is the core. If a visualizer is needed, that's our sequence.
36
36
  if (options.stepVisualizer) {
37
- this.sequence = new omdStepVisualizer(steps);
37
+ // Pass through step visualizer styling options
38
+ const stepVisualizerStyling = this.stylingOptions?.stepVisualizer || {};
39
+ this.sequence = new omdStepVisualizer(steps, stepVisualizerStyling);
38
40
  } else {
39
41
  this.sequence = new omdEquationSequenceNode(steps);
40
42
  }
@@ -44,6 +46,13 @@ export class omdEquationStack extends jsvgGroup {
44
46
  this.sequence.setDefaultEquationBackground(this.stylingOptions.equationBackground);
45
47
  }
46
48
 
49
+ // Apply step visualizer background styling if provided
50
+ if (options.stepVisualizer && this.stylingOptions?.stepVisualizerBackground) {
51
+ if (typeof this.sequence.setBackgroundStyle === 'function') {
52
+ this.sequence.setBackgroundStyle(this.stylingOptions.stepVisualizerBackground);
53
+ }
54
+ }
55
+
47
56
  // If a toolbar is needed, create it.
48
57
  if (this.toolbarOptions?.enabled) {
49
58
  // Default undo: call global hook if provided
@@ -508,7 +517,7 @@ export class omdEquationStack extends jsvgGroup {
508
517
  }
509
518
  if (seq.layoutManager) {
510
519
  try {
511
- seq.layoutManager.updateVisualLayout();
520
+ seq.layoutManager.updateVisualLayout(true); // Allow repositioning for equation stack changes
512
521
  seq.layoutManager.updateVisualVisibility();
513
522
  seq.layoutManager.updateAllLinePositions();
514
523
  } catch (_) {}