TiddlyWiki5/core
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
..
images Add Mastodon icon 2022-11-25 15:28:12 +00:00
language Allow user defined setting for retain-story-order button in ControlPanel (#6863) 2022-11-14 17:30:13 +00:00
modules Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
palettes Restore "Add default settings for styled inline SPANs (#6877)" 2022-10-16 17:28:36 +01:00
templates Use view template body when opening tiddler in new window 2022-10-02 17:22:48 +01:00
ui Add hidden option to make "More" sidebar tabs be horizontal (#7063) 2022-11-30 09:57:14 +00:00
wiki Allow users to overwrite TOC default icons (#6913) 2022-11-14 22:04:30 +00:00
acknowledgements.tid Remove extraneous text/vnd.tiddlywiki from system tiddlers in light of #2883 2017-06-09 15:42:32 +01:00
copyright.tid It's 2022 2022-01-03 20:22:52 +00:00
icon.tid Experimental SVG Compression 2015-03-31 14:39:36 +01:00
plugin.info Minor tweaks to plugin library listings 2020-04-06 10:15:18 +01:00
readme.tid Add/update plugin readmes 2014-08-07 15:49:52 +01:00
sjcl-license.tid Move SJCL license file into core plugin 2017-04-23 09:53:18 +01:00

readme.tid

title: $:/core/readme

This plugin contains TiddlyWiki's core components, comprising:

* JavaScript code modules
* Icons
* Templates needed to create TiddlyWiki's user interface
* British English (''en-GB'') translations of the localisable strings used by the core