1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-13 22:07:15 +00:00

tm-navigate: add separate properties to access bounds of client rectangle

Makes it easier to use the client rectangle information within an action handler
This commit is contained in:
jeremy@jermolene.com
2021-07-05 09:52:17 +01:00
parent 1b55eb9eee
commit 56068d8215
3 changed files with 19 additions and 1 deletions

View File

@@ -154,6 +154,12 @@ LinkWidget.prototype.handleClickEvent = function(event) {
navigateFromNode: this,
navigateFromClientRect: { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height
},
navigateFromClientTop: bounds.top,
navigateFromClientLeft: bounds.left,
navigateFromClientWidth: bounds.width,
navigateFromClientRight: bounds.right,
navigateFromClientBottom: bounds.bottom,
navigateFromClientHeight: bounds.height,
navigateSuppressNavigation: event.metaKey || event.ctrlKey || (event.button === 1),
metaKey: event.metaKey,
ctrlKey: event.ctrlKey,