1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-04 11:13:15 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/mechanisms
FlashSystems 5b85786f73
Fix popup position if popup is triggered from within an offsetParent element (#6887)
* Fix popup location for tables

This commit introduces the `popupAbsCoords` option to the $button widget
and implements an absolut coordinate format.

Coordinates for popups are stored in the format `(x,y,w,h)`. These
coordinates are relative to the offset parent of the element that
defines the popup.

This commits adds a second format `@(x,y,w,h)`. Coordinates specified in
this format a relative to the pages root element.

The `popupAbsCoords` option of the $button widget enables the use of
this coordinates.

* Unify the declaration of the RegEx for parsing the popup-position

The regular expression was declared in three locations with the same
content. This commit supplies a new function `parseCoordinates` in
`popup.js`. This function returns the parsed coordinates and understands
the classic/absolute coordinates.

This function is used in `reveal.js` and `action-popup.js` to parse the
coordinates.

* Add documentation for coordinate systems

* Consolidate creating coordinate strings

The Popup object now contains a `buildCoordinates` method that can be
used to build coordinate strings. It takes an "enum" for the coordinate-
system to use. This makes everything easily extensible and prevents the
use of magic values.

* Add tests for `parseCoordinates` and `buildCoordinates`

* Add `tv-popup-abs-coords` to `collectDOMVariables`

This will make the absolute coordinates available for the
`DraggableWidget` and the `EventCatcherWidget`.

* Add documentation for the `tv-popup-abs-coords`

... to the `DraggableWidget` and the `EventCatcherWidget`.
2022-10-22 13:13:39 +01:00
..
AlertMechanism.tid Fix sizes of SVG icons in documentation 2019-10-13 15:35:36 +01:00
DraftMechanism.tid Add mechanisms to the reference docs 2014-09-11 20:12:25 +01:00
DragAndDropMechanism.tid The last batch of drag and drop docs 2017-04-06 10:15:22 +01:00
HistoryMechanism.tid Update HistoryMechanism.tid (#4731) 2020-06-27 13:11:20 +01:00
InfoMechanism.tid Docs missed off #6675 2022-07-12 16:51:38 +01:00
Mechanisms.tid Refine preliminary list macro 2014-09-17 12:13:24 +01:00
PluginMechanism.tid Doc restructuring Plugin Install using core Libraries and with Node.js (#6722) 2022-06-20 13:55:12 +01:00
PopupMechanism.tid Fix popup position if popup is triggered from within an offsetParent element (#6887) 2022-10-22 13:13:39 +01:00
RefreshMechanism.tid Extend refresh throttling to tiddlers having a "throttle.refresh" field 2019-10-14 10:42:14 +01:00
RefreshThrottling.tid Tags related to Mechanisms for file path (#6237) 2021-11-18 08:48:16 +00:00
SavingMechanism.tid Change http://*.tiddlywiki.com/* to https:// 2017-11-11 11:56:20 +00:00
StateMechanism.tid Add NavigatorWidget example (#6285) 2021-11-27 07:58:29 +00:00
TranslationMechanism.tid Change http://*.tiddlywiki.com/* to https:// 2017-11-11 11:56:20 +00:00
UpgradeMechanism.tid Update document in tiddlywiki.com edition 2016-07-06 01:10:51 +09:00
WikificationMechanism.tid Extend refresh throttling to tiddlers having a "throttle.refresh" field 2019-10-14 10:42:14 +01:00