1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-29 21:09:56 +00:00
TiddlyWiki5/editions/tw5.com/tiddlers/widgets
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
..
$__docs_anyField.tid improve setwidget examples and add a link to and from enlist operator (#5666) 2021-05-25 22:19:28 +01:00
$__editions_tw5.com_widget-examples_qualify-transcluded.tid QualifyWidget documentation (#6422) 2022-01-25 17:59:59 +00:00
ActionConfirmWidget.tid Added docs for action-confirm widget, added default message for widget and improved logic for disabling it. (#5047) 2020-11-16 17:02:22 +00:00
ActionCreateTiddlerWidget Example 1.tid More tag changes for file routing (#6199) 2021-11-14 09:12:19 +00:00
ActionCreateTiddlerWidget Example 2.tid Correct tag names. Add missing tags (#6193) 2021-11-13 08:48:52 +00:00
ActionCreateTiddlerWidget Example 3.tid Correct tag names. Add missing tags (#6193) 2021-11-13 08:48:52 +00:00
ActionCreateTiddlerWidget Example 4.tid Correct tag names. Add missing tags (#6193) 2021-11-13 08:48:52 +00:00
ActionCreateTiddlerWidget Template.tid Add tags to route to widgets file path (#6223) 2021-11-16 22:06:04 +00:00
ActionCreateTiddlerWidget_Example.tid Correct tag names. Add missing tags (#6193) 2021-11-13 08:48:52 +00:00
ActionCreateTiddlerWidget.tid Search and replace "v5.1.24" to "v5.2.0" 2021-07-14 09:21:37 +01:00
ActionDeleteFieldWidget.tid Missed parenthesis 2017-04-19 13:25:31 +01:00
ActionDeleteTiddlerWidget.tid Move docs for 5.1.5 release 2014-11-26 11:22:20 +00:00
ActionListopsWidget.tid tw5.com : Fix typo in ActionListopsWidget.tid (#6215) 2021-11-15 21:17:10 +00:00
ActionLogWidget.tid Doc updates for ActionLog and Log widgets (#5081) 2020-11-20 18:37:48 +00:00
ActionNavigateWidget.tid Overhaul the macro and variable documentation 2015-02-21 23:03:24 +00:00
ActionPopupWidget.tid Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
ActionSendMessageWidget.tid Fix docs typos 2021-10-30 15:28:54 +01:00
ActionSetFieldWidget.tid Missed parenthesis 2017-04-19 13:25:31 +01:00
ActionSetMultipleFieldsWidget.tid Fix docs typos 2021-10-30 15:28:54 +01:00
ActionWidget Execution Modes.tid Add tags to route to widgets file path (#6223) 2021-11-16 22:06:04 +00:00
ActionWidgets.tid Added MessageHandlerWidgets and TriggeringWidgets tags (#6161) 2021-11-01 12:56:52 +00:00
BrowseWidget.tid Fix typo in BrowseWidget docs 2020-04-22 12:10:34 +01:00
ButtonWidget.tid Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
CheckboxWidget.tid Allow checkboxes to be indeterminate (#6593) 2022-04-18 20:50:03 +01:00
CodeblockWidget.tid Fix problem with highlight plugin language brushes 2016-08-18 09:07:06 +01:00
CountWidget.tid Docs: add example to CountWidget.tid (#3732) 2019-01-27 19:28:42 +00:00
DiffTextWidget.tid Incorporate “diff” engine to show visual differences (#3112) 2018-03-16 20:38:35 +00:00
DraggableWidget.tid Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
DroppableWidget.tid Added MessageHandlerWidgets and TriggeringWidgets tags (#6161) 2021-11-01 12:56:52 +00:00
DropzoneWidget.tid Added MessageHandlerWidgets and TriggeringWidgets tags (#6161) 2021-11-01 12:56:52 +00:00
EditBitmapWidget.tid Update EditBitmapWidget doc to reflect update in code (#2725) 2018-11-27 18:11:21 +00:00
EditTextWidget.tid Update size attribute in EditTextWidget.tid (#6403) 2022-01-17 10:11:20 +00:00
EditWidget.tid Added MessageHandlerWidgets and TriggeringWidgets tags (#6161) 2021-11-01 12:56:52 +00:00
EncryptWidget.tid More mangling of reference docs 2014-09-11 00:06:19 +01:00
EntityWidget.tid Introduce text editor toolbar (#2315) 2016-04-22 08:36:29 +01:00
ErrorWidget.tid Docs: Fix typo 2022-10-06 10:25:14 +01:00
EventCatcherWidget.tid Fixed PR to fix popup position if popup is triggered from within an offsetParent element (#7013) 2022-12-01 21:16:44 +00:00
FieldMangler Widget (Examples).tid Add an example to the $fieldmangler widget (#4287) 2019-10-04 15:50:00 +01:00
FieldManglerWidget.tid Added MessageHandlerWidgets and TriggeringWidgets tags (#6161) 2021-11-01 12:56:52 +00:00
FieldsWidget.tid Add new parameters to fields-widget and fields-operator. (#4433) 2020-04-15 12:36:48 +01:00
GenesisWidget.tid Improve genesis widget examples 2022-11-01 10:07:54 +00:00
ImageWidget.tid Image lazy loading (#6809) 2022-07-21 15:30:56 +01:00
ImportVariablesWidget.tid Minor issue in example of Import Variables Widget (#5165) 2020-12-03 22:27:21 +00:00
JSONTiddlerWidget.tid Cherry-pick JSON docs improvements from #6522 2022-05-23 09:14:02 +01:00
Keyboard Codes.tid Move docs tiddlers out of the root folder 2021-11-26 11:18:03 +00:00
KeyboardWidget.tid Added MessageHandlerWidgets and TriggeringWidgets tags (#6161) 2021-11-01 12:56:52 +00:00
LetWidget.tid Relax the restriction on the let widget being unable to create variables starting with a dollar 2022-10-01 09:47:26 +01:00
LinkCatcherWidget.tid Docs: mention MessageCatcher widget in LinkCatcher tiddler (#6485) 2022-02-26 18:59:45 +00:00
LinkWidget.tid Update LinkWidget.tid (#4690) 2020-06-11 12:11:12 +01:00
ListopsData.tid Adding tag to ListopsData (#6248) 2021-11-19 07:54:43 +00:00
ListWidget.tid Docs: Fix typos 2022-07-31 15:23:58 +01:00
LogWidget.tid Doc updates for ActionLog and Log widgets (#5081) 2020-11-20 18:37:48 +00:00
MacroCallWidget.tid Add doc related to WikiText parser modes (#6415) 2022-01-23 09:44:01 +00:00
MessageCatcherWidget.tid Update messagecatcher widget example to use newer syntax 2021-12-22 15:31:35 +00:00
MessageHandlerWidgets.tid Move docs tiddlers out of the root folder 2021-11-26 11:18:03 +00:00
NavigatorWidget.tid Add NavigatorWidget example (#6285) 2021-11-27 07:58:29 +00:00
PasswordWidget.tid More mangling of reference docs 2014-09-11 00:06:19 +01:00
QualifyWidget.tid QualifyWidget documentation (#6422) 2022-01-25 17:59:59 +00:00
RadioWidget Example.tid Update RangeWidget and RadioWidget examples from #5158 2021-03-07 10:23:14 +00:00
RadioWidget ExampleTemplate.tid add docs for radio-actions (#5156) 2020-11-30 18:48:48 +00:00
RadioWidget.tid Added MessageHandlerWidgets and TriggeringWidgets tags (#6161) 2021-11-01 12:56:52 +00:00
RangeWidget Example.tid Update RangeWidget and RadioWidget examples from #5158 2021-03-07 10:23:14 +00:00
RangeWidget.tid Added MessageHandlerWidgets and TriggeringWidgets tags (#6161) 2021-11-01 12:56:52 +00:00
RevealWidget.tid Reveal widget allow re-positioning (#5087) 2020-11-21 17:19:52 +00:00
ScrollableWidget.tid ScrollableWidget example shouldn't iterate through all tiddlers 2022-10-17 12:21:34 +01:00
SelectWidget.tid Add example of actions attribute to SelectWidget documentation (#6181) 2021-11-08 16:59:17 +00:00
SetMultipleVariablesWidget.tid Set multiple fields/variables/params using filters (#6130) 2021-10-27 11:20:11 +01:00
SetVariableWidget.tid Docs update 2014-10-25 14:02:21 +01:00
SetWidget.tid Add some warnings about the dangers of title lists 2022-05-23 08:56:10 +01:00
TextWidget.tid Update TextWidget.tid (#3696) 2019-01-15 16:14:50 +00:00
The Extended Listops Filters.tid Add Filter tag to The Extended Listops Filters (#6201) 2021-11-14 08:47:53 +00:00
TiddlerWidget.tid Docs fix: Remove erroneous "class" attribute from tiddler widget 2017-09-01 11:13:39 +01:00
TranscludeWidget.tid Fix headings in wikitext example code (#6692) 2022-05-14 13:31:36 +01:00
TriggeringWidgets.tid Move docs tiddlers out of the root folder 2021-11-26 11:18:03 +00:00
VarsWidget.tid Add $let widget (#6148) 2021-10-30 11:42:22 +01:00
ViewWidget.tid Add ViewWidget cross references and examples (#6355) 2021-12-20 10:07:34 +00:00
Widgets.tid Overhaul the macro and variable documentation 2015-02-21 23:03:24 +00:00
WikifyWidget.tid Add doc related to WikiText parser modes (#6415) 2022-01-23 09:44:01 +00:00