@teachinglab/omd 0.7.23 → 0.7.25
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.
- package/canvas/ui/cursor.js +4 -3
- package/canvas/ui/toolbar.js +5 -0
- package/package.json +1 -1
- package/src/omd.js +4 -0
package/canvas/ui/cursor.js
CHANGED
|
@@ -196,12 +196,13 @@ export class Cursor {
|
|
|
196
196
|
const group = document.createElementNS('http://www.w3.org/2000/svg', 'g');
|
|
197
197
|
group.setAttribute('data-shape', 'pointer');
|
|
198
198
|
|
|
199
|
-
//
|
|
199
|
+
// Use the same pointer cursor as the toolbar icon
|
|
200
200
|
const path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
201
|
-
path.setAttribute('d', '
|
|
201
|
+
path.setAttribute('d', 'M1.63448 2.04462C1.60922 1.98633 1.60208 1.92179 1.61397 1.85938C1.62585 1.79697 1.65623 1.73958 1.70116 1.69466C1.74608 1.64973 1.80347 1.61935 1.86588 1.60747C1.92829 1.59558 1.99283 1.60272 2.05112 1.62798L12.2911 5.78798C12.3534 5.81335 12.4061 5.85768 12.4417 5.91469C12.4774 5.9717 12.4941 6.03849 12.4897 6.10557C12.4852 6.17266 12.4597 6.23663 12.4169 6.28842C12.374 6.3402 12.3159 6.37717 12.2508 6.39406L8.33144 7.40526C8.11 7.46219 7.90784 7.5774 7.74599 7.73891C7.58415 7.90042 7.46852 8.10234 7.41112 8.32366L6.40056 12.2443C6.38367 12.3094 6.3467 12.3675 6.29492 12.4104C6.24313 12.4532 6.17916 12.4787 6.11207 12.4832C6.04499 12.4876 5.9782 12.4709 5.92119 12.4352C5.86419 12.3996 5.81985 12.3469 5.79448 12.2846L1.63448 2.04462Z');
|
|
202
202
|
path.setAttribute('fill', 'white');
|
|
203
203
|
path.setAttribute('stroke', '#000000');
|
|
204
|
-
path.setAttribute('stroke-width', '1.
|
|
204
|
+
path.setAttribute('stroke-width', '1.28');
|
|
205
|
+
path.setAttribute('stroke-linecap', 'round');
|
|
205
206
|
path.setAttribute('stroke-linejoin', 'round');
|
|
206
207
|
|
|
207
208
|
group.appendChild(path);
|
package/canvas/ui/toolbar.js
CHANGED
package/package.json
CHANGED
package/src/omd.js
CHANGED
|
@@ -28,6 +28,7 @@ import { omdRectangle } from "./omdShapes.js";
|
|
|
28
28
|
import { omdEllipse } from "./omdShapes.js";
|
|
29
29
|
import { omdCircle } from "./omdShapes.js";
|
|
30
30
|
import { omdRegularPolygon } from "./omdShapes.js";
|
|
31
|
+
import { omdLabel } from "./omdLabel.js";
|
|
31
32
|
import { jsvgContainer } from "@teachinglab/jsvg";
|
|
32
33
|
|
|
33
34
|
export class omd extends jsvgContainer
|
|
@@ -172,6 +173,9 @@ export class omd extends jsvgContainer
|
|
|
172
173
|
case "regularPolygon":
|
|
173
174
|
N = new omdRegularPolygon();
|
|
174
175
|
break;
|
|
176
|
+
case "label":
|
|
177
|
+
N = new omdLabel();
|
|
178
|
+
break;
|
|
175
179
|
default:
|
|
176
180
|
console.error(`Unsupported OMD type: ${omdType}. Available types: number, variable, operator, term, expression, powerExpression, rationalExpression, function, equation, numberLine, balanceHanger, tapeDiagram, numberTile, ratioChart, coordinatePlane, spinner, table, tileEquation, rightTriangle, isoscelesTriangle, rectangle, ellipse, circle, regularPolygon`);
|
|
177
181
|
return;
|