TiddlyWiki5/editions/tw5.com/tiddlers
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
..
_tw_shared Show stylesheets as rendered plain text with highlighting (#6778) 2022-07-14 09:00:56 +01:00
about Move docs tiddlers out of the root folder 2021-11-26 11:18:03 +00:00
commands Use deprecated macro for deprecated commands (#6973) 2022-10-10 16:49:20 +01:00
community Updated URL to new public site. (#6496) 2022-09-05 18:04:47 +01:00
concepts Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
customising Correct typos (#6571) 2022-03-30 18:25:03 +01:00
definitions Revert "Revert "add table utility classes and some docs how to use them. fix problem with control-panel basics tab shown in story river (#7039)"" 2022-11-23 21:52:36 +00:00
demonstrations Sort completed tasks by 'modified' instead of 'created' field (#7047) 2022-11-19 22:13:02 +00:00
editions Change http://*.tiddlywiki.com/* to https:// 2017-11-11 11:56:20 +00:00
features Merge branch 'tiddlywiki-com' 2022-11-25 15:27:42 +00:00
fields Overhaul the filter operator documentation: part 2 2015-01-24 21:18:44 +00:00
fileformats Update docs that mention store area 2021-07-14 13:08:19 +01:00
filters JSON Filter Operators (Revised Attempt) (#6936) 2022-09-02 18:15:45 +01:00
gettingstarted Fix missing links in Getting Started. (#6900) 2022-08-19 08:14:04 +01:00
hellothere Correct colour for Mastodon icon 2022-11-25 17:59:11 +00:00
hiddensettings Add hidden option to make "More" sidebar tabs be horizontal (#7063) 2022-11-30 09:57:14 +00:00
howtos Allow global keyboard shortcuts to override all other shortcuts by providing a special field (#6735) 2022-10-07 17:31:04 +01:00
images Update new release banner 2022-11-22 21:08:41 +00:00
languages Tag additions (#6233) 2021-11-18 08:58:41 +00:00
learning Clarify drag-n-drop behaviour again (#3434) 2018-11-20 10:06:12 +00:00
macros Allow users to overwrite TOC default icons (#6913) 2022-11-14 22:04:30 +00:00
mechanisms Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
menubar First commit of new Menu Bar plugin 2020-02-28 14:33:15 +00:00
messages [doc] Update WidgetMessage: tm-new-tiddler (#6945) 2022-09-13 17:20:28 +01:00
nodejs Fix modified timestamp (#7046) 2022-11-19 22:11:46 +00:00
platforms Update TiddlyWiki in the Sky for TiddlyWeb.tid (#6769) 2022-07-13 17:27:45 +01:00
plugins Fix a typo in the Plugin Ordering tiddler (#6744) 2022-06-28 17:59:33 +01:00
pragmas Add parsermode pragma 2022-11-23 22:35:32 +00:00
readme Promote Gitter Chat in the Readme (#3322) 2018-12-01 14:25:33 +00:00
reference Fix tag pill colouring 2021-11-19 10:52:13 +00:00
releasenotes Update Releases.tid (#6880) 2022-08-04 19:18:06 +01:00
roadmap Update RoadMap tiddler 2020-05-16 19:52:54 +01:00
saving Fix missing links in Getting Started. (#6900) 2022-08-19 08:14:04 +01:00
styleguide Docs Macros: Add new <<.tiddler-fields>> macro 2021-12-06 16:59:07 +00:00
system Allow the big download button to be defined using the colour palette values (#7064) 2022-11-26 11:15:47 +00:00
systemtags Merge branch 'tiddlywiki-com' 2022-11-15 10:39:05 +00:00
tiddlydesktop Update TiddlyDesktop repository URL 2022-03-31 12:05:56 +01:00
variables Add "tv-selectednode-width" and "tv-selectednode-height" ... (#6582) 2022-04-15 13:46:09 +01:00
videos Use https for YouTube 2017-11-18 19:53:52 +00:00
webserver Docs: Add note for retrieving system tiddlers via HTTP under Node.js 2022-09-09 10:02:26 +01: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
wikitext Add parsermode pragma 2022-11-23 22:35:32 +00:00
workingwithtw Add docs on share plugin (#5331) 2021-01-03 11:48:17 +00:00
$__StoryList.tid Revert "Allow $:/core/ui/ControlPanel/Basics to work in the story river + some docs about utility classes (#6912)" 2022-11-15 11:41:55 +00:00
Brackets.tid Added some background on different types of brackets 2022-07-28 16:05:10 +01:00
Tables in WikiText CSS Utility Classes.tid Revert "Revert "add table utility classes and some docs how to use them. fix problem with control-panel basics tab shown in story river (#7039)"" 2022-11-23 21:52:36 +00:00