1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-12-24 17:10:29 +00:00
TiddlyWiki5/core/modules
FlashSystems 3918e59cc1
Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013)
* 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`.

* Fix crash when generating a static version of the TW

The Popup class is not initialized in `startup.js` if `$tw.browser` is
not true. After having consolidated the facilities for parsing
coordinate strings into `popup.js` this breaks because the static build
needs to parse coordinate stings even if no Popup module is initialized.
This commit solves this problem by making `readPopupState`,
`parseCoordinates` and `buildCoordinates` static methods of `popup.js`.
It also adds a comment to these functions to show that these can be called
safely even if the Popup-Class is not initialized.
2022-12-01 21:16:44 +00:00
..
commands Add storyTiddler to render command (#6746) 2022-06-29 08:58:40 +01:00
editor Add "code" and "key" to propogateKeydownEvent's cloneEvent (#7071) 2022-11-30 10:17:10 +00:00
filterrunprefixes feat(filters): extend :map filter run prefix to accept a suffix to enable mapflat (#6806) 2022-07-21 09:23:01 +01:00
filters Fix [is[variable]] operator doesn't work for "fake" variables #6303 (#6996) 2022-10-18 17:08:04 +01:00
indexers style(App) eliminate whitespace at the end of code lines (#5735) 2021-05-30 19:20:17 +01:00
info style(App) eliminate whitespace at the end of code lines (#5735) 2021-05-30 19:20:17 +01:00
macros allow unusedtitle macro to use the prefix parameter and fix wiki.generateNewTitle() (#5361) 2021-05-02 19:26:50 +01:00
parsers Add parsermode pragma 2022-11-23 22:35:32 +00:00
savers Show server response as error message in put saver (#6589) 2022-04-05 17:06:56 +01:00
server Fix for #4767: lazy-loading deletes tiddler bodies (#7014) 2022-11-02 17:26:08 +00:00
startup add a hidden config to disable Syncer logging to the console (#7049) 2022-11-20 17:26:14 +00:00
storyviews Add test to storyviews if targetElement is null (#5767) 2021-06-09 10:18:15 +01:00
upgraders Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00
utils Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
widgets Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
commander.js style(App) eliminate whitespace at the end of code lines (#5735) 2021-05-30 19:20:17 +01:00
config.js Fix configuration list of HTML5 block elements (#5469) 2021-05-23 17:50:27 +01:00
deserializers.js Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00
filters.js Improve recursion detection for transclusion and filters (#6970) 2022-10-01 10:13:40 +01:00
keyboard.js Allow global keyboard shortcuts to override all other shortcuts by providing a special field (#6735) 2022-10-07 17:31:04 +01:00
language.js Make lazy loading message be translateable 2015-09-08 10:41:27 +01:00
pluginswitcher.js Introduce JSON parse utility function with error handling (#6401) 2022-02-21 15:29:25 +00:00
saver-handler.js Fix faulty external-js single-file wiki (#5570) 2021-07-06 15:02:21 +01:00
story.js Fix issues with creation and modification dates 2015-09-11 13:34:01 +01:00
syncer.js Fix syncer logout alert (#5936) 2021-08-05 14:50:22 +01:00
tiddler.js Radio widget should use default if field/index is missing 2022-01-09 17:17:12 +00:00
wiki-bulkops.js Fix renaming a tiddler can result in duplicate tags 2022-01-14 16:57:30 +00:00
wiki.js Fix handling of {!!title} in a filter with no currentTiddler 2022-06-14 08:33:47 +01:00