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

@@ -70,6 +70,12 @@ NavigateWidget.prototype.invokeAction = function(triggeringWidget,event) {
navigateFromNode: triggeringWidget,
navigateFromClientRect: bounds && { top: bounds.top, left: bounds.left, width: bounds.width, right: bounds.right, bottom: bounds.bottom, height: bounds.height
},
navigateFromClientTop: bounds && bounds.top,
navigateFromClientLeft: bounds && bounds.left,
navigateFromClientWidth: bounds && bounds.width,
navigateFromClientRight: bounds && bounds.right,
navigateFromClientBottom: bounds && bounds.bottom,
navigateFromClientHeight: bounds && bounds.height,
navigateSuppressNavigation: suppressNavigation,
metaKey: event.metaKey,
ctrlKey: event.ctrlKey,