@teachinglab/omd 0.1.7 → 0.1.9

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.
@@ -1,5 +1,5 @@
1
1
  import { omdColor } from '../../src/omdColor.js';
2
- import { jsvgLayoutGroup, jsvgTextBox } from '@teachinglab/jsvg';
2
+ import { jsvgLayoutGroup, jsvgTextBox, jsvgRect } from '@teachinglab/jsvg';
3
3
  /**
4
4
  * Creates interactive step elements using jsvgLayoutGroup for multiple simplification steps
5
5
  * Each step is a separate jsvgTextBox that can have hover interactions with the omdSequence
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teachinglab/omd",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "omd",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",
@@ -103,11 +103,8 @@ export class omdBalanceHanger extends jsvgGroup
103
103
  const displayWidth = Math.max(300, contentWidth + padding);
104
104
  const displayHeight = Math.max(200, contentHeight + padding);
105
105
  this.setWidthAndHeight(displayWidth, displayHeight);
106
- // Store desired viewBox on the group so the wrapper <svg> can use it
107
- // Centered on (0,0) to accommodate negative/positive coordinates used above
108
106
  this.svgObject.setAttribute("viewBox", `${-displayWidth/2} ${-displayHeight/2} ${displayWidth} ${displayHeight}`);
109
- // Ensure no extra offset; content already drawn around origin
110
- this.setPosition(0, 0);
107
+ this.setPosition(-displayWidth / 2, -displayHeight / 2);
111
108
  }
112
109
 
113
110
  makeValueStack( values, xOffset, yOffset )