Skip to content

Commit d2c6263

Browse files
committed
feat: Add getValue and setValue support for SVG elements; Update dashboard and health journal components with new structure and CoCreateJS integration.
1 parent 3571274 commit d2c6263

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎src/getValue.js‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
import { processOperators } from "@cocreate/utils";
1+
import { processOperators } from "@cocreate/utils";
22

33
const storage = new Map();
44

55
HTMLElement.prototype.getValue = function () {
66
let value = getValue(this);
77
return value;
88
};
9+
SVGElement.prototype.getValue = function () {
10+
let value = getValue(this);
11+
return value;
12+
};
913

1014
// TODO: return blobs for element.src and for link.href (Not addressed)
1115

‎src/setValue.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ import { storage } from "./getValue";
33
HTMLElement.prototype.setValue = function (value, dispatch) {
44
setValue(this, value, dispatch);
55
};
6+
SVGElement.prototype.setValue = function (value, dispatch) {
7+
setValue(this, value, dispatch);
8+
};
69

710
// TODO: check if using a a switch case will provide better performance
811
const setValue = (el, value, dispatch) => {

0 commit comments

Comments
 (0)