mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-29 21:09:56 +00:00
3918e59cc1
* 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. |
||
---|---|---|
.. | ||
$__docs_anyField.tid | ||
$__editions_tw5.com_widget-examples_qualify-transcluded.tid | ||
ActionConfirmWidget.tid | ||
ActionCreateTiddlerWidget Example 1.tid | ||
ActionCreateTiddlerWidget Example 2.tid | ||
ActionCreateTiddlerWidget Example 3.tid | ||
ActionCreateTiddlerWidget Example 4.tid | ||
ActionCreateTiddlerWidget Template.tid | ||
ActionCreateTiddlerWidget_Example.tid | ||
ActionCreateTiddlerWidget.tid | ||
ActionDeleteFieldWidget.tid | ||
ActionDeleteTiddlerWidget.tid | ||
ActionListopsWidget.tid | ||
ActionLogWidget.tid | ||
ActionNavigateWidget.tid | ||
ActionPopupWidget.tid | ||
ActionSendMessageWidget.tid | ||
ActionSetFieldWidget.tid | ||
ActionSetMultipleFieldsWidget.tid | ||
ActionWidget Execution Modes.tid | ||
ActionWidgets.tid | ||
BrowseWidget.tid | ||
ButtonWidget.tid | ||
CheckboxWidget.tid | ||
CodeblockWidget.tid | ||
CountWidget.tid | ||
DiffTextWidget.tid | ||
DraggableWidget.tid | ||
DroppableWidget.tid | ||
DropzoneWidget.tid | ||
EditBitmapWidget.tid | ||
EditTextWidget.tid | ||
EditWidget.tid | ||
EncryptWidget.tid | ||
EntityWidget.tid | ||
ErrorWidget.tid | ||
EventCatcherWidget.tid | ||
FieldMangler Widget (Examples).tid | ||
FieldManglerWidget.tid | ||
FieldsWidget.tid | ||
GenesisWidget.tid | ||
ImageWidget.tid | ||
ImportVariablesWidget.tid | ||
JSONTiddlerWidget.tid | ||
Keyboard Codes.tid | ||
KeyboardWidget.tid | ||
LetWidget.tid | ||
LinkCatcherWidget.tid | ||
LinkWidget.tid | ||
ListopsData.tid | ||
ListWidget.tid | ||
LogWidget.tid | ||
MacroCallWidget.tid | ||
MessageCatcherWidget.tid | ||
MessageHandlerWidgets.tid | ||
NavigatorWidget.tid | ||
PasswordWidget.tid | ||
QualifyWidget.tid | ||
RadioWidget Example.tid | ||
RadioWidget ExampleTemplate.tid | ||
RadioWidget.tid | ||
RangeWidget Example.tid | ||
RangeWidget.tid | ||
RevealWidget.tid | ||
ScrollableWidget.tid | ||
SelectWidget.tid | ||
SetMultipleVariablesWidget.tid | ||
SetVariableWidget.tid | ||
SetWidget.tid | ||
TextWidget.tid | ||
The Extended Listops Filters.tid | ||
TiddlerWidget.tid | ||
TranscludeWidget.tid | ||
TriggeringWidgets.tid | ||
VarsWidget.tid | ||
ViewWidget.tid | ||
Widgets.tid | ||
WikifyWidget.tid |