1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-07 09:18:06 +00:00

Add tv-widgetnode-width and tv-widgetnode-height (#6681)

* Add tv-widgetnode-width and tv-widgetnode-height to collectDOMVariables

* Add docs

* update docs

* Update modified field
This commit is contained in:
Simon Huber
2022-05-09 11:42:23 +02:00
committed by GitHub
parent 4b8594c4a8
commit b4deb7cc45
2 changed files with 8 additions and 1 deletions

View File

@@ -304,6 +304,11 @@ exports.collectDOMVariables = function(selectedNode,domNode,event) {
variables["tv-selectednode-height"] = selectedNode.offsetHeight.toString();
}
}
if(domNode && domNode.offsetWidth) {
variables["tv-widgetnode-width"] = domNode.offsetWidth.toString();
variables["tv-widgetnode-height"] = domNode.offsetHeight.toString();
}
if(event && event.clientX && event.clientY) {
if(selectedNode) {