TiddlyWiki5/editions
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
..
aws Add first release of AWS plugin 2017-07-03 20:34:58 +01:00
classicparserdemo Use https for YouTube 2017-11-18 19:53:52 +00:00
codemirrordemo Add default "tiddlywiki" styles to CodeMirror and Highlight.js (#5128) 2020-11-28 14:07:12 +00:00
d3demo First pass at an `--editions` command 2014-10-27 21:50:25 +00:00
de-AT Update TiddlyDesktop repository URL 2022-03-31 12:05:56 +01:00
de-AT-server Enable the internals plugin by default in docs (#4335) 2020-04-07 20:41:00 +01:00
de-DE Enable the internals plugin by default in docs (#4335) 2020-04-07 20:41:00 +01:00
dev Extend pluginlibrary edition with a minimal test server (#6588) 2022-11-15 08:18:58 +00:00
dynaviewdemo Support specifying insertbefore position title as parameter (#6477) 2022-02-24 11:08:06 +00:00
empty Add build target for empty.html 2018-12-17 11:07:39 +00:00
es-ES Update TiddlyDesktop repository URL 2022-03-31 12:05:56 +01:00
es-ES-server Enable the internals plugin by default in docs (#4335) 2020-04-07 20:41:00 +01:00
fr-FR Restore "Add default settings for styled inline SPANs (#6877)" 2022-10-16 17:28:36 +01:00
fr-FR-server Enable the internals plugin by default in docs (#4335) 2020-04-07 20:41:00 +01:00
full Add Arabic (Palestine) to the "Full Edition" 2020-08-28 17:51:17 +01:00
highlightdemo Highlight plugin: add static demo 2015-09-11 22:36:30 +01:00
innerwikidemo Fix bug with innerwiki template 2021-10-02 16:17:07 +01:00
introduction Minor fixes to introduction edition 2021-10-02 17:31:02 +01:00
ja-JP Enable the internals plugin by default in docs (#4335) 2020-04-07 20:41:00 +01:00
katexdemo Update katex to latest 0.15.3 (#6671) 2022-07-09 08:37:47 +01:00
ko-KR Enable the internals plugin by default in docs (#4335) 2020-04-07 20:41:00 +01:00
ko-KR-server Enable the internals plugin by default in docs (#4335) 2020-04-07 20:41:00 +01:00
markdowndemo Replace Markdown parsing library with Remarkable (#3876) 2020-01-20 13:13:36 +00:00
pluginlibrary Extend pluginlibrary edition with a minimal test server (#6588) 2022-11-15 08:18:58 +00:00
prerelease Update release note 2022-11-27 13:55:22 +00:00
resumebuilder Cleanup editions information (#2444) 2016-05-17 22:00:26 +01:00
server Fix accidental changes in 41a7d98e17 2020-06-07 10:30:39 +01:00
server-external-js Fix faulty external-js single-file wiki (#5570) 2021-07-06 15:02:21 +01:00
share Fix accidental changes in 41a7d98e17 2020-06-07 10:30:39 +01:00
tahoelafs First pass at an `--editions` command 2014-10-27 21:50:25 +00:00
test Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
testcommonjs First pass at an `--editions` command 2014-10-27 21:50:25 +00:00
text-slicer Major updates to text-slicer plugin 2017-12-14 14:16:54 +00:00
translators Add missing languages to Translators edition 2022-03-26 15:25:50 +00:00
tw.org Docs: Update code of conduct 2022-08-19 11:15:57 +00:00
tw5.com Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
tw5.com-docs Enable the internals plugin by default in docs (#4335) 2020-04-07 20:41:00 +01:00
tw5.com-server Enable the internals plugin by default in docs (#4335) 2020-04-07 20:41:00 +01:00
tw5tank Enable the internals plugin by default in docs (#4335) 2020-04-07 20:41:00 +01:00
tw5tiddlyweb Typos 2014-12-05 10:20:32 +00:00
twitter-archivist Twitter Archivist: Fix display of tweet author 2022-11-13 11:18:47 +00:00
upgrade First pass at an `--editions` command 2014-10-27 21:50:25 +00:00
xlsx-utils xlsx-utils: Fix demo spreadsheet 2021-01-16 16:09:42 +00:00
xlsx-utils-server Add first pass at XLSX Utilities plugin 2016-10-23 22:49:59 +01:00
zh-Hans Fix wrong configurations in `tiddlywiki.info` for editions `zh-Hant` and `zh-Hans` (#4564) 2020-04-15 10:24:46 +01:00
zh-Hant Fix wrong configurations in `tiddlywiki.info` for editions `zh-Hant` and `zh-Hans` (#4564) 2020-04-15 10:24:46 +01:00