@wiris/mathtype-viewer 1.1.0 → 1.2.0
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/dist/WIRISplugins.js +563 -735
- package/package.json +2 -2
- package/src/app.ts +17 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wiris/mathtype-viewer",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "app.js",
|
|
6
6
|
"scripts": {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"author": "Integrations",
|
|
16
16
|
"license": "ISC",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@wiris/mathtype-html-integration-devkit": "1.
|
|
18
|
+
"@wiris/mathtype-html-integration-devkit": "1.14.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"babel-loader": "^9.1.2",
|
package/src/app.ts
CHANGED
|
@@ -44,22 +44,23 @@ async function main(w: Window): Promise<void> {
|
|
|
44
44
|
properties.render();
|
|
45
45
|
|
|
46
46
|
// Callback called every time there is a mutation in the watched DOM element
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
//
|
|
57
|
-
//
|
|
58
|
-
.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
47
|
+
// Feature temporarily disabled due to KB-37834
|
|
48
|
+
// new MutationObserver(async (mutationList, observer) => {
|
|
49
|
+
// for (const mutation of mutationList) {
|
|
50
|
+
// for (const node of mutation.addedNodes) {
|
|
51
|
+
// if (node instanceof HTMLElement) {
|
|
52
|
+
// await properties.render();
|
|
53
|
+
// }
|
|
54
|
+
// }
|
|
55
|
+
// }
|
|
56
|
+
// })
|
|
57
|
+
// // We need to watch over the whole document, in case the Properties.element is inserted
|
|
58
|
+
// // e.g. we set Properties.element = '#renderArea' and then we append <div id="renderArea">$$2+2=4$$</div> to the document
|
|
59
|
+
// .observe(document, {
|
|
60
|
+
// attributes: true, // In case an attribute is changed in a <math> node, for instance
|
|
61
|
+
// childList: true, // In case a new <math> or $$latex$$ node is added, for instance
|
|
62
|
+
// subtree: true, // In case a <math> node is added as a descendant of the observed element, for instance
|
|
63
|
+
// });
|
|
63
64
|
};
|
|
64
65
|
|
|
65
66
|
// https://developer.mozilla.org/en-US/docs/Web/API/Document/DOMContentLoaded_event#checking_whether_loading_is_already_complete
|