diff --git a/core/modules/widgets/action-navigate.js b/core/modules/widgets/action-navigate.js index 909d23929..2df6a011f 100644 --- a/core/modules/widgets/action-navigate.js +++ b/core/modules/widgets/action-navigate.js @@ -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, diff --git a/core/modules/widgets/link.js b/core/modules/widgets/link.js index d1742af24..0243d9d56 100755 --- a/core/modules/widgets/link.js +++ b/core/modules/widgets/link.js @@ -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, diff --git a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-navigate.tid b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-navigate.tid index dfd9a8bcc..8ab6ef1a9 100644 --- a/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-navigate.tid +++ b/editions/tw5.com/tiddlers/messages/WidgetMessage_ tm-navigate.tid @@ -1,5 +1,5 @@ created: 20140226085215941 -modified: 20140226085454346 +modified: 20210705094948968 tags: Messages title: WidgetMessage: tm-navigate type: text/vnd.tiddlywiki @@ -13,6 +13,12 @@ The navigate message requires the following properties on the `event` object: |navigateTo |Title of the tiddler that is being navigated | |navigateFromTitle |Title of the tiddler from which the navigation was initiated | |navigateFromClientRect |Bounding rectangle in client page coordinates of the element initiating the navigation | +|navigateFromClientTop |Y coordinate of top edge of bounding client rectangle | +|navigateFromClientLeft |X coordinate of left edge of bounding client rectangle | +|navigateFromClientWidth |Width of bounding client rectangle | +|navigateFromClientRight |X coordinate of right edge of bounding client rectangle | +|navigateFromClientBottom |Y coordinate of bottom edge of bounding client rectangle | +|navigateFromClientHeight |Height of bounding client rectangle | |navigateSuppressNavigation |''true'' causes the new tiddler to only be added to the story, and not the history stack. This suppresses the scrolling associated with navigating to a tiddler | The navigate message can be generated by the LinkWidget, the ActionNavigateWidget and the ButtonWidget, and is handled by the NavigatorWidget.